Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / light effects off

Author
Message
dark puppus
21
Years of Service
User Offline
Joined: 16th Aug 2003
Location:
Posted: 6th Jul 2004 20:40
I want to turn off the light effect, can i ?

It is possible to make the ambient to have a constant value light for all directions and from all positions ? (i dont want for now a light effect).

The problem is that many objects turns gray, and i dont want this.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Jul 2004 20:54
Your best bet for all round ambience is to disable lighting alltogether on your object(s), this will make the object bright and unshaded - but worth noting that vertice colouring can replace lights and non-lit meshes run about 10% faster than lit meshes.


Van-B


The nature of Monkey was irrepressible!.
dark puppus
21
Years of Service
User Offline
Joined: 16th Aug 2003
Location:
Posted: 6th Jul 2004 21:03
how can i disable lightning to all objects ?

This damned algorithm called LIFE seems not work very well
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Jul 2004 21:10 Edited at: 6th Jul 2004 21:10
Well, you'd do it on a individual basis, but the command is SET OBJECT LIGHT Obj,0

So to do this globally, you could:

Function DisableLighting()

For Obj=1 to 1000
If object exist(Obj)=1 then SET OBJECT LIGHT Obj,0
Next Obj

Endfunction

After that you should be able to change the overall lighting with the ambient light level:

SET AMBIENT LIGHT 100


Van-B


The nature of Monkey was irrepressible!.
dark puppus
21
Years of Service
User Offline
Joined: 16th Aug 2003
Location:
Posted: 6th Jul 2004 22:23
I does'nt work. The objects appears white. I want they have the color set.

For example : a have a plain 1000 X 1000. I color it of blue. The color of this plain is blue, but only on one face, the other is gray. The same is for other objects.
And more, only rotating the camera change the object colors.

In DBC the color of the object is light independent if i not set up a light in the world.

This damned algorithm called LIFE seems not work very well
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Jul 2004 22:26
Ahh, you should SET OBJECT SPECULAR Obj,0 too.

The specular is causing the white-out. In DB, the default light 0 is active, so even if you create no lights, you still have light 0 to worry about. Try the specular thing though.


Van-B


The nature of Monkey was irrepressible!.
dark puppus
21
Years of Service
User Offline
Joined: 16th Aug 2003
Location:
Posted: 6th Jul 2004 22:50
Sorry, the code should be (if i'm not wrong) :
function disableLighting()
For Obj=1 to 10000
If object exist(Obj)=1
SET OBJECT LIGHT Obj,0
SET OBJECT SPECULAR Obj,0
endif
Next Obj
endfunction
but the objects turns white. No way to see the objects without light diffusion ? it can't be.

This damned algorithm called LIFE seems not work very well
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Jul 2004 23:05
Hmmmm...

I'll have to check that tonight, can't remember any problems I had after setting the specular.


Van-B


The nature of Monkey was irrepressible!.

Login to post a reply

Server time is: 2025-06-06 17:32:23
Your offset time is: 2025-06-06 17:32:23