cycles smoke rendering on different layers, shadow problem.

Hi!

I am having a problem with smoke rendering. I have a domain with a volume + emitter shader (for an explosion), environment + sun light, and a plane.

Now, if I render all on one layer I have no problems. If I try to render the explosion on one layer and the plane on another one, the shadow projected on the plane which is INSIDE the domain is not shown in the render. This image may explain better what I mean:

As you can see, the first image is missing almost all the shadow. You can see just a bit of it, while the part which is INSIDE the domain of the smoke isn’t showed. The second image is the render done in one layer, which haven’t got the problem.

Does anyone know if this may be a but or if there is a solution to it?

I am using blender 2.77a on win10 64bit

Thanks for any help!

Attachments



“explosion on one layer and the plane on another one”: that would be Domain Material which casts shadows on one layer (some light source too here?) and Plane (some light source too?) on another.
My question would be -how shadow from Domain Material is supposed to know it has to drop on the Plane which is not there?
To tell the truth i’m rather surprised seeing something at all on that plane; i’d assume this is a bug.

@eppo: I think Bernardo is using Render Layers, which he didn’t mention explicitly.

I just did a quick test:

When the Domain is NOT intersecting with the plane, it works fine:
stc=1
(Note the shadows cast on the upper part of the right image – everything looks right.)

However, when there is an intersection between the Domain and the plane, you get undesirable results:
stc=1

This is either a bug or just an attribute of Smoke that hasn’t been nailed down yet.

The .blend file is pretty basic, but if you can download mine here: IntersectingSmokeCompositeTest.blend (566 KB)
Just move the Domain and Emit above or below the plane and F12 render to see the differences in result.

Yea… I was kind of lost envisaging situation…
However while this is a bit different scanario devs are in position this should be expected adding “probably possible, but quite difficult”.

thanks for the answers! Indeed, the problem is when the plane is intersecting with the domain. Sometimes this can be worked around, still I think this can be a big problem in several scenes, so I hope they can fix it!

I don’t quite understand what’s going on yet – I think what’s going on here isn’t that the shadows aren’t being CAST properly when there’s an intersection, rather that an object INSIDE the Domain will not RECEIVE the shadows properly. Apparently it has to be outside of the domain to receive shadows like we expect.

This reminds me of early smoke releases when a camera INSIDE the Domain couldn’t see the smoke properly. Eventually, that was fixed. I wonder if this issue is caused by a similar thing. I will think about what sort of .blend file would help in reporting this. (I imagine they already know about this, but I can’t find much other than the link from Eppo.)

benu, look at the screens in the top message.

in the one with the smoke you can see the shadow of the smoke properly rendered. That screen has been rendered on a single render layer.

The screen without the smoke is the plane rendered on a different render layer. It is a normal procedure to have render elements on different layers, so that you have more control in compositing.

The problem is that the shadow here is not rendered properly. You can see a little tip of the shadow. The rest is cut off, exactly where there is the domain of the smoke.

The problem arise when the domain is intersecting with the object (in this case the plane) where the shadows are being casted. Moving the plane out of the domain will allow the shadows to be rendered properly. Still this isn’t always possible.

I don’t know if this time I was able to explain myself…

I see what you’re saying. I just think it isn’t about “intersection” as much as it is about “being inside” the domain. Any object inside the domain will not receive proper shadows from smoke in that domain, while an object outside the domain will continue to work properly. I’m working up a more thorough .blend file to submit to the bug tracker now. I’ll post it here for you to look at it first.

the strange thing is that objects inside the domain do receive proper shadows, as long as they are rendered in the same render layer as the domain. So there is something else going on here.

Exactly. It has to do with objects inside the Domain when enabling and disabling layers for Render Passes. Here’s the render output of my sample .blend file:

http://blender.mostlydocumentary.com/movies/smokeShadows.gif

The bottom section is the two-pass composite, whereas the top section is a standard render without any passes.

Notice that once the pink plane crosses the “Domain Threshold”, the plane INSIDE the threshold stops receiving shadows from the smoke, though it does still receive shadows from other objects (the Suzanne). Also, it still receives smoke shadows on the parts of the plane that are OUTSIDE the domain.

Note that when you’re using Adaptive Resolution (I’m not in this example) you only get this problem within the adaptive bounds, so it can work inside the Domain, for a while, if you’re using Adaptive Resolution.

Check out the .blend file here. I’ll probably submit this to the bug tracker if there isn’t anything else to add.
smokeShadows.blend (906 KB)

Incidentally, this happens not only with smoke but with any volume-based material. Once you’re inside the domain, you won’t receive any shadows from what’s happening in the domain.

thanks a lot for the research. If you could add this to the bug tracker would be great. Or maybe I can add it… I never did it but I can learn :smiley: Just let me know! However I think developers should look into this