Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Procedural Mesh Generation

Just wondering if it was possible to code a procedural generated mesh to use as terrain.

Product Version: Not Selected
more ▼

asked Mar 20 '14 at 03:02 PM in C++ Programming

avatar image

16 1 3 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi Jon,

You can generate the visual mesh by using FDynamicMeshBuilder. You can create arbitrary geometry with that class, if you search the source code from GitHub, you should see a lot of examples of it being used.

If you wanted to do voxelized terrain like minecraft. You would need to handle collision by likely using raycasts against the voxel octree you create.

Hope that helps!

Cheers, Nick (Epic Games)

more ▼

answered Mar 20 '14 at 03:17 PM

avatar image

Nick Darnell ♦♦ STAFF
6k 77 37 151

avatar image fszczemton Mar 20 '14 at 08:58 PM

There is also a UCustomMeshComponent which apparently simply takes triangles. Would that be usable just as a component of a "terrain" actor?

Using FDynamicMeshBuilder seems a bit tricky when you want to draw it and don't know the engine, but need to get a primitive drawing interface and a view somehow.

avatar image TaurusI76 Mar 26 '14 at 08:55 PM

I tried to find out about FDynamicMeshBuilder by studying the source. What I saw is that FDynamicMeshBuilder draws to a PrimitiveDrawInterface. Where would I get the PDI from? Is this really the way to go if you want to create a mesh component that can be added to an actor? Or should UCustomMeshComponent be used? I tried including it, but the header cannot be found (private?).

Could you explain in more detail how to achieve this?

avatar image luisbonejo9807 Aug 09 '16 at 06:14 PM

How could arrange for it to begin FDynamicMeshBuilder generate , I see that are separate instructions , as they work together , I suck at this from the mesh.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question