• Dear visitors,

    The email issue has been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

QUESTION Day - Night transition for Objects

NANKAI

New Member
Hi all,

Please to be here! I recently started messing around with tracks in Blender and was just wondering for those tracks with day - night, how do I go about setting for these objects to react with the day - night transitions when I export the kn5? Do I set them in Blender or ksEditor? All it does now is the objects will become super bright and white at night time, eg. buildings etc...

Any one knows why? Thanks!

P.S. I'm using existing mods to mess around in Blender and just want to use them for learning/personal purposes, so rest assured I won't modify the files and share them publicly.
 

fughettaboutit

aka leBluem
lights are entirely made by CustomShadersPatch with a"ext_config.ini".
AC does not know about more than the car lights.
There is no way to set lights up in blender or ksEditor.
 

NANKAI

New Member
1.png
2.png
Wow, thanks for these useful resources! These will definitely come in useful in time to come.
However, now I still have the problem of the objects showing like this at night - see attached pictures.

1st image is showing how it's supposed to be.

2nd image is the one I exported after messing around in Blender (with other objects, not this building in particular, and all buildings are like this when going into night cycle)

Yes project is from another known track, not a scratch build, BUT I'm doing this solely for learning purposes and not publishing anywhere.

What am I missing still?

Here is the code in ext_config if it helps to understand the problem:

[MATERIAL_ADJUSTMENT_52]
ACTIVE = 1
DESCRIPTION = building window 2
VISIBILITY_LEVEL = 1
MATERIALS = building_a
KEY_0 = ksEmissive
VALUE_0 = 255, 248, 232, 0.02
VALUE_0_OFF = 0, 0, 0
KEY_1 = ksAlphaRef
VALUE_1 = -193
VALUE_1_OFF = ORIGINAL
KEY_2 = ksDiffuse
VALUE_2 = 0
VALUE_2_OFF = ORIGINAL
CONDITION = NIGHT_WINDOW

Thanks for the help!
 

fughettaboutit

aka leBluem
this might actually be a long lived bug, do you have "Merge Meshes"
on here? Turn off!
upload_2020-6-17_10-34-26.png

to prevent this, uses two different materials...
 

NANKAI

New Member
[MATERIAL_ADJUSTMENT_0]
ACTIVE = 1
DESCRIPTION = main track lights
VISIBILITY_LEVEL = 0
MATERIALS = street_lamp_01_bright, street_sub_lampglass_02
KEY_0 = ksEmissive
VALUE_0 = 255, 248, 232, 0.5
VALUE_0_OFF = 0, 0, 0
CONDITION = NIGHT_SMOOTH

[LIGHT_SERIES_0]
ACTIVE = 1
DESCRIPTION = main track lights spots
VISIBILITY_LEVEL = 0
MATERIALS = street_lamp_01_bright
COLOR = 255, 248, 232, 0.032
OFFSET = 0,0,0
CLUSTER_THRESHOLD = 32
SPOT = 225
RANGE = 100
FADE_AT = 450
FADE_SMOOTH = 100
SPOT_SHARPNESS = 0.1
DIRECTION = NORMAL
RANGE_GRADIENT_OFFSET = 0.5
DIFFUSE_CONCENTRATION = 0.88
CONDITION = NIGHT_SMOOTH

This is the main lights config, funny thing is both untouched kn5 and my 'modified' kn5 has the same brightness in terms of track lightings. It's only the track side buildings and objects that become like picture 2 in my previous post.
 

fughettaboutit

aka leBluem
RANGE = 100
is too high i guess, try someting like 30 or 25
also make the ksDiffuse value in ksEditor for that buildings use somethin like 0.3 or 0.2
 

fughettaboutit

aka leBluem
better try this:

[MATERIAL_ADJUSTMENT_52]
ACTIVE = 1
DESCRIPTION = building window 2
VISIBILITY_LEVEL = 1
MATERIALS = building_a
KEY_0 = ksEmissive
VALUE_0 = 255, 248, 232, 0.02
VALUE_0_OFF = 0, 0, 0
CONDITION = NIGHT_WINDOW

no need for other stuff for windows, but use it for things that should glow very much like your street lights: (ksAlphaRef=-193 makes glow a bit nicer)

[MATERIAL_ADJUSTMENT_0]
ACTIVE = 1
DESCRIPTION = main track lights
VISIBILITY_LEVEL = 0
MATERIALS = street_lamp_01_bright, street_sub_lampglass_02
KEY_0 = ksEmissive
VALUE_0 = 255, 248, 232, 0.5
VALUE_0_OFF = 0, 0, 0
KEY_1 = ksAlphaRef
VALUE_1 = -193
VALUE_1_OFF = ORIGINAL
CONDITION = NIGHT_SMOOTH
 

NANKAI

New Member
So is it safe to say the issue of how track side objects react to day night cycle (like on pic 2 where it doesn’t go dark like a normal building would) is all dependent on the config.ini instead? ksEditor and Blender don’t affect this parameter?
 

fughettaboutit

aka leBluem
what you set in ksEditor for maybe ksAmbient and ksDiffuse will be used in game off course

to be able to set emissive dynamically, we just manipulate ksEmissive in config, no need to change others, if you set normal values with ksEditor,
ksAmbient=0.3 - ksDiffuse=0.3 - ksSpecular=0
is like a standard you can apply to pretty much anything by default

note: if you dont know, use this after you did successfully exported a track, it will save all the shader settings in a "...fbx.ini" file (the persistence file)
and then load all your changes next time you would load the same ...fbx
(you can also edit this file "...fbx.ini", its only text, replacement-function of your editor helps a lot)

upload_2020-6-17_14-8-39.png
 

NANKAI

New Member
what you set in ksEditor for maybe ksAmbient and ksDiffuse will be used in game off course

to be able to set emissive dynamically, we just manipulate ksEmissive in config, no need to change others, if you set normal values with ksEditor,
ksAmbient=0.3 - ksDiffuse=0.3 - ksSpecular=0
is like a standard you can apply to pretty much anything by default

note: if you dont know, use this after you did successfully exported a track, it will save all the shader settings in a "...fbx.ini" file (the persistence file)
and then load all your changes next time you would load the same ...fbx
(you can also edit this file "...fbx.ini", its only text, replacement-function of your editor helps a lot)

View attachment 5523
Very useful tips mate thanks! And boy I've found the issue:

All the parameters regarding config of track lights, buildings lights aside, the main issue was somehow the light mesh for the building windows are ON THE OUTSIDE instead of EMITTING FROM THE INSIDE. I just found this out after a bunch of troubleshooting via the config.

Now for the main point, what we see in pic 2 is the lights for the building being situated ON THE OUTSIDE. Is there anyway you'll possibly know how to make them inside the building? Could it be a wrong process in exporting the existing kn5 to fix? I’m using a kn5converter file that launches command prompt and extracts it.

Once again I thank you so much for your free help and patience for bearing with me. I'm indeed humbled and learning new things each day.
 
Last edited:
Top