Glass Material

View previous topic View next topic Go down

Glass Material

Post  jj on 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

View user profile

Back to top Go down

Re: Glass Material

Post  sio2interactive on 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
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Re: Glass Material

Post  jj on 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

View user profile

Back to top Go down

Re: Glass Material

Post  sio2interactive on 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,
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Re: Glass Material

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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