zbrush cavity shader in houdini?

   52490   35   1
User Avatar
Member
510 posts
Joined:
Offline
Fixed it. The shader is Gather Vop is blocked if the ray bounce level is more than level 1.

The render time issue remains though. Hopefully Sesi will look at this and show us the way of the Gather Vop

cheers

S
Edited by - Nov. 22, 2008 16:24:07
User Avatar
Member
243 posts
Joined: Oct. 2007
Offline
Alright!!
thanks alot Serg!
I'll give it a try!
JR Gauthier
Character Animation & Design
www.turboatomic.com
http://www.vimeo.com/user2847970 [vimeo.com]
User Avatar
Member
510 posts
Joined:
Offline
wait!

here's a new one with the render time issue fixed
Turns out that If I put the lighting model and occlusion bits into an “if then block” the render time goes to expected levels… why? I dunno… afaik the gather vop shouldnt know anything about this part of the shader.

cheers
s

Attachments:
DirtTest_V3.hip.rar (66.5 KB)

User Avatar
Member
243 posts
Joined: Oct. 2007
Offline
Thanks man!
I downloaded v3!
JR Gauthier
Character Animation & Design
www.turboatomic.com
http://www.vimeo.com/user2847970 [vimeo.com]
User Avatar
Member
941 posts
Joined: July 2005
Offline
Hey! You guys have been busy!

Nice looking shader there, Serg! I haven't looked at your attachment yet (I'll try to get to it today), but it looks real nice.

@jrgauthier: Here's your fixed file. The problem: you were trying to access the attribute as a local variable, where none existed. The MeasureSop was indeed creating the attribute with the name you gave it (“CURV”), but it desn't create a attribut->localvar mapping for you so you can't use it as a variable later on in the chain. The way around this is to create the attribute plus its variable mapping before using the MeasureSOP (which simply overwrites its value). Then it's available as a variable (as well as an attribute) lower in the chain.

Hope that made sense (it's been a long weekend and I'm probably not making much sense). Anyway. Have a look at the attached fixed version and see if it clears things up for you.

Cheers!

Attachments:
measure_curvature.jpg (34.2 KB)
measure_test_failed_157_mario.hipnc (47.4 KB)

Mario Marengo
Senior Developer at Folks VFX [folksvfx.com] in Toronto, Canada.
User Avatar
Member
243 posts
Joined: Oct. 2007
Offline
Yeah I've been busy thanking people!

Thanks for the explanations on the measure sop Mario!
It makes way more sense now! This is gonna be useful to know for futur experiments!

thanks alot!
JR Gauthier
Character Animation & Design
www.turboatomic.com
http://www.vimeo.com/user2847970 [vimeo.com]
User Avatar
Member
47 posts
Joined: Dec. 2008
Offline
hi all,

i'm trying to understand how serg managed to get surface curvature from an object according to the info he referenced here
(http://www.tomcowland.com/mentalray/tc_curvature/index.html [tomcowland.com])

i have downloaded sergs shader and been trying to figure it out, but could anyone simplify this shader for me or explain how to actually get the curvature this way?

out of all the methods on this post, sergs seems the best because it works on low poly models.

oh and btw, the simplest solution is to just grab displacement values from the displacemnt shader (assuming you're using a map from zbrush) and bring those into the surface shader…
to a man with only a hammer every problem looks like a nail.
User Avatar
Member
47 posts
Joined: Dec. 2008
Offline
Hey Serg, or anyone else really…

any idea why this cavity shader doesn't work on sub-d surfaces?

even in your attached hip file, turn the object into a (render-time) sub-d surface… and boom… shader broken
to a man with only a hammer every problem looks like a nail.
User Avatar
Member
89 posts
Joined: April 2008
Offline
We're talking about Serg's curvature shader?

I think there's one thing missing. You need to normalize the normal returned inside the gather loop. So in the example file, jump inside the if1 loop, then inside the vgather2 loop, and add a normalize node between subinput1->__N and add1->input1. Does that work?

artzor
Hey Serg, or anyone else really…

any idea why this cavity shader doesn't work on sub-d surfaces?

even in your attached hip file, turn the object into a (render-time) sub-d surface… and boom… shader broken
User Avatar
Member
47 posts
Joined: Dec. 2008
Offline
hey mrice,

normalizing the first input of the vgather doesn't really work. it works partially but it just results in noise… as opposed to a constant brown colour.

so it seems that's only part of the problem
to a man with only a hammer every problem looks like a nail.
User Avatar
Member
47 posts
Joined: Dec. 2008
Offline
aaah, ok, SOLVED

if you normalize the first input in the vgather loop
AND
normalize the global normals, right at the beginning of the vop network it works perfectly

thankyou serg, and thankyou mrice!!!
to a man with only a hammer every problem looks like a nail.
User Avatar
Member
47 posts
Joined: Dec. 2008
Offline
hey guys,

found another issue in Serg's dirt shader…. the sampling / noise differs per frame.

even on a static object.

quite a production show stopper… any ideas?
to a man with only a hammer every problem looks like a nail.
User Avatar
Member
47 posts
Joined: Dec. 2008
Offline
ah nevermind… was just a sampling issue…

spent too much time in shaders, forgot about the actual render settings :p
to a man with only a hammer every problem looks like a nail.
User Avatar
Member
678 posts
Joined: July 2005
Offline
Does anybody know why Serg shader it doesn't work in H11 ? What changed ?

I rewrited it fast to VEX and in H10 it works but not in H11. Original VOP version also doesn't work
User Avatar
Member
183 posts
Joined: Nov. 2008
Offline
Swann_
Does anybody know why Serg shader it doesn't work in H11 ? What changed ?
Confirm, it doesn't work in H11, i have spend 2h trying to figure it out, but no luck! Serg, we need your help! :wink: Or somebody…
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
User Avatar
Member
330 posts
Joined: July 2005
Offline
Did anyone debug Serg's shader for H11? It would be soooo useful, but I have no idea where to begin.

(learning how it works and fixing it are very different challenges)
  • Quick Links