www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Kernle 32DLL on April 03, 2011, 07:23:44 pm

Title: How to work with lights? (setDiscardDistance?)
Post by: Kernle 32DLL on April 03, 2011, 07:23:44 pm
Hi,

Yet another problem I need to get solved: How to work with Lights in jPCT-AE? Judging from the docs, it seems there are only "point" lights, e.g. a light pointing into all directions. Any chance to create a spot light, that lights only a certain direction?

Another thing that I need to learn how to use is the function setDiscardDistance for a Light object. I thought that it would set the max. distance where the light could shine, but when regardless to which value I set it, this "distance" seems incredible small, so it seems like there is nearly no illumination at all :/ As a side note, the doc mentiones a value in the Config calls, which does not exist (Config.discardDistance).

Any toughts?

So long,
Kernle
Title: Re: How to work with lights? (setDiscardDistance?)
Post by: EgonOlsen on April 03, 2011, 09:43:36 pm
setDiscardDistance is actually a method to apply an optimization for objects that are too far away. It's not meant to be used to set a lights attenuation. This isn't possible in JPCT-AE right now, because i encountered massive driver problems on some devices when doing so. I'll go and see if this is still a problem on current devices and maybe enable it when i find the time. About the config setting : It's a legacy setting that AE might not have anymore. I'll remove it from the docs. I've no idea why your lights don't display properly. Either its a problem with your setup of them or you've located them inside or at least very close to the objects you want to light.