x

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"

How do I procedurally generate landscape?

Hey,

I'm looking to create a landscape that randomly generates height map information on each play / level load, so everytime it looks like a new landscape. I was thinking there was some way of using a material to do this effect but come to a dead end as I can't seem to affect the landscape height information within a material. Does anyone have any suggestions on how to make this work?

I'm thinking of creating my own static mesh plane and using displacement to create the same effect. The landscape doesn't have to be highly detailed and will be very small, like a long 4 x 8 strip.

Thanks, Chris

Product Version: Not Selected
Tags:
more ▼

asked May 15 '14 at 11:33 AM in Using UE4

avatar image

cdrose
166 9 11 15

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

1 answer: sort voted first

Hi Chris,

I'm afraid this isn't possible at the moment. The editor builds collision data structures and tangent data as you import or paint it, and there isn't an easy way to call that at runtime. We do have a feature request open to allow modification of the landscape at runtime.

Given the size of the effect you're after, I think using a WorldPositionOffset input to a suitably-tessellated StaticMesh would probably work, but that wouldn't have any collision.

Cheers Jack

more ▼

answered May 16 '14 at 12:58 PM

avatar image

JackP_oldaccount
1.3k 37 11 48

avatar image cdrose May 16 '14 at 01:28 PM

Ah ok thanks Jack for the reply. Yea it would be good to have it implemented, it would only need to generate once on level load for example.

I started to play with the WorldPositionOffset last night but as you said it didn't have collision so I'm going to look for a work around of sorts.

Cheers, Chris

avatar image Nepos May 16 '14 at 02:35 PM

Not sure if this help but this is using a Procedural Mesh Generation to create a voxel landscape

https://forums.unrealengine.com/showthread.php?3229-WIP-Procedural-Voxel-Generation-In-UE4

avatar image JackP_oldaccount May 16 '14 at 02:41 PM

Aside from the voxels, AndrewJSch's code linked from that thread is a good reference for how to add your own primitive component type. That is the correct way to add custom geometry types to UE4.

avatar image cdrose May 16 '14 at 05:27 PM

Yea I see that voxel procedure, it's ideal if only there was a way to smooth out the landscape

avatar image killerpenguin05 Sep 28 '15 at 10:52 PM

would you be able to bake a height map to a basic plane and have it generate biom's you made dynamically or stream a random level when you come to the endge of that bion

(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