Game Development Community

Day/Night and textures

by Howard Dortch · in Torque Game Engine · 07/04/2004 (4:21 am) · 5 replies

I installed the Synapse light pack and have some questions about night scenes or low light scenes.

I assume the way to make the scene dark like night time is to set the ambient light for the sun to some low value. When I did this I still have a bright landscape.
The only way I could get dark in the scene was to also set the color to some low value. When I set the color down the textures look a bit washed out in lights.

So question 1 is in order to create night I have to set both ambient and color to a low value. Is this the correct way to do this?

Question 2 is other textures like the water still show up brighter than the land so will I have to create a list of all textures in the level to traverse and change for day/night transitions?

Any hints?

#1
07/04/2004 (9:51 am)
Hi Howard,

Is this the type of night effect you're looking for (from the Lighting Pack 1.1 demos):

www.synapsegaming.com/content/linkedimages/LightingPack_1.1_Tower3.jpg
Here are the sun's settings from the demo:

color = "0.000000 0.000000 0.000000 1.000000";
ambient = "0.160000 0.160000 0.260000 1.000000";

Basically I removed all directional lighting by setting the color to "0 0 0" and gave the ambient a blueish tint.

Let me know if this helps!

-John
#2
07/04/2004 (10:44 am)
The point was more of a question on having to change both color AND ambient to get a dark effect, or is there a way to change the texture on the land or the diffuse on the land vertices to get a dark scene.
I notice in this pic you have dark water so the second part is about the specular on the water.

As a scene transitions from light to dark I have to change values on ALL items in the scene, water blocks, interiors etc?
#3
07/05/2004 (8:02 am)
Are you trying to use the night/day resource? It should be updating the sun's lighting for you.
#4
07/05/2004 (9:14 am)
Havent got that far yet John, just trying to understand the mechanics of this. Some of the textures like for the tree in the demo are bright electric green, lights that are not white like a camp fire makes the ground look mustard muddy, the water texture is brighter than it should be for night time.

Yer saying the night/day resource solves these problems?

In order to get a good dark scene I have to change not only the ambient light but the diffuse colors of all my textures at this point. The artist is going to need to know what levels to set for texture brightness, interior diffuse, specular, plants, water ...everything so is there a "rule" for this or just hack at it till it looks ok.
#5
07/05/2004 (11:34 am)
I'm not really sure how the night/day cycle works, but the problems you mentioned (water and self-illumination brightness) will interact the same way between the resource->TGE and the resource->Lighting Pack, so assuming the resource handles these issues it should work fine with the pack.

As for integrating the resource with the Lighting Pack, you'll be breaking new ground. I don't believe anyone else has tried this before, however I can't see why it wouldn't work.