Jump to content

$width And Mantra


Recommended Posts

how Mantra use $WIDTH for curve rendering?

let say I have a field of grass which edge is displaced, I wanna add noise to the edge during Mantra rendering, can noise be added to polystrips' edge ?

I only know $width as a point attribute.

If you have 'enough' points on a line you can have a 'noisy' line.

like: ($PT / $NPT) * rand($PT) * $my_noise_strength

But maybe I misunderstand: "field of grass which edge is displaced".

Georg

BTW: there is also a $ORIENT - which allows you to twist the grass ...

Edited by rdg
Link to comment
Share on other sites

how Mantra use $WIDTH for curve rendering?

let say I have a field of grass which edge is displaced, I wanna add noise to the edge during Mantra rendering, can noise be added to polystrips' edge ?

And you can attach a displacement shader which displaces the grass toward the centerline... Not sure off the top of my head, but I expect it would include dPds

Link to comment
Share on other sites

And you can attach a displacement shader which displaces the grass toward the centerline... Not sure off the top of my head, but I expect it would include dPds

Not really. There are U and V definied during render a curve WIDTH. You can refer to it in both shading context and displacement context as you would refer to position on a normal surface.

Link to comment
Share on other sites

simply said: I just don't wanna have geo grass in my scene/view coz it's too heavy to work smooth, thats' why I need it only in Mantra, also noisy curve needs enough points which again means too heavy scene, what I wanted is to pass width(you right RDG) attribute to Mantra and use also to displace the edge of the polystrip

Link to comment
Share on other sites

This all should work fine, yeah.

You might also be interested in the "orient" vector attribute. This defines the orientation of the ribbon which might work well for grass (since grass is flat, unlike hair which has a circular profile). Often you can just generate N and swap it to orient in an Attribute SOP.

You can use s and t global variables for the parametric coordinates for the sake of surface and displacement.

Also, you should be able to use the Fur system to perform render-time population of grass blades from a few guide blades.

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...