Jump to content

Discrepancy with generated Grass


photo

Recommended Posts

Hello,

Here is a capture of a Grass object I'm using:

image.png.0585c54bf569901e59ecb153ab7b9448.png

(num textures = 4, density=0.5, texture is your grass_regular_d.tga, all other params left to default values, )

When I use this as a node for Landscape generated grass, the grass looks like this (2.7.1):

image.png.05df8ec4c1ea92fbeda332b34aa703f2.png

(inside the generated grass, num textures is also 4, density is also 0.5)

What's going on ?

Also, the grass is noticeably floating above the ground, although the ground is really flat.

Link to comment

This usually happens when grass mask is R instead of RGBA or vice versa (i dont remember what is proper).

Edited by demostenes
Link to comment

The image I used for the "Masks (Landcover)" is actually the TIF of my ground imagery, and I selected a greenish color of the image, so the source image is RGB.

The generated mask DDS files are indeed R only, but I have no control over them.

Link to comment

Hi, 

Landscape tool creates R8 mask, while default GrassObject uses "invisible" RGBA mask. The problem is that ObjectGrass with R8 mask utilizes texture as if it had 1 column. You can use grass texture 1*4 instead of 4*4. That will work. You also can check vegetation samples in SDK Browser (Samples -> Demos -> Samples).

I've posted a feature request for RGBA mask generation, however, not sure about ETA.

1 hour ago, Amerio.Stephane said:

Also, the grass is noticeably floating above the ground, although the ground is really flat.

Hmm, what terrain density is it?

Thanks!

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

Link to comment

Terrain is 26m/px (DTED2, can't go higher because of this other bug: https://developer.unigine.com/forum/topic/4907-terrain-bugs/?tab=comments#comment-25313 )

Landcover is 2m/px.

Also, while I selected a green color with a low tolerance, the grass is everywhere except in the green areas (?!?)

image.png.be136b92edc53ec6f98f6a1f490f0320.png

About the R8/RGBA: I feel like the mask should definitively be R8 (single channel) preferably and that ObjectGrass shouldn't behave differently depending on the mask internal structure. Or did I miss something else entirely?

Thanks

Link to comment

Hello, do you have any info regarding these remaining issues ?

  • grass mask looks inverted at creation
  • grass density appears much lower than what is visually set in the source node
Link to comment

Hello, I'm sorry for late response.

1 minute ago, Amerio.Stephane said:

grass mask looks inverted at creation

I'm afraid there's bug in 2.7.1 with color filtering. We've described the issue and forwarded to developers. As a workaround I can suggest resaving landcover source as indexed one. For instance, you can export this file as 8-bit palette image. In my test case I used CORINE palette.

We're sorry for the inconvenience caused with this filtering troubles.

4 minutes ago, Amerio.Stephane said:

grass density appears much lower than what is visually set in the source node

It's happening due to R8 mask. The resulting density depends on the mask type. ObjectGrass with R8 mask will always be looking more thinned than with RGBA mask. The easiest way to achieve similar grass appearance is to tune the density parameter. You can configure your original node with dummy R8 mask and then regenerate vegetation objects. Density value should be ~3 times bigger compared to default ObjectGrass with RGBA mask.

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

Link to comment

Thought I'd share my findings, given that it's a similar case with vector-generated masks as well.  Rasterization creates an R mask, so the normal grass object won't work as you guys discussed above.  I was able to more or less recreate the grass from the tank demo by cutting the dds into 4 different vertical pieces and then applying it to 4 different grass objects.  It wasn't efficient at all, but it looks decent. 

 

It works well enough as a placeholder and as a reference point for further refinement, but hopefully there is the option to generate RGBA masks from vector data in the future, along with fixing this whole grass object/landscape tool issue completely.  It should save a lot of time. 

 

6.PNG

Link to comment

Hello @Amerio.Stephane,

we've fixed landcover color filtering. Will be available in 2.7.2.

Hi @david.norlin,

On 7/8/2018 at 2:13 PM, david.norlin said:

Rasterization creates an R mask

yes, Landscape Tool will always make R8 mask, we understand that in some cases it could be an issue. I'd like to note that terrain you acquire out of the box is not the best in terms of detailing. Such things as realistic grass should be created manually in specific terrain areas. 500*500 km region with rich vegetation at every point will drastically reduce performance.

Thanks!

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

Link to comment
  • 4 weeks later...

Hello @sergej.koptev ,

this is not an error or bug, Landscape Tool creates R8 mask for vegetation objects by design. We're aware that this behavior causes misunderstanding for users. In 2.7.2 there will be no changes regarding this.

Our dev team working hard on new terrain object considering all the issues and limitations we've faced with Terrain Global. In the future releases terrain grass itself will be redesigned and changing it right now seems a bit unreasonable.

What can you do for now:

  • Preparing grass node with R8 mask will help to understand the final look on a terrain
  • If you do need grass texture variation you can edit the texture (1 column, 4 rows for R8 mask) or create additional grass node

Thanks!

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

Link to comment
×
×
  • Create New...