Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

silly shader question : curvature convex and concave.

231 views
Skip to first unread message

Sam Hodge

unread,
Jan 20, 2009, 3:19:47 AM1/20/09
to
I was wanting to calculate the convexity and concavity and curvature of
a subdivision surface

I found this handy page here:
http://studentpages.scad.edu/~mparro21/curvature/curvature.htm

but it didnt work out so well for a subdivision surface

I have tried replacing Dv(p) with Deriv(p,u) etc

but this hasnt made much difference to the outcome.

The idea is to drive the roughness of a shader with the inverse of the
convexness.

not a very novel idea, I know, shiny on the outside, catch dust on the
inside.

But it might just work, someone here at work mentioned it was used on
Wall-E.

This plugin shows the idea:
http://www.lightengine3d.com/downloads/plugins/curvature/testImages/statue1.jpg

Sam

Sam Hodge

unread,
Jan 20, 2009, 5:08:27 PM1/20/09
to
Sam Hodge wrote:
> I was wanting to calculate the convexity and concavity and curvature of
> a subdivision surface
>
> I found this handy page here:
> http://studentpages.scad.edu/~mparro21/curvature/curvature.htm
>
> but it didnt work out so well for a subdivision surface
>
> I have tried replacing Dv(p) with Deriv(p,u) etc
>

having thought about it , its pretty plain at u and v loop per subd patch.

Unless I compensate for the clock math, I will have to use another
parameterisation such as stangent[2] or s,t

But I think they will suffer from seams, any ideas would be greatly
appricieated

Sam

Moritz

unread,
Feb 4, 2009, 5:28:52 AM2/4/09
to
Hey Sam,

> I was wanting to calculate the convexity and concavity and curvature of
> a subdivision surface

you might want to look at Thomas Burge's curvature shader at
http://www.affine.org/curvature.html
It works with subdivs and what you intend is possible with the code in
there. I've done it myself in the past. :)

Beers (Coopers),

Moritz

Suruchi Sharma

unread,
Oct 1, 2012, 5:39:31 PM10/1/12
to
Hi

I was trying to find an example of a curvature shader online and I stumbled upon this post and several others liked from this. Although I still haven't been successful at figuring out how to do it.

Basically, I want to create a curvature shader in RSL and Slim and match the curvature values to color. Something similar to what is being explained here.
http://www.rhino3d.com/5/help/commands/curvatureanalysis.htm

Could I please get some help in this? Im really not sure how to go about in this.
Any help or suggestion would be greatly appreciated.

lollipo...@gmail.com

unread,
Oct 11, 2012, 2:47:51 PM10/11/12
to
Hi Sam, what does your shader source code look like and the resulting renders? That URL doesn't seem to work for me.

I've done one that can be seen here with source code and renders, not sure how it works with sub-d surfaces: www.christoso.com/demoreel/edge-detection.png

Christos

LollipopShaders

unread,
Oct 11, 2012, 3:11:15 PM10/11/12
to
Hey Moritz, I am curios to see that curvature shader - though the link isn't working for me. Do you know where else it might be or have the source code? What was in there that made it work for Sub-D's as well.

Thanks,
Christos

Sam Hodge

unread,
Oct 29, 2012, 7:33:55 PM10/29/12
to
I have ended up with a ray traced approach, using a disk like an
umbrella where rays are cast from the spokes of the umbrella paralell to
the stem of umbrella and measure if they are longer or shorter than the
stem itself.

longer : convex
shorter : concave

Bakes of these were handed over to texture artists.

sam
0 new messages