www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: mystara on December 11, 2009, 12:42:55 pm

Title: Unlit, clearly visible object
Post by: mystara on December 11, 2009, 12:42:55 pm
Hello,

Doubtless this is a silly question, but I'm not sure of the answer.

I'm trying to create a plane which is fully lit and yet does not light other objects. Specifically, I want the plane to be consistently lit no matter where the camera is. But I don't want it to create any light (so other nearby objects will not be illuminated) and don't want it to be affected by other light sources.

I think the way to do this is to set an additionalColor to the plane and to set the lighting mode to LIGHTING_NO_LIGHTS.

Is this correct?
Title: Re: Unlit, clearly visible object
Post by: EgonOlsen on December 11, 2009, 02:08:26 pm
Yes, that should do the trick.
Title: Re: Unlit, clearly visible object
Post by: mystara on December 12, 2009, 12:33:30 pm
hrm, almost.
The object becomes darker/fainter if the camera is further away. Not just smaller, but less well lit.

I don't really want to fiddle with my Config. settings, if I can avoid it. But I would suspect these are the cause? If so, is there a way to override them for a single object?

Current config is:
Config.fadeoutLight = true;
Config.linearDiv = 25;
Config.lightDiscardDistance = -1;
Config.farPlane = 1000;
         
Config.collideOffset = 250;


Title: Re: Unlit, clearly visible object
Post by: EgonOlsen on December 12, 2009, 02:02:43 pm
Disable lights and setting an additional color should be sufficient. There's no code that darkens objects when they move further away except when you are using fogging. Are you?
Title: Re: Unlit, clearly visible object
Post by: mystara on December 12, 2009, 03:25:43 pm
:D

I don't suppose it's possible to make a particular object immune to fogging?