Announcement

Collapse
No announcement yet.

renderable curve attribute startWidth

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Only the UI control is doing the rounding. The exact value is used internally.
    V-Ray/PhoenixFD for Maya developer

    Comment


    • #3
      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

      Comment


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

        Comment


        • #5
          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...
          Dmitry Vinnik
          Silhouette Images Inc.
          ShowReel:
          https://www.youtube.com/watch?v=qxSJlvSwAhA
          https://www.linkedin.com/in/dmitry-v...-identity-name

          Comment


          • #6
            Originally posted by AardmanCGI View Post
            If i set it manually through the ui to .03 and the call getAttr "curveShape2.vrayNurbsCurveStartWidth" i get 0.
            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.

            Comment


            • #7
              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.
              V-Ray/PhoenixFD for Maya developer

              Comment


              • #8
                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

                Comment


                • #9
                  No, unfortunately; for the moment you'll have to script it, but it's on the "to do" list.

                  Best regards,
                  Vlado
                  I only act like I know everything, Rogers.

                  Comment


                  • #10
                    renderable curve script

                    Ok no worries... already did.

                    usefull for anyone with the same prob...
                    Code:
                    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)

                    Comment


                    • #11
                      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.
                      Last edited by MartinB; 05-10-2012, 10:32 AM.

                      Comment


                      • #12
                        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
                        I only act like I know everything, Rogers.

                        Comment

                        Working...
                        X