// Graphic setting possible in the GDB or SCN ( IBL probe ? )

pixsim

Registered
I'm currently testing different settings in the SCN or GDB file that affect the track's atmosphere.
Well, we have the geographic location and the fog.
But in the GMotor Viewer, under the IBL Visualize section and then Override Probe, there are settings available, such as flatambient, which I find more natural in terms of lighting.

My question is: is it possible to enable this setting with a line of code in the SCN or GDB file?

If you have any idea
 
flat-ambient is not available to activate outside of debug mode. However there is a way to emulate flat-ambient:

First, flat-ambient is basically a result of "IBL probing" color and lighting in a shade-less surrounding scene, which will result a "flat" looking lighting effect.

And this "flat-ambient" can be achieved by creating a cube with all its "3d normal" pointing up, which will make this cube shade-less. Then placing "PROBE_POSITION" in the middle of this cube in SCN, this will force IBL ambient probe to sample only the "flat shade-less faces" inside this cube, which effectively results "flat-ambient".

For reference, in earlier version of IOM(isle of man) & Dundrod, I have used this technique to achieve soft (lighter) shadow & shading effect. Though later I have improved and used more complex techniques to create better ambient color & lighting, since purely flat-ambient has quite few shortcomings that can look wrong in different sunlight or weather condition.

There are also a few thing you may need to take care of:
- All faces normal in the cube must be facing inward, so they can be "sampled" by "the probe" from inside.
- There is a minimum size limit of cube, if the cube is too small, the probe cannot "see" it.
- You may want to remove the TOP face (cover) of the cube, so that at least the sky color can be sampled by the probe, otherwise you may get wrong scene color/lighting under different weather condition.
- You will need to correctly set a color texture for the cube, which is going to affect overall flat-ambient color. This could take a lot time to do correctly.



I have attached example files (as I made for IOM) for "flat probe" cube & texture, you can give it a try.

Below is the probe position code you need to add to SCN file:

Code:
Instance=flat_probe_cube
{
  MeshFile=flat_probe_cube.gmt CollTarget=False HATTarget=False LODOut=(10.0)  // set 10m LOD, just enough for sampling
}

IRRADIANCE_PROBE=IRRAD_GLOBAL
{
  INFLUENCE_RANGE = (0.0)
  PROBE_POSITION = (0, 5, 0)  // cube 10x10m, bottom at 0m, place at 5m in the middle
}

Note, the cube is placed at 0,0,0 world position, with a 10x10m in-game size (probe should placed in the center of it). You may move it elsewhere so it will not be visible to driver, and adjusted "PROBE_POSITION" accordingly so that it sits inside cube.

And if you want to sample little more/less of sky, just change the second position value (make sure to reload track after changing to take effect). For example, for a bit more sky, change "(0, 5, 0)" to "(0, 7, 0)".

flat_probe.jpg


Good luck
 

Attachments

Last edited:
Hello SVictor. Thanks a lot . To share your High level of expertise. Your tips are welcome. I have seen than we could have something better . But i don t know how. It s great we have you on the forum
 
Back
Top