Jump to content
  • Advertisement
Sign in to follow this  
crunchysaviour

Blender/Soya3D rendering trouble

This topic is 3757 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, I'm having a bit of trouble with an object I made in Blender. When it's untextured it renders fine in my Soya3D game, Flyin' Irons. When I apply the textures, though, which are partially transparent, it renders in-game just fine when viewed from above, but when seen from below, the parts of the object are seen back-to-front (screenshot). I think this is something to do with Blender but I can't work out what's wrong. Can anyone please help?

Share this post


Link to post
Share on other sites
Advertisement
I have solved the problem. The answer was, of course, under my nose. The guide to Soya explains:

"Known bug: When two semi-transparent objects overlap, because one of them is in front of the other, Soya may not render them well, i.e. the farther object in front of the other one. There are two possible workaround for this bug:

• For objects like a grid, an herbage or grass, use a texture with a “mask”, instead of a semi-transparent texture. A texture with a “mask” can have transparency, but not semi-transparency. Soya automatically uses a mask for texture with an alpha channel, with all alpha values being either 0.0 or 1.0 (255 in the Gimp integer notation).

• For special effects like spells or explosion, use additive blending (see section 10.1). In facts, which object is rendered first as no impact with additive blending, as a consequence the bug is now harmless. Moreover, additive blending often makes explosions or spells more impressive."

In short, ensure the layer mask of the texture (the alpha channel) is black and white, with NO shades of grey. The alpha values must either be 1 or 0 (255 or 0, transparent or opaque). Semi-transparency is not supported.

Share this post


Link to post
Share on other sites
Quote:
Original post by crunchysaviour
In short, ensure the layer mask of the texture (the alpha channel) is black and white, with NO shades of grey. The alpha values must either be 1 or 0 (255 or 0, transparent or opaque). Semi-transparency is not supported.


That's not exactly what it says! It clearly is supported, just not in the comprehensive way you want, ie. ordering the rendering appropriately. You can use whatever alpha values you like as long as you don't rely on the order of multiplicative blending between 2 such objects.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!