deniz Posted May 30, 2011 Share Posted May 30, 2011 Hi everyone, I want to do the following: define a quad with custom commands (using le-commands like createmesh, createsurface, addvetrex, addtriangle etc) I want this quad to look like a glass.. I have to be able to set its alpha value (its transparency) dynamically during run-time How can I do this? I have already looked in the traqnsparency tutorial. I do not want to render refractions, a refraction shader is overkill in my case, since the glass is very thin (windshield of a car) (the material files are not existing anyway, which was a serious disappointment for me by the way). I just need to draw the glass. and later I want to apply a normal map to the glass surface. Quote Link to comment Share on other sites More sharing options...
Aily Posted May 31, 2011 Share Posted May 31, 2011 Hi everyone, I want to do the following: define a quad with custom commands (using le-commands like createmesh, createsurface, addvetrex, addtriangle etc) I want this quad to look like a glass.. I have to be able to set its alpha value (its transparency) dynamically during run-time How can I do this? I have already looked in the traqnsparency tutorial. I do not want to render refractions, a refraction shader is overkill in my case, since the glass is very thin (windshield of a car) (the material files are not existing anyway, which was a serious disappointment for me by the way). I just need to draw the glass. and later I want to apply a normal map to the glass surface. You need to assign material with blend=alpha, and then control it color by EntityColor mesh,vec4(1,1,1,alpha), and render transparent meshes in second pass after lighting. If you don't want to use refractions, why you need normalmap then? For cubemap reflections? Quote "Better" is big enemy of "good" Link to comment Share on other sites More sharing options...
deniz Posted May 31, 2011 Author Share Posted May 31, 2011 You need to assign material with blend=alpha, and then control it color by EntityColor mesh,vec4(1,1,1,alpha), and render transparent meshes in second pass after lighting. If you don't want to use refractions, why you need normalmap then? For cubemap reflections? thanks for you answer Aily, I will try what you said as soon as possible quickly one more question before I explain the need for normal map: I guess if I define a diffuse texture with varying A-value, I can get a varying opacity over the surface, right? I want to use the normal map to make the glass look bumpy for simulating the appearance of rain drops & parftially accumulated snow surface (snow will be partially transparent) to see what I mean with "partially transparent", please refer to my video below where snow is accumulating little by little over the stanford bunny. I want to replace the bunny with a transparent thin glass and do this in LE of course (not in OpenGL): http://www.youtube.com/watch?v=yiuNFLUAOms Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.