Posted: 27th Jun 2007 16:41
Is there a way to make an object unaffected by lights? What I want is a simple cube that always looks its true color no matter its position to light. However, I don't want an all white or all black object.
Posted: 27th Jun 2007 16:46
SET OBJECT LIGHT Obj,0

This makes it fully bright, but gives full WYSIWYG control via the texture.

You may want to look into SET OBJECT FOG too, if your using fog that is.
Posted: 27th Jun 2007 16:47
@ man id unknown: Maybe you look for this command:

SET OBJECT EMISSIVE

This command will alter the material emissive component of the object. The emissive component makes up one of the factors that
controls the final colour of the object, specifically the colour the object emits irrespective of any light or ambience. Setting this value to a high colour will make it bright under its own inner colour.

Syntax

SET OBJECT EMISSIVE Object Number, Color Value

Or maybe this is also helpfull for you:

SET OBJECT LIGHT

This command will set the light state of the specified object. Setting the light to one will ensure the object is affected by any lights in the 3D scene. If the object uses diffuse based colour, deactivating the light source will also deactivate the ability of the object to show its colour as it uses the light to calculate the diffuse result.

Syntax

SET OBJECT LIGHT Object Number, Flag


I'm not sure, if this helps, but I only took a quick look into the help-files! Maybe someone else knows some more ideas how to achieve your aim!


Hoozer
Posted: 27th Jun 2007 16:49
There's also SET OBJECT too - where you can set all of an object's attributes with a single command (if you have more than a couple to change).

TDK_Man
Posted: 27th Jun 2007 17:54
I appreciate all the help, but none of these worked.
Posted: 27th Jun 2007 23:07
perhaps some sample code could help us out? did you try "set object ambient obj,0"? cause if your ambience level is tuned down then your object will be affected.
Posted: 28th Jun 2007 0:02
Well, I just simply want an object's color to not be shaded or tinted by light, or lack of it.
Posted: 28th Jun 2007 0:14
You have already been told that SET OBJECT LIGHT does that.

However, reading your numerous other posts you are talking about objects simply coloured using COLOR OBJECT. You really need to texture your object with a plain colour for many of the object light commands to work, otherwise you just get a white object.

Is this what you are after?

Comment out the SET OBJECT LIGHT command to see difference.

+ Code Snippet
sync on : sync rate 60 : autocam off

cls rgb(255,0,0)
get image 1,0,0,8,8

make object cube 1,10
`color object 1,rgb(255,0,0)
texture object 1,1

set object light 1,0

move camera -50

do
   turn object left 1,1
   pitch object down 1,0.5
   sync
loop
Posted: 28th Jun 2007 0:34
Understood, Spooky. Is there a way to make your example work without textures?
Posted: 28th Jun 2007 0:35
Also, once an image is aplied to an object as a texture, will manipulating that image alter the object's texture?