Page 1 of 1

HELP, STATIC MESH & FLASHLIGHT NOT WORKING!!!

Posted: Thu Feb 05, 2009 10:42 pm
by GMer
I used the flashlight script here: viewtopic.php?f=8&t=490
When it shines on a Static Mesh, it is not illuminated! What can be going on?
Here are some screenshots that display what I am talking about:

Here the flashlight doesn't shine on the StaticMesh:

http://gallery.filefront.com/GMer56//1168485/

While here it shines on the level geometry fine:

http://gallery.filefront.com/GMer56//1168484/

For the flashlight I am using the DSpotlight entity.

Re: HELP, STATIC MESH & FLASHLIGHT NOT WORKING!!!

Posted: Thu Feb 05, 2009 11:04 pm
by Juutis
AFAIK, StaticMeshes don't calculate the lighting from dynamic lights. Only static lights. So I'm afraid you can't fix this without tinkering with the source code.

Re: HELP, STATIC MESH & FLASHLIGHT NOT WORKING!!!

Posted: Fri Feb 06, 2009 2:03 am
by GMer
Darn... :cry:
Is there another way to make a flashlight that a StaticMesh could calculate the light from?

Re: HELP, STATIC MESH & FLASHLIGHT NOT WORKING!!!

Posted: Fri Feb 06, 2009 6:32 pm
by Veleran
If it was a staticentityproxy (instead a staticmesh entity) is made of small pieces,when the flashlight is near some of them,the meshes will flash.
There is a drawback in this:It it is a terrain,subdivided in quads,the flashing quad might show seams with the neighbouring terrain tiles which remain unlit.

You can vertex edit the staticmesh to be slightly smaller and use it only as collision,inside the staticentityproxy.
The collision mesh has no need of diffuse bitmaps,or receive light-and may use optimized settings.

If the s.e.p. and teh staticmesh are of the same size and overlap neither would be rendered normally,and their faces would flicker.

Note,that the s.e.p. flash with no falloff-the whole actor,and thats one of the reasons to break a big s.e.p. mesh to smaller actors.
Whatever staticentity rootbone the flashlight reaches,will illuminate the corresponding staticentityproxy actor.