Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Lightning(DARK); The light is always on
Topic Started: Nov 10 2010, 07:07 PM (247 Views)
szymek.k3
Member
[ *  * ]
Hi I opened up the Ultimate 3D example(the one with the cube, billboard, floor and walls)and loaded some models in as well, took all the light sources away and it's still not dark :sad: I can still see all my models fine, I expected the screen to just stay black.
Please help!
Edit: Just read it's to do with Ambient lighting, my question is how to turn it off?
Edited by szymek.k3, Nov 10 2010, 07:17 PM.
Offline Profile Quote Post Goto Top
 
Sothh
Member Avatar
Shaman Of Time
[ *  *  *  *  *  * ]
In short:

Code:
 
SetAmbient(0,0,0)


But if you had just looked at the manual you would have found:


Quote:
 
Ambient lighting
Ambient lighting is the light that is everywhere. If you look around in your room you'll probably notice that there's no place that's absolutely dark. Even if something is not directly lit there's always enough adventitious light to brighten it up a bit. Of course everything is actually lit by something else. Objects reflect light and that's what lights the objects that are not directly lit by light sources. But simulating this behavior would take awfully huge amounts of computing time. For that reason there's the ambient lighting.

Ambient lighting is the simplest kind of lighting one could imagine. Everything gets lit by it with the same intensity and the same color. For this reason ambient lighting is made up of only one color value. This color can be changed by the following function:

Code:
 
SetAmbient(

R,
G,
B
)


R, G, B
The new color of the ambient light. The values for these parameters have to be in the range from 0 to 255.


By default the ambient lighting has the color (128|128|128). So if you write SetAmbient(255,0,0) everything will glow red. If you write SetAmbient(0,0,0) all objects except for those that have an emissive material would be totally black. By changing the ambient lighting you can strongly influence the atmosphere of your game. You can switch between day and night or you can create an apocalyptic atmosphere by using red light.

“You can’t outrun Death forever.
But you can make the Bastard work for it.”

Major Korgo Korgar
“Last of The Lancers” - AFC 32
(Andromeda Ascendant Record Database)
Offline Profile Quote Post Goto Top
 
57E
Member Avatar
Forum Leader
[ *  *  *  *  * ]
Dat Manual
Changing the environment
Code:
 
SetAmbient(0,0,0);


Edit: Sothh was faster.
Edited by 57E, Nov 10 2010, 07:35 PM.

Offline Profile Quote Post Goto Top
 
Docmesh
Newbie
[ * ]
Should be in the control object the function SetAmbient(0,0,0)

But why would you want a dark room? (spooky) LOL
Edited by Docmesh, Nov 10 2010, 07:34 PM.
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
You also make some black fog for a night time feel.
Code:
 
SetFog(-10,-10,-10,50,1000);
Offline Profile Quote Post Goto Top
 
szymek.k3
Member
[ *  * ]
Thanks All!
Quote:
 
But why would you want a dark room? (spooky) LOL

HAHA :lol:
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply