Tue, Oct 1, 5:42 PM CDT

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Oct 01 3:49 pm)



Subject: What use for shader nodes dNdv,dNdu,dPdv,dPdu?


bagginsbill ( ) posted Wed, 01 March 2006 at 11:12 AM ยท edited Thu, 26 September 2024 at 5:24 AM

Attached Link: http://www.affine.org/showk.html

file_330190.jpg

Out of curiosity I'm trying to find information about what possible use there is for these nodes. I've read the documentation. I am by no means "math challenged" and I understand what the documentation claims these nodes do. I believe the docs are lying, but I could be wrong. In any case, has anyone ever USED these nodes in a predictable way? I've searched high and low. The link points to some code used in the renderman toolkit, which I can read and understand just fine, BUT WHAT IS IT USED FOR???!?!?!?

In this render, I've used red * .1 * dNdv + green * .1 * dNdu to color a V3 face through the ambient channel. This looks like nonsense to me.

Did the developers of Poser just throw these in there because they were easy to implement or is there some useful known effects for these nodes?


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


anxcon ( ) posted Wed, 01 March 2006 at 11:21 AM

i would also like to know :P but then again, could've been thrown in, and uhh ya you know theres idiots in the world "woot! new nodes! buying P6!" wish they wouldve added arctan though :(


ockham ( ) posted Wed, 01 March 2006 at 12:02 PM

John Rickards has discussed the subject in depth at RDNA: http://www.runtimedna.com/mod/forum/messages.php?ShowMessage=134673

My python page
My ShareCG freebies


stewer ( ) posted Wed, 01 March 2006 at 1:47 PM

Attached Link: http://www.renderman.org/RMR/Publications/sig92.course21.pdf

dPdu and dPdv are tangent vectors, perpendicular to each other and the surface normal. In many RenderMan shaders these are used to construct a local coordinate system around the normal. dNdu and dNdv (derivatives of the normal over u and v) relate to the curvature of surfaces, the toon shader nod is using these values internally for outlines. Du and Dv express how big the current micropolygon is in uv space. It can be used to build self-antialising procedural patterns. There is a good introduction to antialiasing in shaders in http://www.renderman.org/RMR/Publications/sig92.course21.pdf The linked shader is also using the second derivatives of P for determining the curvature (Du(dPdu) and Dv(dPdv)) which are not available in Poser, but dNdu and dNdv could serve for similar purposes. Unfortunately, derivatives are in general a bit problematic with polygon objects (esp with triangles), they are much smoother when used with parametric surfaces like NURBS. One could maybe use these artifacts to create a wire shader (you can already see some wireframe patterns in bagginsbill's image).


Ajax ( ) posted Wed, 01 March 2006 at 3:31 PM

Attached Link: Surface imperfection material shader

iikuuk did some nice work using the dNdv and dNdu nodes to scrape paint off corners. Check the linked thread.


View Ajax's Gallery - View Ajax's Freestuff - View Ajax's Store - Send Ajax a message


Dead_Reckoning ( ) posted Wed, 01 March 2006 at 7:10 PM

Re: What use for shader nodes dNdv,dNdu,dPdv,dPdu? I went to eFrontiers Tech to see what they had to say. The dNdv and dNdu are the derivatives of the surface normal (N) over V and U respectively- we use 'em for the toon shader node as they define the apparent curvature of a surface, which you want to minimize (or at least regulate) when doing a toon shader (flatten out the surface -> it gets more toon-y.) dPdu and dPdv are tangents to the U and V normals; there's a nice illustration of what they represent at https://renderman.pixar.com/products/rispec/rispec_3_1/images/ The Renderosity thread that seems to go into the most depth is the "surface imperfection material shader" thread, in which the normal derivatives are being used to figure out where the sharp polygon edges are (based on dNdv and dNdu, the curvature indicators, being high for a given area), so that the texture can automatically get "weathered" there. Even there the tangent values don't get used; I'm sure there's something we could do with them but it might wind up involving refraction or something, some kind of wacky optics trick. The plain-vanilla Du and Dv values get used for procedural antialiasing and could also probably be used to do some kind of simple weathering or smoothing in 3D. We don't do a whole lot with them at the moment but some interesting ideas have been floated around. It looks like the group of you have fairly well answered the original question. I don't suppose anyone has a Node by Node linkup do they. These approaching 60 eyes arehaving a tough time following the connections in Iikuuk's Illustration. Cheers DR

"That government is best which governs the least, because its people discipline themselves."
Thomas Jefferson


bagginsbill ( ) posted Wed, 01 March 2006 at 9:32 PM

Fascinating. Thank you all for the info. I'll be reading these references for quite a while now, especially that sig92 course. Speaking of that, why oh why can't we just have the renderman language in a node?! And libraries of these user-defined nodes to snap together?!!! Ajax - thanks for that link to the rosity topic on imperfection shader. That's the kind of thing I was thinking of. I didn't study it real close yet but I will. I noticed that face_off speculated on the posibility of using a similar technique for SSS on highly curved geometry. DAMN HIM - I'm always treading in his wake. On the other hand, maybe he got distracted and never finished a useful shader. Or (shudder) it doesn't work well? Face_off??? Did you get the radius-of-curvature-SSS shader working or not?


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Wed, 01 March 2006 at 9:38 PM

And why am I getting that "wire shader" effect? I would think that I'd be sampling the virtual geometry normal's derivative (i.e. the smoothed out normals interpolated across the facet). Sampling the raw geometry seems useless to me. I want to track the apparent curvature that is visible in the actual render, not the literal piece-wise flat geometry of the model. Of course the dNdv is near zero for pixels inside a facet. So I ask again, how is that useful? The discontinuities produced in sampling the derivative of the normals on the raw geometry seems to me to make it useless.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.