PDA

View Full Version : flocking question



gabaedu
03-19-2012, 05:52 AM
Hi there, I'm having troubles to make instances to run over an irregular elevation ground. I can only make them to run over a plane.

Anyone can help me, please. How can I simulate the ground collision to make instance run over it? thanks in advance

jameswillmott
03-19-2012, 05:58 AM
For the moment you have to use the Lock to Ground feature and give it a texture. If your ground has been generated with a height map, or a procedural, you can use that texture directly, otherwise you'll have to generate a heightmap from the geometry and texture the ground level with it.

gabaedu
03-19-2012, 11:57 AM
Thanks four your answer :bowdown:, but I don't know how to make the heightmap from a geometry 8~

jameswillmott
03-19-2012, 03:30 PM
Thanks four your answer :bowdown:, but I don't know how to make the heightmap from a geometry 8~

You have to shade the geometry so the highest part is shaded white and the lowest black, you can use a simple gradient drawn in an art package for this, and applied as a planar texture on X or Z, autosized to fit the terrain.

Then do an orthographic render from on top, that image will be the height map you need to get the agents to follow the terrain.

gabaedu
03-21-2012, 02:42 AM
You have to shade the geometry so the highest part is shaded white and the lowest black, you can use a simple gradient drawn in an art package for this, and applied as a planar texture on X or Z, autosized to fit the terrain.

Then do an orthographic render from on top, that image will be the height map you need to get the agents to follow the terrain.

Thank you very much, I'll give it a try :thumbsup:

PeteS
04-20-2012, 01:59 PM
Ran into this same problem. Sadly, I don't think this technique works, as to use a texture, you'd need to apply it to some form of object so that it knows the dimensions. Of course there is no drop down for object reference. So, think I'm kinda screwed.

have you found anything different? Would love to hear it if so...:)

dwburman
04-20-2012, 03:21 PM
If your terrain object is 50M by 50M, wouldn't your image map also be 50M by 50m?

You could go to your terrain object's surface panel and temporarily apply the height map image in one of the channels there (color, diffuse, etc.) and click "automatic sizing". Then just copy the image layer, delete or uncheck it in the surface panel and then paste it in the Ground Texture panel for the Flock Generator.

PeteS
04-21-2012, 01:01 PM
I'll give that a try. Thought I think I did. Problem is not that I can't match it. I get no height adjustment at all.
Illmgive it a try Monday. Thanks.