Jump to content

[SOLVED] Grass always ignoring some triangles of mesh


photo

Recommended Posts

Hello,

I've got some mesh imported from OBJ with pretty complex geometry (many triangles).
I'm adding grass as a child object of that mesh and setting proper x and y size that whole mesh is inside grass.
I've expected to see grass spawned evenly all around my mesh, but instead I've always have triangles without any grass. No matter what I change in grass settings (seed, size, step, subdivision, density, angle, orientation, node location) always the same triangles have grass and other have not.

image.thumb.png.eda4448ee01c5efd27aa5480d4d2959d.png

I've attached sample project.

grass_on_hill_bug.zip

Link to comment

Hi arzezniczak,

intersection malfunctions in your case because of two issues:

  1. Tangents of your mesh are incorrect - each vertex has at least 4 vectors
  2. This mesh is two-sided, which also may cause this. I assume this model was created for terrain, if so, it's better to use casual one-sided geometry. 

For instance, this is a mesh I created from sphere in Unigine Editor. As you can see each vertex has only one set vectors.

image.png

This is your mesh:

image.png

To check this I created a mesh from your model (RMB -> Create mesh) and opened it in Resource editor. You can find this tool in <sdk>/bin folder.

So, I suggest the following:

  • fix tangents in the 3d editor you'd used
  • switch to one-sided mesh

Thanks.

  • Like 1

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

Link to comment

Thank you very much for detailed answer!
I agree - tangents from our 3d modeller was mess and two-sided mesh was overkill in this object. After fixing this problems grass works perfectly on hills. Thank you!

 

Link to comment
  • morbid changed the title to [SOLVED] Grass always ignoring some triangles of mesh
×
×
  • Create New...