Wierd problems

I started using this engine about a week ago, and then I noticed some weird bugs while making my game…





The grass looks fine when you look above the terrain, but when you look toward the sky, it becomes really dark.





Applying rotation to a shared node caused a sci-fi building to split into parts with some floating in the air (yes I did call updateGeometryState).





I don’t really know what’s causing this, but every time I use terrain, I see weird dark spots like that on curves.





When the camera goes near the terrain, the user interface goes inside it rather than staying above it (I set ortho mode)



All help appreciated  :smiley:

it looks like the sky is drawn after the alphablended grass. have you put the grass into the transparent queue?



the dark sports looks like a staircase issue on the normals. you probably need to use less height differences or start using 16-32 bit heightmaps instead(recommended)

You might want to look into using the Pass system as well if you aren't already.  This is pretty essential as your scene gets more complex.

it looks like the sky is drawn after the alphablended grass. have you put the grass into the transparent queue?

Now I did and it works - thanks!

the dark sports looks like a staircase issue on the normals. you probably need to use less height differences or start using 16-32 bit heightmaps instead(recommended)

Reducing height variation seemed to fix it.
I don't really understand the 2nd suggestion though, heightmaps are grayscale and so using more bits makes no difference it seems.

You might want to look into using the Pass system as well if you aren't already.  This is pretty essential as your scene gets more complex.

Do you mean for multipass rendering? I thought it is only needed for things like shadows and water, or is there some other use I am missing?
Momoko_Fan said:

I don't really understand the 2nd suggestion though, heightmaps are grayscale and so using more bits makes no difference it seems.

The image based (grayscale) loader is 8 bit, resulting in merely 256 height steps. Using RAW files (files without a header or special format)  containing a bunch of 16/32 bit integers gives you a finer granularity.
The image based (grayscale) loader is 8 bit, resulting in merely 256 height steps. Using RAW files (files without a header or special format)  containing a bunch of 16/32 bit integers gives you a finer granularity.


exactly :)
You might want to look into using the Pass system as well if you aren't already.  This is pretty essential as your scene gets more complex.

Do you mean for multipass rendering? I thought it is only needed for things like shadows and water, or is there some other use I am missing?


Trying to rely on one scene graph and one trip through the renderqueue is tricky, maybe even impossible when you start getting complex setups.  I like to move my gui into a separate pass for example.  Passes are basically just layers like in photoshop.  If your passes do not clear the depth buffer, they'll be able to be intermixed in space without issue.