Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Fri Apr 12, 2024 8:36 pm

All times are UTC

Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Apr 19, 2011 5:02 pm 

Joined: Tue Jul 08, 2008 2:37 am
Posts: 181

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:
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!

PostPosted: Wed Apr 27, 2011 2:27 pm 
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
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) :
rayblendissue.jpg [ 18.52 KiB | Viewed 14174 times ]

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

PostPosted: Tue May 31, 2011 7:16 pm 

Joined: Tue Jul 08, 2008 2:37 am
Posts: 181
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.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Who is online

Users browsing this forum: Google [Bot] and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group