Jump to content
KiLa

Rendering lines and width attribute

Recommended Posts

Is there a way to define the ‘width’ attribute, that Mantre uses when rendering lines, inside shader/material? I tried to export one from shader but Mantra doesn't seem to use it. Only way (so far) that does seem to work is to define it outside shader.

Cheers
-k

Share this post


Link to post
Share on other sites

as far as i know it has to be a point attribute. shader is not related to this.

Share this post


Link to post
Share on other sites

you can't define it in the surface shader as at that point it's already too late (surface shader is executed upon ray intersection with the curve, and in order to get that intersection width had to be already known)

what you can do however is one of the following:

- create width attribute wide enough to cover all your needs and then in surface shader use parametric s coordinate to control the opacity of the shader, therefore you can make the curve appear thinner than it is so essentially give you ontrol to define any thickness lower than the initial width

- create hengine curve procedural that will set the width attribute on the geometry at rendertime 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×