Jump to content

Lost camera exposure settings during migration


photo
Go to solution Solved by silent,

Recommended Posts

Posted

Hello everyone,

I'm back with another mgiration bug. Maybe we should have a dedicated migration topic :). After migrating our scenes, we witnessed a drastic regression in our visual quality in night or underground scenes. Apparently our min/max luminance setting was lost when migrating our scenes.

If I'm not mistaken, exposure min/max are set inside the world through the line "exposure_min_luminance" and "exposure_max_luminance", though I don't see any documentatino detailing this in 2.18.1. However in 2.19.1 I see here that we have console commands "render_exposure_min_luminance" and "render_exposure_max_luminance" (Console — Documentation — Unigine Developer) that seem to be responsible for holding the information we had. I generally tend to believe the parameters in the world file are equals to the console commadns at our disposal, but it mightb e a mistake on my part.

Our world still have the old parameters, but it's not interpreted correctly apparently. We updated our worlds by opening them with Unigine 2.19.1. By manually renaming these parameter like in the given 2.19.1 documentation, it works.

What did we do wrong during migration ? Or is it something missing from the upgrade process ?

Posted

Hi Kevin,

Quote

 I generally tend to believe the parameters in the world file are equals to the console commadns at our disposal, but it mightb e a mistake on my part.

The actual value of any of the rendering parameters are being taken from the .render preset file that is associated with the specific .world. If there is no .render file is being set, the values are taken directly from the .world file. You can also force change these values via logic after world is being loaded.

Just to confirm: after migrating from 2.18.1 to 2.19.1.2, does the .world file still use the old naming?

  • exposure_min_luminance
  • exposure_max_luminance

And renaming these parameterst o:

  • render_exposure_min_luminance
  • render_exposure_max_luminance

fixes the exposure issue?

It may be indeed a migration bug, but our QA team is currently can't reproduce it.

In general, the exposure migration only renames the parameter and does not change engine behavior, so a manual rename should resolve the issue.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted (edited)

I have not looked if we had a .render file, but we certainly use our worlds parameters.

Given a world with these parameters:

image.png.36ecae80d88717e926e6c4c3fd887100.png

And also these:

image.png.31c82d50438e78cdd35245bf7b5b5005.png

If I open it in my 2.19.1 editor, the settings panel shows:

image.png.996674bd3cfa59b2f3d3481d8f577555.png

Note that Exposure, Exposure Mode and adaptation are correct. Only luminance isn't loaded properly. I can confirm these parameters to be correctly loaded in our 2.18.1 version (since we tweaked them manually). I can also confirm to be clearly able to see the difference in runtime :).


Now, if I change manually the xml world file. 

image.png.71fc00e1a8a4e81b23850c91944c7b40.png

And reopen it:

image.png.010914c14569a8aaf5c77d18eba9676b.png

It works again !

These are the only actions I did. I did not load anything else, didn't load any other engine between the screenshots.

Edit: Okay @silent you were right, these parameters were actually not used in 2.18.1. If I try to change their values and open the worldin 2.18.1 they are not taken into account.
It means our exposure was set elsewhere, and this "elsewhere" is not overriding our exposure values anymore. That's weird. Or are these values "default values" ? And the default values are 0.46/4.0 in 2.18 and -5/10 in 2.19 ?

Edit2: Found it, we had hidden somewhere a .render file that dodged migration, and Unigine never seemed to complain about it. And in it the exposure min/max haven't been migrated. Sorry @silent, it was a missing upgrade on our side.

Edit3: Sorry, I realized something while opening my worlds. Is it normal to have the meta file indicating our world is 2.19.0.3, and our world has this parameter:

image.png.d0960ff7110c5ba966c322ec77b22592.png

Is there an upgrade problem ?

Edit4: You can guess from the amount of edits I have done that this baffles me. If in 2.18.1 I have this setting :

image.png.830873ead13cbb27bf9a1b097ec4a611.png

Shouldn't min/max luminance be loaded from the world, not the .render file ? (Because those settings are actually in the render file, not the world).
And in 2.19.1 It seems to correctly prioritize the world's settings, not the render file. Did you fix anything at that level by any chance ?
 

Edited by K.Wagrez
  • Solution
Posted
Quote

 meta file indicating our world is 2.19.0.3, and our world has this parameter:

Not quite sure how that can happen, since migration is changing world version after. Also version will change automatically when you will save the .world file once inside Editor.

Quote

Shouldn't min/max luminance be loaded from the world, not the .render file ?

The logic for loading and applying render settings (including exposure) is now consistent across all settings. If a world file has an associated .render file, all settings are loaded from that file. Mixing sources (some from a preset and some from the world file) can make it difficult to achieve the intended visual results and will result in constant confusion from artitsts.

If you don't really use presets, just remove .render file from .world:

image.png

But if you are using multiple .render settings you need to adjust exposure parameters in the multiple presets.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted
9 hours ago, silent said:

Not quite sure how that can happen, since migration is changing world version after. Also version will change automatically when you will save the .world file once inside Editor.

The logic for loading and applying render settings (including exposure) is now consistent across all settings. If a world file has an associated .render file, all settings are loaded from that file. Mixing sources (some from a preset and some from the world file) can make it difficult to achieve the intended visual results and will result in constant confusion from artitsts.

If you don't really use presets, just remove .render file from .world:

image.png

But if you are using multiple .render settings you need to adjust exposure parameters in the multiple presets.

Thanks!

Can we use multiple render settings, if each file contain part of the desired configuration ?

Because we currently have a mechanism that loads render settings (focusing only on shadows distance) dynamically, and we saw that adaptative exposure seem to reset each time we load new render settings (it ends up with the right value, but the adaptative process seem to start fro mscratch every time we use loadSettings). Is it normal ? Should we do it in a different way ?

Posted
Quote

Can we use multiple render settings, if each file contain part of the desired configuration ?

Not really, each .render preset contains the whole set of rendering parameters to apply (no inheritance or overrides possible).

If you need to change only 1 single parameter like shadows distance you can simply switch it via API when required.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...