Hi all,
Can anyone tell me how to get a line primitive to render so it is always pointed toward camera?
I have a line with some noise on it, which I have given a width attribute to determine width, but when rendered I think is being shaded like its flat like a ribbon. I want it as if the line is a very tall cylinder with a tiny diameter, but I don't want to poly wire it or anything to keep it light. I have been playing with the orient attribute to try to get this but so far no luck. I took my camera point using the point sop created an orient vector attribute which for each point points directly to camera but still it renders as if it were a ribbon, with light and dark areas. Am I using the orient attribute incorrectly?
Line rendering attributes
9908 3 2- Dean_19
- Member
- 319 posts
- Joined:
- Offline
- Dean_19
- Member
- 319 posts
- Joined:
- Offline
So I found a work around, which was to just apply a constant shader to it to eliminate the light/dark areas. I would still like to know how to achieve this just using the orient attribute or by some other method?
With the constant shader I also still have the line doing strange stuff in places, like the end of one of the lines splits when rendered for some reason.
Any ideas?
With the constant shader I also still have the line doing strange stuff in places, like the end of one of the lines splits when rendered for some reason.
Any ideas?
- rdg
- Member
- 401 posts
- Joined:
- Offline
http://forums.odforce.net/index.php?/topic/6155-width-and-mantra/page__view__findpost__p__41001 [forums.odforce.net]
I somehow seem to remember that you sometimes require an Up vector …
Often you can just generate N and swap it to orient in an Attribute SOP.
I somehow seem to remember that you sometimes require an Up vector …
this is not a science fair.
- peliosis
- Member
- 175 posts
- Joined: July 2005
- Offline
I'm not sure if this can be achieved.
Initially, without any additional attribs, curves render facing the camera.
This can be easilly checked by creating custom orient attribute, poitning towards camera.
It changes nothing.
Also if I correctly understand curve rendering they don't use up vector, just orient and curve direction.
Orient is an up vector for curve rendering.
Rendering a curve of the same pixel width would require perspective copmensation.
The problem arises because mantra builds a real 3d curve, not simulate it as post effect.
There is no way you could sweep a line along a curve and avoid twisting.
It will always shade as real ribbon, unless you destroy the normals or put a constant shader which doesn't use them.
Initially, without any additional attribs, curves render facing the camera.
This can be easilly checked by creating custom orient attribute, poitning towards camera.
It changes nothing.
Also if I correctly understand curve rendering they don't use up vector, just orient and curve direction.
Orient is an up vector for curve rendering.
Rendering a curve of the same pixel width would require perspective copmensation.
The problem arises because mantra builds a real 3d curve, not simulate it as post effect.
There is no way you could sweep a line along a curve and avoid twisting.
It will always shade as real ribbon, unless you destroy the normals or put a constant shader which doesn't use them.
-
- Quick Links