Jump to content

Grass shader


photo

Recommended Posts

Posted (edited)

How viable would it be to write a grass shader and apply it to terrain, and do so over a vast area?

Image result for grass shader

Something similar to this, perhaps affected by physical wind.

Edited by david.norlin
Posted

Hi David,

We have a detailed article on how to write your own shaders here: https://developer.unigine.com/en/docs/2.7.1/code/uusl/

But it's hard to say if it's really possible to get what you want without knowing the whole requirements to this grass shader :) I would say that it should be possible to write a totally new grass object on your side (using ObjectExtern for example and your custom shaders). But if you want to modify already existing grass - it will be much harder task due to a lot of internal limitations.

We do have plan, however, to provide a fully GPU-powered grass (to get a better performance and less CPU overhead), but research is not started yet. And there might be some issues with multi-channel setups.

Thanks!

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

Posted

Hi Silent,

Thank you for the response.  For our project, we have a large terrain area (about 600x800 sq. km), and we are trying to include a high level of detail, as far as performance will allow.  We realize that there may be limitations to placing grass objects everywhere in order to create convincing farmfields and meadows, and that doing so will likely cause bad performance slowdowns, so we began discussing the possibility of creating a shader that doesn't rely on grass objects and could be applied via mask.  We are still learning a lot about Unigine, so we have not researched this too deeply yet, but we thought a shader might be a good, performance-friendly approach.  

Ideally, we would like this grass to have good variation in length, be able to be affected by wind in a natural "rolling" fashion, especially for pilots flying low to the ground, so they can determine wind direction visually.  Also, some level of collision and deformation caused by tires or tracks rolling through would be ideal.

I will have a look at the Unigine shader article.  Thanks.

image.png.6a24222398282421b73e928f608fb6a8.png

×
×
  • Create New...