Flexman Posted April 25, 2011 Share Posted April 25, 2011 Once in a while you want to do something exotic which bends the rules slightly. Is there a material setting that will exclude an object from a lighting pass? What I want to do is have the MFD material that is the screen area not be subject to the green pointlight above it. There's a 'glass' layer over the screen that shows the green point light when the layer behind the glass is showing a bright image. These attached images show the green light reflecting when the video underlay is both active and switched off. If I hide the faux glass cover it's fine. Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
Josh Posted April 26, 2011 Share Posted April 26, 2011 The GI shader does something like this. Can't be any more specific than that, off the top of my head. You could also emit black diffuse light and put all the color into the emission channel. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Flexman Posted April 26, 2011 Author Share Posted April 26, 2011 I looked at the shaders and scratch my head for a bit then realised something I hadn't tried. Normals. By adding LW_FULLBRIGHT to fix the normal on the glass plate that covers the screen it fixes the glare (and another issue relating to camera angle and the video underlay). Here's the final mesh_cubemap_glass.frag shader header. #define LW_DIFFUSE texture0 #define LW_CUBEMAP texture1 #define LW_FULLBRIGHT Include "mesh.frag" And the material file... texture0="abstract::apache_pit_mpd_glass_skin.dds" blend=1 depthmask=0 depthtest=1 overlay=0 zsort=1 cullface=1 castshadows=0 specular=13.50000000 gloss=0.10000000 shader="abstract::mesh_diffuse.vert","abstract::mesh_cubemap_glass.frag" It does the job preventing the night lighting from obscuring the screen and it retains the cubemap reflection. So all in all quite pleased, I learned a bit more about emission and specular channels too. That might be really handy when it comes to do the infra-red night vision stuff. Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
Josh Posted April 26, 2011 Share Posted April 26, 2011 Looks good. Quote My job is to make tools you love, with the features you want, and performance you can't live without. 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.