Obi Official Forum

Full Version: Color
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,

I am currently taking my head on an effect that I do not understand.

In editor mode, I get a fluid that suits me on the color side. It's a beautiful green (with very little transparency).... a bit slim like ghostbuster if you see the thing :p
When I compile the game and launch it I end up with a sort of translucent and darker green... yuck... well, it's not ugly, but nothing to do with the expected effect.

I did several tests and the one that seems the most representative is by simply trying to make white. In editor mode I get a suberde milky white (very slight transparency) and in runtime I end up with greyish water! (very transparent and gray).

Among the different tests:

- Change the transparency parameters (alpha of the disk or of the obi particle renderer: no effect.

- Modification refraction / transparency on the obi fluid renderer, besides the fact that it impacts me all the fluids of the scene at the same time, the effect is far from ok. Play on the other parameters (reflection/metalness...) without success.

On the parameter side, in URP, I have of course the same configuration (defined by default) between the two modes. I turned off all other post-process graphical processing (volume, etc....).
I even changed the color of the skybox to have white and limit the edge effects. I also have remove all the other light sources, nothing to do... of course the directional light is white...

So my questions are:

- How do I ensure that the color in execution mode is identical to the color obtained in edit mode ("game" window) ?

- How I remove the transparency without having to play on the obi fluid renderer which affects all the fluids ?

thank you !

D.
(08-05-2022, 05:38 PM)Domtav Wrote: [ -> ]Hello,

I am currently taking my head on an effect that I do not understand.

In editor mode, I get a fluid that suits me on the color side. It's a beautiful green (with very little transparency).... a bit slim like ghostbuster if you see the thing :p
When I compile the game and launch it I end up with a sort of translucent and darker green... yuck... well, it's not ugly, but nothing to do with the expected effect.

I did several tests and the one that seems the most representative is by simply trying to make white. In editor mode I get a suberde milky white (very slight transparency) and in runtime I end up with greyish water! (very transparent and gray).

Among the different tests:

- Change the transparency parameters (alpha of the disk or of the obi particle renderer: no effect.

- Modification refraction / transparency on the obi fluid renderer, besides the fact that it impacts me all the fluids of the scene at the same time, the effect is far from ok. Play on the other parameters (reflection/metalness...) without success.

On the parameter side, in URP, I have of course the same configuration (defined by default) between the two modes. I turned off all other post-process graphical processing (volume, etc....).
I even changed the color of the skybox to have white and limit the edge effects. I also have remove all the other light sources, nothing to do... of course the directional light is white...

So my questions are:

- How do I ensure that the color in execution mode is identical to the color obtained in edit mode ("game" window) ?

- How I remove the transparency without having to play on the obi fluid renderer which affects all the fluids ?

thank you !

D.

Hi!

This sounds like a color space issue, since fluid colors aren't purposelmodified in editor vs the build (the color buffer is just an ARGB32 render target).

What platform are you building for, and what are your build settings?
(10-05-2022, 09:36 AM)josemendez Wrote: [ -> ]Hi!

This sounds like a color space issue, since fluid colors aren't purposelmodified in editor vs the build (the color buffer is just an ARGB32 render target).

What platform are you building for, and what are your build settings?

Hi !

Thanks for answer

The platform is PC, Max & Linux Standalone, and i foresee to target also android

The build setting ? There are lot of setting... You talk about color buffer, so i suppose you ask about graphics settings ?
I left the default values, well I don't think I touched them, such as implemented in the unity example project for URP.
I put in PJ the configuration

In other option, other settings, color space = linear 

NB : Beautify in URP renderer is an asset which help in configuration of multi optimisation graphics. Activation or desactivation is without effect on this color problem.
NB 2 : I have no idea where the color buffet is configured :/  On the other hand, if this comes from an inconsistency in the color settings between view mode and runtime, why does this only impact OBI fluid? White on other objects in the scene are perfectly white, as are other green & co objects, including transparent objects.

I add also in PJ the particleShaderURP used by the emitter (lot of error , but it's the original file provided in the asset, I didn't touch it)

Thanks,

Regards,
D.
(14-05-2022, 03:02 PM)Domtav Wrote: [ -> ]The build setting ? There are lot of setting... You talk about color buffer, so i suppose you ask about graphics settings ?

Hi!

I meant File->Build Settings->Player Settings, there you will see color space and graphics API options, which are the ones I'm interested in.

(14-05-2022, 03:02 PM)Domtav Wrote: [ -> ]I add also in PJ the particleShaderURP used by the emitter (lot of error , but it's the original file provided in the asset, I didn't touch it)

These are implicit truncation warnings, shouldn't have any noticeable impact on the end result. Different graphics APIs treat precision modes differently, so for instance assigning a float value to a half variable will result in an implicit truncation.

Also, if you could share a couple screenshots of how the fluid looks in-editor and how it looks in your build, that would be very helpful. Otherwise I can only guess!


kind regards,
(16-05-2022, 10:23 AM)josemendez Wrote: [ -> ]Hi!

I meant File->Build Settings->Player Settings, there you will see color space and graphics API options, which are the ones I'm interested in.


These are implicit truncation warnings, shouldn't have any noticeable impact on the end result. Different graphics APIs treat precision modes differently, so for instance assigning a float value to a half variable will result in an implicit truncation.

Also, if you could share a couple screenshots of how the fluid looks in-editor and how it looks in your build, that would be very helpful. Otherwise I can only guess!


kind regards,

Hi !

In PJ the picture with setting and result
Yes yes, I know, the fluid is "strange", but unfortunately, after several hours of trying to make a real fluid that does not look like a jet of lumps, I gave up. The gun barrel is quite small (radius 0.1 of the emitter disk) and I may have played with the resolution or the scale of the solver, impossible to find a better situation than... that...  (obi particle renderer always between 1.5 and 1.7, emitter scale 1).  I will do with... but the color.... brrrrr..... this asset kill my time and... me.... :p

NB : check the option vulkan settings srgb write mode change nothing.

Regards,
D
(16-05-2022, 05:01 PM)Domtav Wrote: [ -> ]Yes yes, I know, the fluid is "strange", but unfortunately, after several hours of trying to make a real fluid that does not look like a jet of lumps, I gave up.

Using a particle-based engine (which discretizes fluid as small ellipsoidal particles) to simulate a thin, long, continuous fluid jet is going to be challenging for obvious reasons: increasing fluid resolution will allow the jet to be thinner (since particles are smaller), but will also make it more prone to gaps in the flow (because well, particles are smaller!) as well as decrease performance (because you need more particles to simulate the same volume of fluid).

An eulerian approach would be much better suited to this use case, imho.

(16-05-2022, 05:01 PM)Domtav Wrote: [ -> ]NB : check the option vulkan settings srgb write mode change nothing.

Based on your screenshots, this looks like a lighting issue, not really related to color space. The gamma curve for both screenshots seems identical, but the fluid seems unlit in the standalone one. So far I haven't been to reproduce anything similar, tried both on Mac and Windows using the same settings you shared.

Only potential culprit that I can think of right now is that you're using different render pipeline settings for standalone and editor. Check that the pipeline asset you're using in the Quality for standalone builds in PC,Mac&Linux is the intended one:


[Image: 3MuKleA.png]

If this isn't the cause either, would it be possible for you to send the project to support(at)virtualmethodstudio.com so that I can take a closer look? thanks!
(17-05-2022, 08:20 AM)josemendez Wrote: [ -> ]Using a particle-based engine (which discretizes fluid as small ellipsoidal particles) to simulate a thin, long, continuous fluid jet is going to be challenging for obvious reasons: increasing fluid resolution will allow the jet to be thinner (since particles are smaller), but will also make it more prone to gaps in the flow (because well, particles are smaller!) as well as decrease performance (because you need more particles to simulate the same volume of fluid).

An eulerian approach would be much better suited to this use case, imho.


Based on your screenshots, this looks like a lighting issue, not really related to color space. The gamma curve for both screenshots seems identical, but the fluid seems unlit in the standalone one. So far I haven't been to reproduce anything similar, tried both on Mac and Windows using the same settings you shared.

Only potential culprit that I can think of right now is that you're using different render pipeline settings for standalone and editor. Check that the pipeline asset you're using in the Quality for standalone builds in PC,Mac&Linux is the intended one:


[Image: 3MuKleA.png]

If this isn't the cause either, would it be possible for you to send the project to support(at)virtualmethodstudio.com so that I can take a closer look? thanks!

Hi

"An eulerian approach would be much better suited to this use case, imho."
That is to say ? how do we do this? Do you have examples or do you know of a typical youtube link that explains this in detail? thank you

Settings quality is ok, the truth is out there

here https://anonfiles.com/Xej8Q7h9y3/TestOBI...itypackage a test project for obi with the problem
By moving (and only that) the files under a single directory to facilitate the export, the behavior to change. It's still ok in runtime mode in the editor but in runtime it's now OK for white ( ??? with strange black point ) and KO for green and red. I have the impression that it increases the transparency effect (when the green flow passes in front of the white area it becomes green again).

Thanks,

Regards,

D.
(19-05-2022, 09:56 AM)Domtav Wrote: [ -> ]"An eulerian approach would be much better suited to this use case, imho."
That is to say ? how do we do this? Do you have examples or do you know of a typical youtube link that explains this in detail? thank you

Very roughly speaking, all physics simulators belong to one of these two categories:
  • Eulerian = grid based.
  • Lagrangian = particle (or body) based.

Lagrangian fluid simulators -such as Obi- discretize fluid as small bodies (usually particles) that move around. To get a thin stream, you need particles to be very small. Small particles means you need more particles to represent the same volume, and finer temporal resolution to avoid gaps in the stream. Using both high temporal and spatial resolution results in bad performance.

Grid based simulators divide space into static cells, and each cell contains a given amount of fluid. Fluid can flow from a cell to any adjacent cells. Since cells are continuous, this means there can be no spurious gaps in the fluid even if it moves fast or temporal resolution is low. However, you still need fairly high spatial resolution (that is, small cells) to get the stream to be thin.

There's few fully eulerian (grid based) 3D fluid simulators out there, most are either lagrangian or hybrid (particle-in-cell methods). I do work on an eulerian solver, but it's 2D. I don't think it will cover your use case, but just so that you know what a cell-based simulator looks like:
https://assetstore.unity.com/packages/to...tor-203795

Imho, your options are:
A) live with the limitations of a particle-based engine.
B) write your own cell-based solution.

