FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Can't make transparent objects transparent/visible

2 posters

Go down

Can't make transparent objects transparent/visible Empty Can't make transparent objects transparent/visible

Post  diver Thu Feb 19, 2009 9:47 am

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.

diver

Posts : 11
Join date : 2009-02-04
Age : 37
Location : Belarus

Back to top Go down

Can't make transparent objects transparent/visible Empty Re: Can't make transparent objects transparent/visible

Post  sio2interactive Thu Feb 19, 2009 3:00 pm

You need to set the blending mode for the material... check the tutorial04 video for more information...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Can't make transparent objects transparent/visible Empty Re: Can't make transparent objects transparent/visible

Post  diver Fri Feb 20, 2009 7:00 am

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?

diver

Posts : 11
Join date : 2009-02-04
Age : 37
Location : Belarus

Back to top Go down

Can't make transparent objects transparent/visible Empty Re: Can't make transparent objects transparent/visible

Post  sio2interactive Fri Feb 20, 2009 7:09 am

Heuuu ya man... just set the diffuse alpha and set a blending mode to the material...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Can't make transparent objects transparent/visible Empty Re: Can't make transparent objects transparent/visible

Post  diver Fri Feb 20, 2009 7:57 am

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 (

diver

Posts : 11
Join date : 2009-02-04
Age : 37
Location : Belarus

Back to top Go down

Can't make transparent objects transparent/visible Empty Re: Can't make transparent objects transparent/visible

Post  sio2interactive Fri Feb 20, 2009 4:53 pm

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 );


sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Can't make transparent objects transparent/visible Empty Solved

Post  diver Mon Feb 23, 2009 3:16 am

Great. Thanks a lot for the help.

diver

Posts : 11
Join date : 2009-02-04
Age : 37
Location : Belarus

Back to top Go down

Can't make transparent objects transparent/visible Empty Re: Can't make transparent objects transparent/visible

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum