Jump to content

Landscape runtime modification


photo

Recommended Posts

To create a tire mark on soft terrain from a moving vehicle as from documentation example

spacer.png

creating a new Landscape Layer Map and parenting it to the vehicle does allow to follow the vehicle, but it's not clear to me how is supposed to work the selective application to a specific mask of the original Layer Map.

A new Layer Map share the same masks of every other, derived from the Object Landscape Terrain. If was supposed to work as a Decal I can't make my mind how.

Link to comment

You need to write an additional code that will spawn Layer Map while vehicle is moving. Assigning Layer Map in Editor will not make automatic marks on a terrain.

We are currently preparing more samples about Landscape Terrain usage via API, hope they will available with 2.12 SDK update in the summer.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
  • 2 weeks later...

Hi silent,

I am now a little bit more involved into davides project and helping him with the terrain modification sample. So far I have looked into the cpp-example files (runtime modification) and want getting an idea about runtime modification.

So far the idea is to create a new LandscapeLayerMap for track-modifcations during project startup and. Second, creating a new material for the tire tracks that will be applied during runtime and write a custom callback for Landscape::addTextureDrawCallback. While moving the vehicle during runtime,  I simply have to call Landscape::asyncTextureDraw, that will run my custom function. Only thing that needs to be added to my draw-function is a proper texture transformation to apply proper rotation of the vehicle.

Is that the proper approach or do I need to consider something else?

 

Best

Christian

Link to comment

Hello Christian,

Landscape::asyncTextureDraw might be redundant here. I suggest taking LandscapeLayerMap's and decals stored in the Node reference, that should be enough. These nodes can be spawned under the wheels. And it's strongly recommended setting up a lifetime for these nodes, too many track nodes will drop frame rate.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
  • 4 months later...
On 5/26/2020 at 11:02 PM, davide445 said:

Might you just post the relevant code snippet of the Mars rover example.

 I also would like to see the code used for the Mars vehicle tracks. I'm interested in using terrain deformation very much as it is an amazing feature but there is very little to get me started and I'm mostly an artist not a programmer. Certainly there must be a way to simplify the process or at least give us enough code so we don't have to re-invent the wheel you've already invented and perfected. My terrain is about 85% done including physics and LOD Masks but I need to create the effect of a meteor striking and leaving a crater as described in the UNIGINE 2 terrain Run-Time Modification. Anyone that can help I can repay with AAA environments. If anything UNIGINE you are going to want to see my work because I did my first professional 3d work in Hollywood before I decided that I would pursue a career in game/simulation development back in 1996. I have some near photorealistic terrains I use several resources like the HiRise program at The University of Arizona, and I was given a license from NASA and the USGS to use their data from the L.R.O. and the LOLA sensor among others. We are an Indie company founded in 2006 as Virtual Revolution a decade before Virtual Reality became a consumer item. We have switched from CryEngine to UNIGINE and although UNIGINE is the best, it still lacks the tutorials or documentation needed by many developers like myself who can code but don't specialize in it. A simple working code example of the Run-Time Modifications added to Samples in the UNIGINE Project Browser would greatly benefit us the developers and you the engine developers if we could implement these modifications without having to code. The UNIGINE already does a lot don't get me wrong. I'm just saying that the easier it is for developers to release a product with the UNIGINE the more money UNIGINE sees in the end.

 

Link to comment
×
×
  • Create New...