Jump to content

Grass with mask Problem


photo

Recommended Posts

Hi there,

i am testing the grass node for our project and i use the standard graqss texture i found in the tank demo.

if i dont use a mask Image it works fine, but if i use a mask image the texture of the grass change to a row of 4 grass textures

pls have a look to the pictures

1. looks good - without image mask

image.thumb.png.4a9695f00f9c7d0b55a8e7496b1a4040.png

 

2. looks not good with image mask

image.thumb.png.1fb6dd3ea21d456583c1aa342d5a2f54.png

 

it change the density and also the texture

 

this is the texture

image.png.45ffbb695768dc23bf08894ac1a1b817.png

 

Link to comment

Hello Thomas,

Welcome to the UNIGINE forum :)

The result you see is caused by mask working with the texture atlas. Depending on the number of channels used in the mask your grass texture will be interpreted in a different way.

By default, you see a grass object with RGBA mask, yes, you don't see the mask but there's a default one. It just works like that. RGBA mask uses each texture atlas column: 1st column for R channel, 2nd for the G, etc. When you created R8 mask all texture atlas became one column for the object. That's why you see tightened grass blades with four pieces of grass.

For better understanding of these principles I suggest checking our downloadable samples available in the corresponding tab of the SDK Browser (Samples -> Demos -> Samples). They have good vegetation section.

If you want a short fix for the issue, just change the texture. For instance, you can crop the original one as I did for the attached file. 

Here are some useful doc articles:

  1. https://developer.unigine.com/en/docs/2.8/objects/objects/grass/
  2. https://developer.unigine.com/en/docs/2.8/objects/objects/grass/settings
  3. https://developer.unigine.com/en/docs/2.8/content/materials/library/grass_base/

Thanks!

grass_regular.png

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

Link to comment
×
×
  • Create New...