Jump to content

Voxel probe black?


photo

Recommended Posts

I have this very simple scene with a static plane, a static cube and a dynamic sphere. There's also a voxel probe volume.

However, after baking, the voxels don't seem to be correct. They're black on certain sides, causing undesired effect on sphere:

https://gyazo.com/ab581518ac58a8410bf10b6c764ee3fa

https://gyazo.com/a4a5d2059c7dcb56697ecd122181c802

How do you fix this?

 

All the best.

Link to comment

Sure thing, I uploaded it here:

https://www.dropbox.com/s/ozcxvz5os8dw8tz/test.upackage?dl=0

I reckon the probes go black because they're inside the cube? Perhaps propes that are invalid (inside geometry) shouldn't be included?

I noticed in the fox hole sample project, there's a lot of black probes as well which would cause undesired ambient lighting on dynamic objects for certain locations (near ground/walls etc). While increasing voulme may mitigate the effect, it isn't entirely solved that way.

I know there's this package for Unity that automatically places probes in optimal locations and guaranteed doesn't place probes inside geometry. Might be worth checking out for inspiration:

https://assetstore.unity.com/packages/tools/utilities/magic-light-probes-157812

All the best.

Edited by Rahnir
Link to comment

Hi Rahnir,

Thanks for the test scene.

Indeed in your case voxels resolution is not enough to provide a proper lighting information. Some voxels (black) are located inside the object and because they so big you can see the interpolation results (dark colors near the surfaces).

To avoid this you will need to bake lighting with increased voxels resolution (decrease the voxel size to get dense grid). It will take more time to bake and resulting texture would be bigger in size. So, you need to have at least 2-3 voxels  in the closest interval between your objects in a scene:

image.png

We also found a bug that can affect quality of the baked lighting: you need to uncheck Visibility Voxel Probe option to get a slightly better results in your scene:

image.png

 

Quote

I know there's this package for Unity that automatically places probes in optimal locations

That might work for the case when each probe represents a single volume, but we have all the voxels baked at once in a separate 3D texture and there is no way to place them in a specific locations.

Thanks!

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

Link to comment

Thanks for the pointers and suggestions for improving the scene.

Yeah Unity seems to work fundamentally different in regards to light probes. Having it their way has some benefits (like avoiding placement inside geometry). However, with such a system there's also some limits.

I created this very simple scene in Unigine:

57e211ac9c1dcf3c7540c5b84bf20087.png

In Ungine, the light probes affecting the dynamic cylinder works out of the box. In Unity, this would not work since each object is affected by a single light probe (in this case it would probably turn purple since it's between red and blue). For large objects (such as this cylinder), that would not be good since the ambient lighting is so different across the object.

However, they offer something they call Light Probe Proxy Volume (LPPV), which is a 3D texture created at runtime which samples the light probes at each point in the volume (with user authored density). That way, an object could be affected by multiple probes at runtime, while those probes still being user authored.

I think such a system could benefit Unigine also.

Another approach could be to discard voxels considered "invalid" prior to baking, and propagate values from nearby, valid cells after bake, until all cells are filled. That may be a better and easier solution to implement in Unigine.

Anyway, just some thoughts of a Unity game developer who is exploring Unigine for the first time.

 

All the best.

  • Thanks 1
Link to comment
×
×
  • Create New...