Raydium 3D Game Engine
https://memak.raydium.org/

Rendering issue with blended textures.
https://memak.raydium.org/viewtopic.php?f=8&t=2198
Page 1 of 1

Author:  st [ Tue Apr 19, 2011 5:02 pm ]
Post subject:  Rendering issue with blended textures.

Hi!

We have rendering problems with objects that use blended textures.

Some objects are randomly rendered on top of each others. We've quickly made a short video to show what I'm talking about.


(For example: The green laser is sometimes under the tunnel.)

We're working with Photoshop to create and finally save the textures in TGA format. We also tried The GIMP with the same results. We double checked the mesh files, normals are correct and there are no double vertices. The raydium_modler shows the same results, so we guess that the rendering engine has a problem with blended textures. Using blended textures within one object is no problem, but using blended textures with two separate objects is a problem, sometimes the wrong object is visually in front. Using raydium_modler to load and save the tri files do not help.

We searched the forum with the result that others report such problems before:
viewtopic.php?f=3&t=2195
viewtopic.php?f=8&t=683
All instructions found on the forums didn't help.

We've tried out much, everything possible we're able to try out, it seems. We're currently helpless and we haven't much time left to finish the project.

The only solution that we see for now, is to use only RAYDIUM_TEXTURE_BLEND_CUTOUT (b2) or RAYDIUM_TEXTURE_BLEND_NONE (b0) textures. But we need to use RAYDIUM_TEXTURE_BLEND_BLENDED (b1) textures in some cases. The problem also shows up when an object with a RAYDIUM_TEXTURE_BLEND_BLENDED (b1) texture is above an object with a RAYDIUM_TEXTURE_BLEND_CUTOUT (b2) or a RAYDIUM_TEXTURE_BLEND_NONE (b0) texture.

Is there a way to force that a blended texture is always rendered in front or back?

The documentation explains the problem in some way, but it would be nice to use RAYDIUM_TEXTURE_BLEND_BLENDED (b1) instead of RAYDIUM_TEXTURE_BLEND_CUTOUT (b2) and RAYDIUM_TEXTURE_BLEND_NONE (b0) textures.

BTW: Each mesh only uses exactly one texture (b0, b1 or b2).

Any suggestion?

Thank you very much!

Author:  Xfennec [ Wed Apr 27, 2011 2:27 pm ]
Post subject:  Re: Rendering issue with blended textures.

Hi, hopes that I'm not too late !

That basic issue is that you can't render both blended and non-blended textures in the same frame, because of zbuffer. The workaround is to render blended textures last (and avoid overlaps between them).

In your video, I can't understand why the problem exists: the "ground" seems non-blended (usual 3bpp textures, right ?) and the blended laser is probably rendered -after- the ground (still right ?)

And looking close at the video, I can't explain why the laser is missing here (blue line) :
Attachment:
rayblendissue.jpg
rayblendissue.jpg [ 18.52 KiB | Viewed 14134 times ]


Is there another blended thing that is supposed to overlap the laser at this place ?

Author:  st [ Tue May 31, 2011 7:16 pm ]
Post subject:  Re: Rendering issue with blended textures.

Hi! :)

To make a very long story short: We made great progress on the project and we're looking forward to release it next month. We decided to use cutout textures for the problematic places. That decision also helped us to bring out the desired retro effect.

I'm sorry, but we haven't any clue where to problem exactly is registered.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/