I would like to request addition of the following feature to Blitz3D.
If there were a command that disable/enabled a light's effect on an entity, it would open up a lot of possibilities. The command would be something like EntityLightEffect( entity, light, disable/enable ). If the command were called, it would make it so the light did not have any effect on the entity during rendering.
What can this be used for?
- Control of lighting as the player moves through the map. Create a light entity wherever there is a light from the lightmap. Then do a visiblity check between the player and the light, and disable or enable the entity/light interaction accordingly. This would make the player lit when he was in bright areas of the map, and darkened when he walks into the shadow. I do this already with vertex colors, but hardware lighting is calculated faster and allows specular highlights. It's not going to draw shadows on the mesh or anything, but it keeps the entity at the same lighting as the surroundings. If you play any FPS game, you'll notice that the characters are either effected by a light or not, based on visibility between the mesh and the light.
-Referenced prefabs are presently pretty much impossible, except in an outdoor scene, because of lighting issues. I can use vertex coloring , but not without making another copy of the mesh in memory. If hardware lights could be disabled and enabled per entity, I could have lights effect only the meshes that are visible from it. This way we could use lots of referenced prefabs, like the Unreal engine does, and they would not get lit by a light that was in another room.
-Outdoor lighting would be more accurate. You could do a visibility check between the entity and the sun once, at load time, and then enable or disable the sun's effect on the tree or rock or whatever, so trees in a mountain's shadow would not be lit by the sun.
-Management of DirectX's 8 lights would be easier. For moving entities, we could calculate the 3 or 4 closest lights, and only enable those lights' effect on the entity.
Please, this would give a lot more control and speed to users, and shouldn't be too difficult to implement. I'll be happy to post some demos showing how to make the most of this feature, if you can make it happen.
Thank you!
(Please.)
If there were a command that disable/enabled a light's effect on an entity, it would open up a lot of possibilities. The command would be something like EntityLightEffect( entity, light, disable/enable ). If the command were called, it would make it so the light did not have any effect on the entity during rendering.
What can this be used for?
- Control of lighting as the player moves through the map. Create a light entity wherever there is a light from the lightmap. Then do a visiblity check between the player and the light, and disable or enable the entity/light interaction accordingly. This would make the player lit when he was in bright areas of the map, and darkened when he walks into the shadow. I do this already with vertex colors, but hardware lighting is calculated faster and allows specular highlights. It's not going to draw shadows on the mesh or anything, but it keeps the entity at the same lighting as the surroundings. If you play any FPS game, you'll notice that the characters are either effected by a light or not, based on visibility between the mesh and the light.
-Referenced prefabs are presently pretty much impossible, except in an outdoor scene, because of lighting issues. I can use vertex coloring , but not without making another copy of the mesh in memory. If hardware lights could be disabled and enabled per entity, I could have lights effect only the meshes that are visible from it. This way we could use lots of referenced prefabs, like the Unreal engine does, and they would not get lit by a light that was in another room.
-Outdoor lighting would be more accurate. You could do a visibility check between the entity and the sun once, at load time, and then enable or disable the sun's effect on the tree or rock or whatever, so trees in a mountain's shadow would not be lit by the sun.
-Management of DirectX's 8 lights would be easier. For moving entities, we could calculate the 3 or 4 closest lights, and only enable those lights' effect on the entity.
Please, this would give a lot more control and speed to users, and shouldn't be too difficult to implement. I'll be happy to post some demos showing how to make the most of this feature, if you can make it happen.
Thank you!
(Please.)