Page 1 of 1

light objects not showing up at all in low rendering mode

Posted: Thu Feb 14, 2013 11:49 pm
by Komag
I have a room that relies on seeing small light objects when they light up, but in low rendering mode nothing shows up at all.

- Is there anything I can do to "force" them to be visible?
- Do any of the LightSource properties affect whether it's shown while playing on low rendering mode?
lightPosition: a 3d vector specifying the origin of the light source in entity’s local space.
lightRange: the range of the light source in meters.
lightColor: a 3d vector specifying the RGB color of the light source in range 0-1.
brightness: scales the intensity of the light source.
castShadow: a boolean which turns dynamic shadow rendering on and off.
flicker: a boolean which turns flickering effect on and off. Default is on.
particleSystem: (optional) name of a particle system to attach to the light source.
placement: must always be set to “floor”.
I might be able to rig some way to use FX lights instead, but that would be tricky as they need to persist over saves and not bog down performance either. And that's assuming the FX lights will show up in low render mode!

Re: light objects not showing up at all in low rendering mod

Posted: Thu Feb 14, 2013 11:50 pm
by Neikun
I think this is one of the draw backs of low rendering mode. Where you can't see light objects until you are close to them.

Re: light objects not showing up at all in low rendering mod

Posted: Thu Feb 14, 2013 11:54 pm
by Komag
But with these I'm right on top of them (they're floor lights), so that's not the issue exactly (although I'm sure it's similar). They won't show up period, at all, no matter what I do or where I go.

Here is one of them:

Code: Select all

defineObject{
	name = "tictac_light_blue",
	class = "LightSource",
	lightPosition = vec(0, 0.15, 0),
	lightRange = 0.3,
	lightColor = vec(0, 0, 0.8),
	brightness = 1000,
	castShadow = false,
	flicker = false,
	placement = "floor",
	editorIcon = 88,
}

Re: light objects not showing up at all in low rendering mod

Posted: Fri Feb 15, 2013 9:41 am
by antti
The low quality rendering mode relies on per-vertex lighting (as opposed to per-pixel lighting in high quality). The floor meshes typically contain just four vertices, one in each corner, and the light won't be visible unless it reaches any vertices (and if the light reaches those corner vertices just barely, the quality would still be poor). Basically this means that low range lights nearby lowpoly meshes don't work very well in general.

If you want it to work well in low quality rendering mode, you need to either tessellate the floor meshes (by slicing the mesh up so that there's more vertices for the light to catch on) or increase the range of the lights so that they cover more vertices. Or alternatively, add a particle system (something like a flare or a glow perhaps?) on the light as well which will ensure visibility.

edit: here's an illustration I made to clarify the difference: Image

Re: light objects not showing up at all in low rendering mod

Posted: Fri Feb 15, 2013 11:29 am
by Komag
excellent answer, thank you very much antti!

I'll probably add a minor particle effect as the quickest solution, just to ensure at least some visibility :)

Re: light objects not showing up at all in low rendering mod

Posted: Fri Feb 15, 2013 12:35 pm
by petri
You could also try increasing the radius of the light source. 0.3 is pretty small...

Re: light objects not showing up at all in low rendering mod

Posted: Fri Feb 15, 2013 12:55 pm
by Komag
I know but it's on purpose to make a certain small circle of light in some spots, for the room puzzle. ;)

I've added small particles to match the lights and it works well enough as a substitute for the lights when low rendering, without being to intrusive in high rendering.