renderable curve attribute startWidth

Hi

I am trying to render a load of curves but can’t seem to control the width properly…

The default 0.2 startWidth is too big so i set it to .05 but it rounds back to 0.1. This is still too big but if i set it to anything below .05 it just renders a 1 pixel line..

Cheers,

Nathan

Only the UI control is doing the rounding. The exact value is used internally.

ok so the only way i can get around this is to setAttr.

If i set it manually through the ui to .03 and the call getAttr “curveShape2.vrayNurbsCurveStartWidth” i get 0.
If i setAttr i get .03

This seems specific to this attribute as my precision for everything else is set to 3 decimals.

Also is there a way to apply the one renderable curve attr to multiple curves?

Cheers

in this case it actually looks like the maya ui is rounding it internally too

what I did in that case was I just took multiply/divide node and connected its out x to the start width, and used the precision value there instead. Its not very good though…

Strange, it works all right in my tests here (no “rounded” bug).

What version do you use ?

I have this :
VRay stable build 19902 (2.10.01) from Mar 10 2012.
Maya2012 64bit Subscription Advantage Pack, Service Pack1 (released on 2012/01/26)
Windows Seven 64bit.

Strange, in Maya 2012 it is doing the rounding only for display purposes. I did change the control to show 3 digits after the point though. You can download the nightly build from today if you have problems with this.

Hi sorry for the lat reply… we are using maya 2011.

Is there a way to add renderable curve attrs to multiple curves in a similar way to vrayDisplacement node?

Cheers

No, unfortunately; for the moment you’ll have to script it, but it’s on the “to do” list.

Best regards,
Vlado

renderable curve script

Ok no worries… already did.

usefull for anyone with the same prob…


import maya.cmds as mc
import maya.mel as mm

sel = mc.ls(sl=True)
for s in sel:
    shape = mc.listRelatives(s, shapes=True)[0]

    print shape

    try:
        mc.getAttr ("%s.vrayNurbsCurveRenderable"%shape)
    except Exception:
        mm.eval("vray addAttributesFromGroup %s vray_nurbscurve_renderable 1"%shape);

    mc.setAttr( "%s.vrayNurbsCurveRenderable"%shape, 1)
    mc.setAttr( "%s.vrayNurbsCurveTesselation"%shape , .1)
    mc.setAttr( "%s.vrayNurbsCurveStartWidth"%shape , .03)

Nathan, you know my python is shocking. Trying to run the above code and get an # Error: unexpected indent #

EDIT: Don’t worry, being abit dopey.

Actually in the latest builds we added a renderable curves set, so you can just connect all the curves that you want to render and control them from one place.

Best regards,
Vlado