:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: 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 Thu Jan 18, 2018 3:29 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 [20 Posts] 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

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

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

I got to memorize this.
_________________


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


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Sun Sep 09, 2012 3:40 pm    Post subject: Reply with quote

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

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
Commander


Joined: 01 Nov 2010

PostPosted: Sun Sep 09, 2012 10:26 pm    Post subject: Reply with quote

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.
_________________
OrangeNero wrote:
Me picking a fight? I know I am the greatest user alive here so everyone starts reading topics with my posts first and ignores the ones before and after.

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

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

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
Cyborg Soldier


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sun Apr 16, 2017 2:23 pm    Post subject: Reply with quote

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:  1543 Time(s)

AV1.gif



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


Joined: 28 Jun 2015
Location: formerly Damascus, Syria

PostPosted: Sun Apr 16, 2017 2:31 pm    Post subject: Reply with quote

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 C&C S. True Supremacy.

YouTube Channel: https://www.youtube.com/channel/UCRJ32BRTY8UPF49Ilq3rNDw
Skype: TAK02 Supreme CnC Mods
Twitter: TAK02 @SupremeCnCMods
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
Tuc0
Cyborg Soldier


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sun Apr 16, 2017 3:19 pm    Post subject: Reply with quote

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:  1526 Time(s)

truck.png



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

Anim1.gif



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

anim2.gif



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


Joined: 28 May 2013

PostPosted: Sun Apr 16, 2017 3:47 pm    Post subject: Reply with quote

Redefine ExtraXXXLight also in map and try.

Back to top
View user's profile Send private message
Tuc0
Cyborg Soldier


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sun Apr 16, 2017 4:22 pm    Post subject: Reply with quote

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

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
Energy Commando


Joined: 28 May 2013

PostPosted: Mon Apr 17, 2017 5:40 am    Post subject: Reply with quote

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
Cyborg Soldier


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Mon Apr 17, 2017 11:57 am    Post subject: Reply with quote

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

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
Cyborg Soldier


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Mon Apr 17, 2017 5:58 pm    Post subject: Reply with quote

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

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
Cyborg Soldier


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Sat Jul 08, 2017 6:15 pm    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [20 Posts] 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

Wildcard SSL Certificates
[ Time: 0.1820s ][ Queries: 18 (0.0225s) ][ Debug on ]