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.

Glass Material

2 posters

Go down

Glass Material Empty Glass Material

Post  jj Mon Sep 29, 2008 5:04 am

Does sio2 support a glass material render? What would be best the best approach?

jj

Posts : 77
Join date : 2008-09-24

Back to top Go down

Glass Material Empty Re: Glass Material

Post  sio2interactive Mon Sep 29, 2008 5:41 am

Can you describe what do you want to do first? Cuz the term is large... I mean really depends what do you want to create... On iPhone there's no shaders or cubemap not event GL_TEXTURE_GEN_MODE, so you an forget right away about chromatic aberration, real time reflection, fresnel reflection, reflection map or anything else fancy like that...

So it really depends on what you are trying to achieve and what are the minimum requirement to create the effect that you want Wink
sio2interactive
sio2interactive

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

http://sio2interactive.com

Back to top Go down

Glass Material Empty Re: Glass Material

Post  jj Tue Sep 30, 2008 5:35 am

Here, I would be attempting to render something like a curved glass bottle. Definitely refraction, etc...

Where might I begin. Does this mean the only thing really supported is alpha?

jj

Posts : 77
Join date : 2008-09-24

Back to top Go down

Glass Material Empty Re: Glass Material

Post  sio2interactive Tue Sep 30, 2008 5:48 am

Im afraid so... the best that you can do (in 1 rendering pass) is:


- Use 2 texture channel 1 for diffuse map (with alpha and a sio2Material blending mode, probably screen like in the gimp) the other one a reflection map.

1. Render the diffuse normally

2. Check out the source of MESA to see how you can calculate on CPU what exactly glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP ) and glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP ) does and apply dynamically the UV of the second texture channel.

So you'll get a transparent shape and when the camera is moving around you'll have the impression of reflection but in fact its fake Wink That should look acceptable on the iPhone and should not be to computationally (<- is that even a word?) expensive.

Might wanna give it shot Wink

Cheers,
sio2interactive
sio2interactive

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

http://sio2interactive.com

Back to top Go down

Glass Material Empty Re: Glass Material

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