Automatic fog settings

Anything that isn't directly related to Age Creation but that might be interesting to Age developers.

Automatic fog settings

Postby Sirius » Sun Nov 21, 2010 12:41 pm

Hi again.

I would like to tell Uru to set automatically the fog of an Age depending of a precise number of hour, in order to have a daytime/nighttime cycle.
It would set the line "Graphics.Renderer.Fog.SetDefColor" (and "Graphics.Renderer.Setyon" if possible).

Gira, Kemo and Payiferen already use it, but it seems it doesn't use any Python file for this. Is it in the PRP and how can I reproduce it ? Thanks a lot.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Automatic fog settings

Postby Lontahv » Sun Nov 21, 2010 4:23 pm

I don't think the fog is changing for those ages, but however, they have an animated sun. To get the sky to change color dramatically they also use a plLayerSDLAnimation that changes the ambient color of the layer.

The plLayerSDLAnimation is possible if you're using PlasmaMax, but I'm not entirely sure if it possible in the main branch of PyPRP (It's in GPN's contrib though). The animated sun is a very easy and doable thing to do with PyPRP; just insert keyframes for the sun's intensity, color, and/or position and rotation. For the time of day to affect the animation, use a ageglobalanim. http://www.guildofwriters.com/wiki/Animations should explain that. I've used animated suns before and they're pretty great, however, you must be careful to have your outdoors areas completely dynamically lit (no lightmaps or shadelessness). A tip for making the outdoors realistically lit at night or during the day is setting all your objects to have their vertex paint black (or, the darkest you ever want the objects to get). Hopefully this was helpful.

If you just want to change the fog, you'd need to set up a python file with a timer callback that updates the color of the fog according to the time of day SDL.
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Automatic fog settings

Postby diafero » Mon Nov 22, 2010 4:14 am

Actually, there is an age with time-depending fog in MOUL, it's Negilahn. The nglnFogTweener is controlling that. The source seems to be general enough to work for other ages, too - it takes the "Battery Updated SDL" as first argument and registers for that SDL, but never actually uses it.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Automatic fog settings

Postby Sirius » Mon Nov 22, 2010 12:22 pm

Hmmm... yes, I saw a few time something as "VAR Agetimeofday" in the SDLs...
But my problem with animated Suns is... well... In fact I used "/fogcolor 0 0 0" in Ae'Gura and was wondering if I could have the MOUL's fog (a bit brighter than in CC) going gradually to this one and then to the original one again... (another problem with your method is that the city is already wide enough, and it would increase lags)
That's since I heard about the Pellets and algae cycle that we could never saw as Cyan removed the Light Meter.
About Negilahn fog tweener, I don't know how it really controls the fog as I never saw any kind of "night time" there. But I'll see.
Thanks to both of you.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Automatic fog settings

Postby tangara » Mon Nov 22, 2010 5:37 pm

Sirius wrote:I would like to tell Uru to set automatically the fog of an Age depending of a precise number of hour, in order to have a daytime/nighttime cycle.

Of course, I do not know how to do :lol: but the daytime/nighttime cycle in Gira is the most beautiful I have seen : splendid sunsets, fabulous sunrises ... I do not know how they get it but I would like to be able to do it. ;) I would never thought it was fog settings... :shock:
User avatar
tangara
 
Posts: 216
Joined: Tue Sep 14, 2010 9:03 am
Location: Nice ( France )

Re: Automatic fog settings

Postby diafero » Tue Nov 23, 2010 2:48 am

Well, it is not fog settings ;-) .- Gira uses "nomal" SDL animations for layers and objects and lights to accomplish this astonishing effect.

The only ages with dynamic fog are Negilahn (time-dependant) and Minkata (where the fog gets denser as you get farer away from the cage, and is disabled when you enter a cave).
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Automatic fog settings

Postby tangara » Tue Nov 23, 2010 3:27 am

Thank you for the explanations Diafero. Each day I learn a bit more! 8-)
User avatar
tangara
 
Posts: 216
Joined: Tue Sep 14, 2010 9:03 am
Location: Nice ( France )

Re: Automatic fog settings

Postby Sirius » Wed Dec 15, 2010 11:02 am

Hey, I got it working !
I used a fog setting based on Negilahn. So, I have a fog going from 0 0 0 (midnight) to .4 .3 .1 (noon). The sunset is .3 .25 .1, and the sundown .35 .2 .05 (however, the fog settings are not only these four - they are going from one to another smoothly).

In Negilahn, the fog is updated every 10 seconds. In the city... well, on each link in. Is there a way to update it more often ?
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Automatic fog settings

Postby diafero » Wed Dec 15, 2010 2:40 pm

Using a timer, this should be possible. You will need some changes in the Python as the city does not have an AGETIMEOFDAY.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Automatic fog settings

Postby Sirius » Thu Dec 16, 2010 12:40 pm

AGETIMEOFDAY, ok. In which Python file the other changes should be located ? Is it only in the FogTweener, or also in the default python file ?
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Next

Return to Off-Topic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests