Announcement

Collapse
No announcement yet.

renderable spline option

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

  • renderable spline option

    hey guys,

    i have recently discovered that there is an option to set a spline to renderable
    via selecting the shapenode and adding an vray attribute "renderable"
    It just works perfectly, but here comes my problem.

    I would like to set this attribute to maybe 200 splines and this way
    it is not functioning. It would be cool to have a solution
    like the vray object properties, which you an add to multiple objects and
    controlling them with just one object property "node" ( color , width etc.. )

    Is there any workaround for my problem?

    regads

  • #2
    You can already find exactly this option under Create->V-Ray->Create Renderable Curve. (At least in the nightlies.)

    Comment


    • #3
      Yes,

      Haven't you tried to use Create -> V-Ray -> V-Ray renderable curve -> Apply single VRayRenderableCurve to selection?
      I'm not sure what is the first version that this feature is available. But I don't think it have been added recently.
      What version are you using?
      V-Ray developer

      Comment


      • #4
        that sounds cool.

        right now i'm using version 2.20.01 as far as i can see...

        regards

        Comment


        • #5
          naik: Do you have the option or not?
          V-Ray developer

          Comment


          • #6
            no, there is no option for this.

            Click image for larger version

Name:	vray.jpg
Views:	1
Size:	102.2 KB
ID:	849688

            Comment


            • #7
              If you need this feature urgently then you can write to our support at vraymaya @ chaosgroup.com and they can give you access to the night builds.
              The other option is to write a script which setup the options per shape.
              V-Ray developer

              Comment


              • #8
                Thanks for your fast reply...
                i have just tried to build a script for this purpose, but honestly, my script skills are
                ridiculous. I thought that there are some scripts for that purpose on the net but i couldn't find anything yet.
                If i can't find anything i will write to the support and hopefully i can use the nightly build.

                Here is a script which i tried to modifiy, but i still get syntax errors
                BIG CREDITS to DJX ( David Johnson )
                global proc renderspline() {

                string $shapes[] = eval("listRelatives -s `ls -sl`");

                }

                for($s in $shapes) {

                vray addAttributesFromGroup $s vray_nurbscurve_renderable 0; -checkBox 1;

                evalDeferred("setAttr "+ $s +".vrayNurbsCurveRenderable 1");
                evalDeferred("setAttr "+ $s +".vrayNurbsCurveMaterial 1");
                evalDeferred("setAttr "+ $s +".vrayNurbsCurveTesselation 1");
                evalDeferred("setAttr "+ $s +".vrayNurbsCurveStartWidth 1");
                evalDeferred("setAttr "+ $s +".vrayNurbsCurveLockEndWidth 1");
                evalDeferred("setAttr "+ $s +".vrayNurbsCurveEndWidth 1");
                }
                }










                best regards

                Comment


                • #9
                  Try this one instead:
                  Code:
                  string $shapes[] = eval("listRelatives -s `ls -sl`");
                  string $s;
                  for($s in $shapes)
                  
                  for($s in $shapes) {
                      if (nodeType($s)!="nurbsCurve")
                          continue;
                      print("adding renderable curves to "+$s+"\n");
                      vray addAttributesFromGroup $s vray_nurbscurve_renderable 1;
                      evalDeferred("setAttr "+$s+".vrayNurbsCurveRenderable 1");
                      evalDeferred("defaultNavigation -ce -source VRayMtl1 -destination "+$s+".vrayNurbsCurveMaterial");
                      evalDeferred("setAttr "+$s+".vrayNurbsCurveTesselation 0.1");
                      evalDeferred("setAttr "+$s+".vrayNurbsCurveStartWidth 1");
                      evalDeferred("setAttr "+$s+".vrayNurbsCurveLockEndWidth 1");
                      evalDeferred("setAttr "+$s+".vrayNurbsCurveEndWidth 1");
                  }
                  If you want to connect another material you can replace VRayMtl1 with something else.
                  If you don't want to change some attribute you can comment the line using two forward slashes ( '//' ).

                  Good luck
                  V-Ray developer

                  Comment


                  • #10
                    You are a genius petrov. Thanks a bunch for your support.
                    It works perfectly...

                    I really appreciate it.

                    best regards

                    Comment


                    • #11
                      I have the stable version of the nightlies installed, and this menu option is not there either. So it must be in the nightlies only.

                      I tried the above script, and while it works fine on a single curve, the more curves you have, the more warnings it spits out. The warnings seem to increase exponentially in fact, based on the number of curves you are running it on. As I write this, it has been chugging away at 1000 curves for about two hours now with no end in sight. I need to make 10,000 curves renderable.

                      I am getting the warning
                      Code:
                      // Warning: line 1: 'vrayMtl1.outColor' is already connected to 'curvesShape1.vrayNurbsCurveMaterial'.
                      over and over for every curve, repeatedly.

                      I'm thinking the problem is perhaps with all the evalDeferred calls. Is there a faster way to do this besides just letting it run for days?

                      Comment


                      • #12
                        It might be because of the evalDeferred() thing; perhaps a normal eval() will work fine...

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

                        Comment

                        Working...
                        X