If you decide to go with B, some resources:
https://developer.nvidia.com/gpugems/gpu...lation-gpu
https://github.com/Scrawk/GPU-GEMS-3D-Fluid-Simulation

(19-05-2022, 09:56 AM)Domtav Wrote: [ -> ]By moving (and only that) the files under a single directory to facilitate the export, the behavior to change. It's still ok in runtime mode in the editor but in runtime it's now OK for white ( ??? with strange black point ) and KO for green and red. I have the impression that it increases the transparency effect (when the green flow passes in front of the white area it becomes green again).

Not sure I understood this, do you mean that simply moving the files to a different directory changed rendering behavior? That's strange to say the least. Will try to reproduce this and get back to you, thanks for the repro project!
Thank you for these explanations.

I fear that my brain is not compatible to implement solution B :p Rodar ojos 

I confess to not really understanding the subtleties of all this, and it was frankly not the goal I had in mind when buying the asset honestly :p

I hope that in the light of the test project you will find the place where I messed up Sonrisa

Edit: oops, so much for me, during my tests I had reactivated the checkbox on the obi particle renderer for the white simulation. But it is not suitable at all because it causes lumps. In the transmitted project, you must tick the checkbox and find the initial test.

Regards,

D.
(19-05-2022, 01:25 PM)Domtav Wrote: [ -> ]Thank you for these explanations.

