:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sat Feb 04, 2023 6:54 am
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum » Mapping Discussion
Day Night Loop settings
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [29 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Mar 17, 2012 5:35 pm    Post subject:  Day Night Loop settings Reply with quote  Mark this post and the followings unread

Can someone tell me how the values for
72 Set ambient rate
71 Set ambient step
work?
FinalSun describes them as Float value, but these huge numbers like 1070000000 for Set ambient rate are nothing comparable to float numbers i know.
e.g.
2070000000 makes the day-night-lighting transition very fast, but for
1100000000 nothing happens.

The numbers from nod8a.map also don't make much sense
1061997772 for Set ambient rate
1032805416 for Set ambient step
Which values would i have to set to make the light transition exactly twice as fast as this?

These numbers don't follow any logic i know. Confused
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Sep 09, 2012 12:30 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks to CCHyper the miracle about these values is solved.

These are as integer stored values, which are converted into hexadecimal numbers and further converted into float values.
CCHyper wrote:
Right, the values are integer representatives of floats!

2070000000 -> 0x7B61B180 -> 1.1718669
1100000000 -> 0x41901B00 -> 18.013184 ;No wonder why, its huge!
1061997772 -> 0x3F4CCCCC -> 0.79999995
1032805416 -> 0x3D8F5C28 -> 0.069999993

So what the game does, is convert the value from the action type to a float from a integer (game sees it as hex, we see it as a integer).

You can find an online hex2float converter here.


For those which this is too much work, you can also remove the 2 actions
72 Set ambient rate
71 Set ambient step
from the day/night loop triggers and put in the map instead

[AudioVisual]
AmbientChangeRate=0.79999995
AmbientChangeStep=0.069999993

CCHyper wrote:
All them actions do is copy the value assigned to it to RulesClass->AmbientChangeStep and RulesClass->AmbientChangeRate. it takes a float.

So if you don't want different speed for sunset and sunrise, you can simply use the global AudioVisual keys instead of the actions.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Sun Sep 09, 2012 10:37 am    Post subject: Reply with quote  Mark this post and the followings unread

I got to memorize this.
_________________
OmegaBolt wrote:
TS is abysmal to play, unless you're just casually city building in it.

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Sun Sep 09, 2012 3:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

So, if I set a value of 0.77999995 in that Action, it is incorrect?
_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Sep 09, 2012 3:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

yes. The action can't read/work with the double/float values.
It can only handle/store integers, due the way it loads the ini values from the map.
In the map the actions are saved as a long comma separated string, where a decimal point for a float would cause issues. That's why the inconvenient way using the integer->hex->float conversion.

For example, you want to use a value of 0.625, you have to convert it into hex which is 3f200000 and then convert it into integer (using win calculator) which is 1059061760
Then use this value for the Set ambient rate/step action in the map.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
MasterHaosis
General


Joined: 01 Nov 2010
Location: Serbia

PostPosted: Sun Sep 09, 2012 10:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Wait.... will it work in Yuri's Revenge Final Alert?
I have never seen sunset/sunrise in Ra2/YR, i did not know it is possible to change day and night. I though it is per map, if you change map to have light at night, it will be night time, if you set light value, it will morning, whatever. I did not know there is possibility of changing time/lights.
_________________

PPM Halloween Season 2021

Back to top
View user's profile Send private message
Cranium
Defense Minister


Joined: 05 Dec 2009
Location: USA

PostPosted: Mon Sep 10, 2012 2:00 am    Post subject: Reply with quote  Mark this post and the followings unread

This is how RA2/YR uses it,

AmbientChangeRate=.2 ; how many minutes between ambient light recalculations
AmbientChangeStep=.2 ;GEF old value is below, changing this to speed up nuke blast, noit sure if it will affect anything else; step rate for gradually changing ambient lighting
_________________

The enemy shall be injected with toxic poison - Venom

Back to top
View user's profile Send private message Visit poster's website Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Sep 10, 2012 6:10 am    Post subject: Reply with quote  Mark this post and the followings unread

If the mapper doesn't adds a day/night loop, then there is no day/night loop. This is true for TS as well as RA2/YR.

Though it seems RA2 is using the global lighting values for some superweapons as well (as Craniums post shows), while TS is using these solely for the day/night transition setting.

But it's a 5min job to create a simple testmap with the day/night loop and thus best to be tested in RA2.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sun Apr 16, 2017 2:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

I apology for bumping this topic, I just noticed strange cosmetic side effect when adding AmbientChangeStep or AmbientChangeRate under [AudioVisual] in map file. It changes brightness of units. Units appear bit darker. (might be useful for units to fit more into some maps, for example bright civilian vehicles in dark cities)


AV1.gif
 Description:
1st frame: [AudioVisual] is not set
 Filesize:  159 KB
 Viewed:  7934 Time(s)

AV1.gif



Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sun Apr 16, 2017 2:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

Are you absolutely sure about this? Please reconfirm and post seperate images for easier comparing. Also, I can't notice it, but did the structures change too?
_________________
One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done. #Tongue

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sun Apr 16, 2017 3:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:
Are you absolutely sure about this? Please reconfirm and post seperate images for easier comparing. Also, I can't notice it, but did the structures change too?

Yes, adding in any map one of these AmbientChangeStep  or AmbientChangeRate under [AudioVisual] somehow changes also brightness of units. Even same values from vanila rules.ini does this effect. Any other objects lightning remains same (only vehicles, infantry, aircraft are affected). Blue frame (on the right) is original, without [AudioVisual] settings.


truck.png
 Description:
 Filesize:  14.67 KB
 Viewed:  7917 Time(s)

truck.png



Anim1.gif
 Description:
 Filesize:  10.58 KB
 Viewed:  7917 Time(s)

Anim1.gif



anim2.gif
 Description:
 Filesize:  237.76 KB
 Viewed:  7917 Time(s)

anim2.gif



Back to top
View user's profile Send private message
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Sun Apr 16, 2017 3:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

Redefine ExtraXXXLight also in map and try.

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sun Apr 16, 2017 4:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
Redefine ExtraXXXLight also in map and try.

Interesting, extra light seems to be reset to 0.0 when AmbientChangeStep or AmbientChangeRate is set so these ExtraXXXLight also needs to be redefined.
Thanks.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Apr 16, 2017 9:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

no, it's because you set the section [AudioVisual] in your map and thus reset all (?not sure) keys of this section to their default values.

there are several rules.ini sections, where it's not enough to copy only the keys that you want to change, but where you have to copy every single key of the section or they get reset (sometimes to bad default values).


btw, for the AmbientChange*** keys you also use the triggers (see first post) and not the AudioVisual keys if you want different fast sunrise/sunset speeds.
It seems i didn't notice the different lighting back then in my tests, because one of the first things i've done was removing the annoying bright Extra***Light values and set them 0.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Mon Apr 17, 2017 5:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Not all keys are affected, this one may be a special case as those are related.
I have used map specific ExtraXXXLight, it doesn't reset to Default for say
ConditionRed or PoseDir.

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Mon Apr 17, 2017 11:57 am    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
no, it's because you set the section [AudioVisual] in your map and thus reset all (?not sure) keys of this section to their default values.

Correct. I have tested this, adding only [AudioVisual] section in map doesn't have any impact, but if any any of the keys are added, it uses default ones (probably using hardcoded ones, since it ignores other [AudioVisual] keys in rules.ini)

Lin Kuei Ominae wrote:

btw, for the AmbientChange*** keys you also use the triggers (see first post) and not the AudioVisual keys if you want different fast sunrise/sunset speeds.
.

Yes, I was first searching how to set correctly these values using triggers, but after reading posts above this way seemed to be easier to change only few values [AudioVisual] section rather than converting to hex and integer value.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Apr 17, 2017 2:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

yeah, if you have only a single day night loop, the keys could be easier.
But i find the trigger a bit more convenient, since you can this way have multiple light transition settings. Like a slow one for day/night and a fast one for a meteor shower or other special global map events (e.g. instant light flicker for lightning storm ambience).
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Mon Apr 17, 2017 5:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
e.g. instant light flicker for lightning storm ambience.

Wow, awesome idea! Does fast lightning change like this make any lag? And can be light flicker action made with single trigger ? (like Action0 to change light and Action1 to set it back) or some delay is necessary?

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Apr 17, 2017 7:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

Bittah made a DTA test map and it didn't lag.
You need 2 (or more) trigger to have a tiny delay. Basically a simplified night/day/night setup.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sat Jul 08, 2017 6:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
Like a slow one for day/night and a fast one for a meteor shower or other special global map events (e.g. instant light flicker for lightning storm ambience).
Bittah made a DTA test map and it didn't lag.
You need 2 (or more) trigger to have a tiny delay. Basically a simplified night/day/night setup.

Tried to implement this light flicker in my MP map during ion storms but sadly game logic disables changing ambient light during ion storms. I have set random lightning loop, it generally worked but after start of ion storm, changes of light didn't apply. After ion storm ended, light changing triggers continued.

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Mon Jul 08, 2019 6:01 am    Post subject: Reply with quote  Mark this post and the followings unread

Apologies for the bump, but this is somewhat related:

How to change the lighting of buildings as well?

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jul 08, 2019 6:28 am    Post subject: Reply with quote  Mark this post and the followings unread

What do you mean?
There is no ExtraBuildingLight key if that is what you mean.
ExtraUnitLight=.2 ; Extra light to make units glow.
ExtraInfantryLight=.2 ; Extra light to make infantry glow.
ExtraAircraftLight=.2 ; Extra light to make aircraft glow.

Concerning map lighting, they follow it just fine.
The only exception are objects using unittem.pal/unitsno.pal. They don't follow the maps coloring (Red=, Green=, Blue=), but they follow the general lighting (Ambient=) just fine.
That's why keys like UseNormalLight can give anims that nice glow on dark maps.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Mon Jul 08, 2019 12:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
they follow it just fine.
The only exception are objects using unittem.pal/unitsno.pal.

That'd be all of the buildings. Unless you make a custom palette (Ares-only), but surely the same exception would apply?

I meant something like the coloring of buildings to change according to the general lighting.
During sunset/sunrise, everything has a yellowish/orange-y tint to it.

How to get that in TS/FS/RA2/YR?

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jul 08, 2019 1:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

you can't
as i wrote, unit*.pal objects don't follow the Red/Green/Blue tinting of the maps lighting. Only the Ambient value for the brightness.

And the reason WW made it this way is most likely, that the remap colors aren't obscured into an unrecognizable mess.

Again an exception however, as IonStorm lighting can change the color of unit*.pal objects via the IonRed,IonGreen,IonBlue keys.

So in theory you could change during Sunset into an IonStorm.


However, since you can't change the maps color via trigger, only the brightness, you can't make a red/yellow sunset change into blueish day in the first place.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
McPwny
Pyro Sniper


Joined: 29 Jan 2018

PostPosted: Thu Aug 22, 2019 10:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

i dont really understand any of this at all! and there isnt much documentation on these trigger actions either. maby im
just stupid for asking, but can anyone make an actual explanation of how to use the three trigger actions 71,72,and 73 in conjunction,
and how to input the numbers for faster and slower ambient rate, and greater and more subtle ambient limits in a comprehensible,
and replicatable way, please?

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri Aug 23, 2019 7:00 am    Post subject: Reply with quote  Mark this post and the followings unread

start FinalSun
under "Map Tools" select "Tool Scripts"
select "Day-Night-Loop.fscript"
answer all the following messagebox questions with "yes"
Open the Trigger menu and adjust all the Actions in the newly generated triggers, so they point to the right Trigger (there is a text telling you "select sunrise", which is pretty selfexplanatory)

done, you have a day night loop in your map

McPwny wrote:
and how to input the numbers for faster and slower ambient rate, and greater and more subtle ambient limits in a comprehensible,
and replicatable way, please?

all explained in the first few posts in this topic.
Lin Kuei Ominae wrote:
For example, you want to use a value of 0.625, you have to convert it into hex which is 3f200000 and then convert it into integer (using win calculator) which is 1059061760
Then use this value for the Set ambient rate/step action in the map.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
McPwny
Pyro Sniper


Joined: 29 Jan 2018

PostPosted: Fri Aug 23, 2019 11:14 am    Post subject: Reply with quote  Mark this post and the followings unread

again, i might just be the idiot here, but what i need is an explanation to use each of the three triggers in conjunction and to know exactly  
how to adjust all parameters of the lighting manually. its important its all done manually
_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Fri Aug 23, 2019 1:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Action 73 gives the target ambient lighting needed. Action 72 gives the rate at which the change should happen, smaller is faster. Action 71 gives the number of steps in which the change should happen. Typically one trigger is used to darken and another to lighten and those could be put in a repeating loop, those could also disable self and enable the other. For examples, take a look at the maps that use them in a text editor.

Attaching a quick tool to convert the ambient value to decimal value and vice-versa that gets used in map actions 71 and 72.


AmbientCalc.7z
 Description:

Download
 Filename:  AmbientCalc.7z
 Filesize:  9.82 KB
 Downloaded:  31 Time(s)


Back to top
View user's profile Send private message
Andrew84
Medic


Joined: 20 Dec 2020

PostPosted: Wed Aug 31, 2022 3:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

Day and night on Oceania

https://youtu.be/MLUA8sgCVmc?t=4734

Unfortunately, radiation leaves a trace behind. This ruins everything (((((((((((((

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [29 Posts] Mark the topic unread ::  View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum » Mapping Discussion
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.2460s ][ Queries: 17 (0.0161s) ][ Debug on ]