3__ Posted March 18, 2006 Share Posted March 18, 2006 Hi all, just a simple question: how to render a curve as a tapered tube, without renderman, vex-hair shaders or polywire... I just need a simple tube from a nurbs curve (tapered with a point attribute), to which I can apply any shader. thanks! -cpb Quote Link to comment Share on other sites More sharing options...
Mcronin Posted March 18, 2006 Share Posted March 18, 2006 Does it need to be a real tube? I mean do you need to see an open end? If not you can add a width point attribute to the curve to taper it ( making it a ribbon) and fake the appearance of a tube by manipulating the color over the width (s) of the ribbon. This example sets $PT*0.2 as a width attribute and has s converted to a vector feeding into the shader color output. You could use P and/or N and probably get better results and make it take your scene lights into account.... If you need a real tube... I don't know I guess a procedural DSO is probably the answer. Quote Link to comment Share on other sites More sharing options...
edward Posted March 18, 2006 Share Posted March 18, 2006 Can't you just use the Skin SOP with a Circle? Quote Link to comment Share on other sites More sharing options...
DaJuice Posted March 18, 2006 Share Posted March 18, 2006 Hey cpb, here's an example using the Sweep SOP. Basically using the point function in the sweep to grab the curve's per-point attrib. -Edit: If this is for a hair solution or something with lots and lots of curves then this is not efficient of course. tube.zip Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted March 18, 2006 Share Posted March 18, 2006 I think you can look into the Hair VOP shader to see how they render a curve to look somewhat like tube. I won't be looking as nice as a full-blown hair shader tho. But I think it should meet some very basic needs. Quote Link to comment Share on other sites More sharing options...
3__ Posted March 20, 2006 Author Share Posted March 20, 2006 thanks all. a modified hair shader will do for volume, sweep for close-up... although point() seems a bit fussy, will try to isolate an example later. -cpb Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.