mantra cancer

   6713   20   2
User Avatar
Member
19 posts
Joined: Nov. 2012
Offline
Sphere +distant light. Why does it look so ugly?

Attachments:
mantra.PNG (85.8 KB)
maya.PNG (20.1 KB)

User Avatar
Staff
3455 posts
Joined: July 2005
Offline
works for me
Houdini 14.0.228

Attachments:
dist_sphere.hip (136.6 KB)
dist_sphere.jpg (32.4 KB)

Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
19 posts
Joined: Nov. 2012
Offline
rotate your light. works for me without rotation too

Attachments:
dist_sphere_105.hip (141.1 KB)
mantra2.PNG (32.8 KB)

User Avatar
Member
12468 posts
Joined: July 2005
Offline
It's related to Ray Bias (on the ROP). You can raise the Bias or Subdivide the sphere to prevent self-shadowing intersections of this kind.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
19 posts
Joined: Nov. 2012
Offline
jason_iversen
thank you!

But why they keep this value so low by default? What possible artifacts if increase it too much?
User Avatar
Staff
2591 posts
Joined: July 2005
Offline
Evgeny_rus
Sphere +distant light. Why does it look so ugly?

Please see the attaced PDF which explains the cause of this in detail.

Attachments:
shadow.pdf (431.9 KB)

User Avatar
Member
19 posts
Joined: Nov. 2012
Offline
mark
thank you for good explanation!
User Avatar
Member
1694 posts
Joined: March 2020
Offline
This is called the “terminator artifact”, and other renderers usually compensate for it. It involves adjusting the bias on a per-sample basis. (I even have some mental ray shader code somewhere from the stone age that does it – as the computation had to be redone after bump mapping.)
Imre Tuske
FX Supervisor | Senior FXTD @ Weta FX

qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
User Avatar
Member
1694 posts
Joined: March 2020
Offline
The wonder of the internets: I found the code in a blog post about 7 years old. (There's both code and explanation there.) Perhaps the same thing could be done in a mantra shader.

https://blueriviera.wordpress.com/2008/07/31/how-to-recalculate-shadow_tol/ [blueriviera.wordpress.com]

The reason I needed this for was, although mental ray compensated for this artifact correctly, if you wrote a bump shader you had to recalculate the tolerance by hand, otherwise this arfiact reappeared. (I remember it annoyed the hell out of me at the time.)
Imre Tuske
FX Supervisor | Senior FXTD @ Weta FX

qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
User Avatar
Member
1694 posts
Joined: March 2020
Offline
Evgeny_rus
jason_iversen
thank you!

But why they keep this value so low by default? What possible artifacts if increase it too much?

The value has to be as low as possible, or else you'll get another artifact, namely shadows getting “detached from objects”, something like this:

http://www.digitalrune.com/Portals/0/Blog/Files/11/218/Windows-Live-Writer-Shadow-Acne_D184-clip_image007_2.jpg [digitalrune.com]
Imre Tuske
FX Supervisor | Senior FXTD @ Weta FX

qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
User Avatar
Member
599 posts
Joined: May 2011
Offline
riviera
The wonder of the internets: I found the code in a blog post about 7 years old. (There's both code and explanation there.) Perhaps the same thing could be done in a mantra shader.
Oh, God. My past comes back to haunt me.
Halfdan Ingvarsson
Senior Developer
Side Effects Software Inc
User Avatar
Member
1694 posts
Joined: March 2020
Offline
halfdan
riviera
The wonder of the internets: I found the code in a blog post about 7 years old. (There's both code and explanation there.) Perhaps the same thing could be done in a mantra shader.
Oh, God. My past comes back to haunt me.

Mine too, if that's any consolation.

Btw, how about implementing this thing in mantra then? Or would it cause trouble elsewhere?
Imre Tuske
FX Supervisor | Senior FXTD @ Weta FX

qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
User Avatar
Member
19 posts
Joined: Nov. 2012
Offline
riviera
The value has to be as low as possible, or else you'll get another artifact, namely shadows getting “detached from objects”, something like this:

http://www.digitalrune.com/Portals/0/Blog/Files/11/218/Windows-Live-Writer-Shadow-Acne_D184-clip_image007_2.jpg [digitalrune.com]

Thank you
User Avatar
Member
620 posts
Joined: Nov. 2013
Offline
riviera
halfdan
riviera
The wonder of the internets: I found the code in a blog post about 7 years old. (There's both code and explanation there.) Perhaps the same thing could be done in a mantra shader.
Oh, God. My past comes back to haunt me.

Mine too, if that's any consolation.

Btw, how about implementing this thing in mantra then? Or would it cause trouble elsewhere?

Yes, mantra should do some thing avoid this. Render as subdivide is not able in some situations.
User Avatar
Member
1743 posts
Joined: March 2012
Offline
Sorry to bump an old thread like this, but in case anyone finds this thread in the future, the issue was fixed in Houdini 15.0.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
4515 posts
Joined: Feb. 2012
Offline
ndickson
Sorry to bump an old thread like this, but in case anyone finds this thread in the future, the issue was fixed in Houdini 15.0.

Neil Dickson FTW 8)
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
1743 posts
Joined: March 2012
Offline
pusat
ndickson
Sorry to bump an old thread like this, but in case anyone finds this thread in the future, the issue was fixed in Houdini 15.0.

Neil Dickson FTW 8)
It wasn't me who fixed it! I was just going through my… *cough*700+*cough*… open Firefox tabs, and found this thread, so I figured it'd be worth posting an update.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
4515 posts
Joined: Feb. 2012
Offline
ndickson
pusat
ndickson
Sorry to bump an old thread like this, but in case anyone finds this thread in the future, the issue was fixed in Houdini 15.0.

Neil Dickson FTW 8)
It wasn't me who fixed it! I was just going through my… *cough*700+*cough*… open Firefox tabs, and found this thread, so I figured it'd be worth posting an update.

SESI FTW 8)