I fear that my brain is not compatible to implement solution B :p Rodar ojos 
I confess to not really understanding the subtleties of all this, and it was frankly not the goal I had in mind when buying the asset honestly :p

Hi!

No worries, just wanted to let you know that better approaches exist for this very specific use case, even though the limitations of a particle-based method are rather mild specially if you consider its running in realtime. Nevertheless fluid simulation is always very expensive and the closest you want to get to the real thing, the more expensive/complex it gets.


(19-05-2022, 01:25 PM)Domtav Wrote: [ -> ]I hope that in the light of the test project you will find the place where I messed up Sonrisa

I tested your package on 3 different computers (Mac Pro mid-2013 with macOS 10.15.4, Core i9 mid 2021 with Windows 10, Core i5 2017-ish with Windows 10), to no avail. Made sure to set the color mode to linear. In-editor and standalone builds look identical in all of them:

[Image: KgdbJsz.png]
[Image: KRLiu3x.png]

No idea why you get a different color in the standalone build, what's even weirder is that moving folders around affected the outcome. Would it be possible for you to test in a different computer, just to rule out some system-wide weird cause?

(19-05-2022, 01:25 PM)Domtav Wrote: [ -> ]Edit: oops, so much for me, during my tests I had reactivated the checkbox on the obi particle renderer for the white simulation. But it is not suitable at all because it causes lumps. In the transmitted project, you must tick the checkbox and find the initial test.

Figured it out and deactivated particle rendering for the white one before testing, no worries Sonrisa
Pages: 1 2