orientation of line rendering

   2151   4   0
User Avatar
Member
125 posts
Joined: April 2014
Offline
How can one change the orientation of the surface of a line being rendered?

it seems it tries to orient towards the camera by default.
User Avatar
Member
258 posts
Joined:
Offline
This has to do with the way that mantra handles curve rendering. I believe that the curve is projected to screen space and then rendered with a width based on an attribute or a default value. If you want to start rendering it other than that chances are you will need to write a custom shader that does some sort of displacement. As an example, it is pretty easy to make a shader that displaces the surface to look like a tube, rather than a ribbon.
User Avatar
Member
125 posts
Joined: April 2014
Offline
thanks for the explanation sIOthrop
I just ended up doing a sweep along the curve
User Avatar
Member
7741 posts
Joined: Sept. 2011
Offline
The vector attribute ‘orient’ will determine the direction the ribbon faces. Note that this is a vector (3-float) and not the usual 4-float quaternion attribute used for particles/instances. Use of this attribute can make for efficient rendering of flat surfaces such as grass or leaves.
User Avatar
Member
125 posts
Joined: April 2014
Offline
jsmack - exactly what I needed
  • Quick Links