Is this a recent fix? If not, how did you know it was fixed? You have 700 tabs open in Visual Studio?
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Staff
2591 posts
Joined: July 2005
Offline
pusat
ndickson
pusat
ndickson
Sorry to bump an old thread like this, but in case anyone finds this thread in the future, the issue was fixed in Houdini 15.0.

Neil Dickson FTW 8)
It wasn't me who fixed it! I was just going through my… *cough*700+*cough*… open Firefox tabs, and found this thread, so I figured it'd be worth posting an update.

SESI FTW 8)

Is this a recent fix? If not, how did you know it was fixed? You have 700 tabs open in Visual Studio?

https://www.sidefx.com/index.php?option=com_journal&Itemid=213&page=index&journal=default&view=FULL&logfile=ALL&icon=mantra&version=ALL&buildstart=&buildend=221&perpage=20&search=vm_smoothP&find=Find [sidefx.com]
User Avatar
Member
1743 posts
Joined: March 2012
Offline
pusat
Is this a recent fix? If not, how did you know it was fixed?
Well, I knew it had been fixed because a few of us had strong opinions about it, and were eager to see the results when someone decided to tackle it. It's been fixed since the first public version of 15.0.

The way the fix works is not 100% obvious that it'd work in most cases, but it seems to do well unless you have geometry close to a low-res curved surface. For example, two boxes with point normals near each other may get odd shading artifacts, but who has boxes with point normals? *cough*cough*

It's also apparently in the What’s new in Houdini 15: Lighting, shading, and rendering [sidefx.com] page, but I didn't know that until I checked the commit logs. :wink:

You have 700 tabs open in Visual Studio?
Well, I might, if Visual Studio didn't lose my newly-opened tabs whenever it crashes, and boy, is VS2015 ever crashy.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
  • Quick Links