Author Topic: Volume Material "Inside Volume" setting not working correctly.  (Read 790 times)

2023-02-02, 23:56:56

matsu

  • Active Users
  • **
  • Posts: 60
    • View Profile
I haven't used the volume material to create fog in a while, but the behaviour isn't what I remember. Maybe this is a bug.

When using a volume material, it can either be assigned globally (in the render setup) or locally to an object. The "On Surface" mode is quicker, but only works when the object containing the volume effect is seen from the outside. However, when setting it globally, it works no matter the camera placement. So far so good.

The other option is to use the "Inside Volume" setting, which is significantly slower (more than twice the render time in these examples!). It works as expected when set globally, albeit slow. It works when seen from outside the object when used locally. When seen from inside the object it does not render correctly! Afaik, it was previously possible to place the camera inside the volume, and render correct volume effects. Is this a bug??

It's also interesting to see the difference when applying noise. With "On Surface" the result looks... extremely poor. With "Inside Volume" it looks great. I remember it as being a lot more similar.

The scene here is a simple box (gray CRN PhysMat) with some holes in the roof, a daylight with CRN-sky, and an editable poly object containing the fog.

Win 11, CRN 9 HF1, Max2023
« Last Edit: 2023-02-03, 10:43:49 by matsu »

2023-02-03, 10:03:13
Reply #1

rowmanns

  • Corona Team
  • Active Users
  • ****
  • Posts: 1892
  • Corona for 3ds Max QA Team
    • View Profile
Hi,

Did you try the v10 dailies? Maybe this is already fixed by the following..

  • Corona now correctly resolves in which volume the camera lies. The camera can also be given a non-zero physical size, in which case the camera might lie only partially in one volume (e.g. camera half-submerged in water)

You can grab the latest daily from here: https://forum.corona-renderer.com/index.php?topic=38385.0

Cheersm

Rowan
Please read this before reporting bugs: How to report issues to us!
Send me your scene!

2023-02-03, 10:08:13
Reply #2

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8839
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Please don't mix bug reporting and feature requests in the single topic, we have dedicated boards for that. And don't forget general rule - one report/request per topic.

Regarding reported issues - volume not working when camera is inside volume object is expected and it always was like that, nothing changed in Corona 9, however this limitation has been lifted in Corona 10, you can already test it in the latest available daily build.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-02-03, 10:51:44
Reply #3

matsu

  • Active Users
  • **
  • Posts: 60
    • View Profile
Alright! Will give it a go.
I must be mistaken then (and my colleagues as well). Clearly remember being able to produce nice fog (with noise) when inside a volume, without using global volume material. It's a pain setting up an animation where the fog volume has to move with the camera.

Feature request removed. Will make a separate thread about that once I've tried Corona 10.

2023-02-03, 10:53:57
Reply #4

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12754
  • Marcin
    • View Profile
Yep, 2 cents from me, for clarity:

the behaviour isn't what I remember. Maybe this is a bug.
It was always like that in all versions of Corona before current V10 daily builds. You can easily check it by installing an older Corona version. :)
It is a "bug" or an "unexpected behavior", but now it is fixed and will be a part of Corona 10 release.

Quote
The other option is to use the "Inside Volume" setting, which is significantly slower (more than twice the render time in these examples!). It works as expected when set globally, albeit slow. It works when seen from outside the object when used locally. When seen from inside the object it does not render correctly! Afaik, it was previously possible to place the camera inside the volume, and render correct volume effects. Is this a bug??
"Inside Volume" is completely different than "On Surface". It creates a truly volumetric texture effect rather than just simulating how far a light ray can travel and uniformly scattering it.

Quote
It's also interesting to see the difference when applying noise. With "On Surface" the result looks... extremely poor. With "Inside Volume" it looks great. I remember it as being a lot more similar.
This is expected and there were no changes to this. "On Surface" literally applies the texture on object surface (like a flat texture). "Inside Volume" makes the texture truly 3D.

Quote
And while we're at it: Is it possible to add a "opacity" map slot which can be used for this kind of noisy effect? It would simplify things a lot.
Can you share an example where exactly you would like to use this option? Generally, if volumetric absorption is set to pure white, it will render as fully transparent in those areas.

Quote
Also, having the possibility to make the edges of the volume material fuzzy (i.e. make the edges dissolve/fade) would improve the usefulness of the material significantly. Would love to have an option for that.
We already have this logged as a feature request.
(Internal ID=299270723)

Quote
Oh, and having the "On Surface" mode automatically clipping the bounding object to the camera (never breaking the effect from being inside the volume) would be EXTREMELY useful.
I am not sure if I understand this correctly, but I think this is exactly what we have in the V10 daily builds - https://forum.corona-renderer.com/index.php?topic=38385.0

Other than that, please check out this video (at this time stamp we are showing how the "on surface" vs "inside volume" modes work, but I can recommend the whole 5-part series):

https://youtu.be/no0CVtlGF8E?t=2020




Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us