light+func_rotating issue/discovery
Posted: Sun Jul 05, 2009 6:13 pm
Found out something probably interesting depending on what you guys can make out of it:
If you make a small test map with only one room and a floating box made up of four brushes (not really floating just make it in a way that it doesn't touch any of the room's walls) textured with a grate texture that has a shader like this:
This guarantees that you can look through this "window".
Only the inner side of this box is textured with this window texture, the rest is caulked.
If you now place a light entity (blue color, just to make it more obvious) inside this window box and compile the map inside GTKRadiant 1.5.0. with BSP -meta, -vis, -light -fast -filter -super 2 -bounce 8 , you'll get this:

As you can see, only the box is visible, no more light is emitted so the room's walls stay black. (as to be seen in the lower left corner of that screenshot)
Now for the interesting part: if you take this map and convert the box into a func_rotating and then compile again, then suddenly the whole room is lit including the walls as you can see at the second picture. (again look at the lower left corner)

Both test maps had a light entity with a radius of 64, therefore large enough to lit the whole room if there wasn't any box at all; but obviously the first (rigid) box arrangement could hinder light to some extent whereas the rotating box didn't block any.
Conclusion: Do whatever you want with that knowledge, perhaps even flame me if I brought up a question that is nothing more than the result of my dumb mapping, shader scripting or compiling. In either case I'm interested to know about it.
[EDIT: Added screenshots.]
If you make a small test map with only one room and a floating box made up of four brushes (not really floating just make it in a way that it doesn't touch any of the room's walls) textured with a grate texture that has a shader like this:
Code: Select all
textures/bla/window011
{
qer_editorimage textures/bla/window011.tga
surfaceparm trans
surfaceparm alphashadow
surfaceparm playerclip
surfaceparm nonsolid
cull none
nopicmip
{
map textures/bla/window011.tga
blendFunc GL_ONE GL_ZERO
alphaFunc GE128
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}
Only the inner side of this box is textured with this window texture, the rest is caulked.
If you now place a light entity (blue color, just to make it more obvious) inside this window box and compile the map inside GTKRadiant 1.5.0. with BSP -meta, -vis, -light -fast -filter -super 2 -bounce 8 , you'll get this:

As you can see, only the box is visible, no more light is emitted so the room's walls stay black. (as to be seen in the lower left corner of that screenshot)
Now for the interesting part: if you take this map and convert the box into a func_rotating and then compile again, then suddenly the whole room is lit including the walls as you can see at the second picture. (again look at the lower left corner)

Both test maps had a light entity with a radius of 64, therefore large enough to lit the whole room if there wasn't any box at all; but obviously the first (rigid) box arrangement could hinder light to some extent whereas the rotating box didn't block any.
Conclusion: Do whatever you want with that knowledge, perhaps even flame me if I brought up a question that is nothing more than the result of my dumb mapping, shader scripting or compiling. In either case I'm interested to know about it.
[EDIT: Added screenshots.]