Can't make transparent objects transparent/visible
2 posters
Can't make transparent objects transparent/visible
In blender I make four cubes with alpha of matereal set to 1.0, 0.75, 0.5, 0.25 and with different material color (white for opaque cude, R/G/B for others). The "Trans Z" or "Z Trans" (forgot) is set for all the cubes.
But on simulator I can see only red cube with alpha 0.75 o_O Can you point me my mistake?
P.S. Using tut4 code to display the scene on iPhone.
But on simulator I can see only red cube with alpha 0.75 o_O Can you point me my mistake?
P.S. Using tut4 code to display the scene on iPhone.
diver- Posts : 11
Join date : 2009-02-04
Age : 37
Location : Belarus
Re: Can't make transparent objects transparent/visible
You need to set the blending mode for the material... check the tutorial04 video for more information...
Re: Can't make transparent objects transparent/visible
Dude, tutorial04 video shows how to use alpha channel of texture image. But I want to achieve transparence with no images on object. What I've seen in the tutorial is setting the texture blending mode (
May be I miss something... or it's not allowed by the engine to make transparent objects with no texture images?
May be I miss something... or it's not allowed by the engine to make transparent objects with no texture images?
diver- Posts : 11
Join date : 2009-02-04
Age : 37
Location : Belarus
Re: Can't make transparent objects transparent/visible
Heuuu ya man... just set the diffuse alpha and set a blending mode to the material...
Re: Can't make transparent objects transparent/visible
Feeling stupid. Assuming I can't find the way to do that, can you tell what to do step-by-step (it's easy to me to achieve transparence when Blender renders the scene itself, but not for sio2).
I never before deal with 3D design (almost...), but I'm pretty expirienced programmer. Sorry, guys. I don't like stupid questions too (
I never before deal with 3D design (almost...), but I'm pretty expirienced programmer. Sorry, guys. I don't like stupid questions too (
diver- Posts : 11
Join date : 2009-02-04
Age : 37
Location : Belarus
Re: Can't make transparent objects transparent/visible
Hey man sorry about that... you are right... within Blender the blend mode can only be set if a texture is applied... sorry Blender rules... however YES SIO2 can handle it here's the snippet to make it work:
- Code:
// Manually set the blending mode of the material
sio2ResourceGetMaterial( sio2->_SIO2resource,
"material/Material" )->blend = SIO2_MATERIAL_ADD;
// Update the object type so it'll be rendered with SIO2_RENDER_ALPHA_OBJECT
sio2ObjectUpdateType( sio2ResourceGetObject( sio2->_SIO2resource,
"object/Cube" ) );
// Render back and front face ?
sio2EnableState( &sio2ResourceGetObject( sio2->_SIO2resource,
"object/Cube" )->flags, SIO2_OBJECT_TWOSIDE );
Solved
Great. Thanks a lot for the help.
diver- Posts : 11
Join date : 2009-02-04
Age : 37
Location : Belarus
Similar topics
» Transparent Objects
» How to deal with transparent objects?
» Proper z-ordering of transparent objects without texture
» duplicating objects at runtime and changing textures on the duplicated objects
» Why md2 can not do a transparent texture?
» How to deal with transparent objects?
» Proper z-ordering of transparent objects without texture
» duplicating objects at runtime and changing textures on the duplicated objects
» Why md2 can not do a transparent texture?
Permissions in this forum:
You cannot reply to topics in this forum