Announcement

Collapse
No announcement yet.

proxy object axis problem

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

  • proxy object axis problem

    hi, im trying to use object replacer script to replace a carpark full of cars with vray proxy versions. however, when i convert one of the cars to a proxy and tick the "automatically create proxy" button, the car is replaced, but the axis moves to the origin. this means when i replace the cars with the proxies, they are all miles from their original positions.

    can anyone tell me why the proxy script moves the axis to the origin when it replaces? is this a bug?

    anyone think of a fix?

    (just for your information there are 6 different types of car, in 5 diffrent colours each and approx 220 instances.) i hope to create 5 proxies, vary the mso materials and replace the instances.

    we spent all day writing a script that takes the grouped cars, collapses them to single editable meshes with mso materials and keeps the name and axes from the groups, but are now stuck at the last hurdle.

    im starting to consider just replacing all the cars by hand!

    thanks all.

  • #2
    Not exactly sure how to solve your problem, but its probably a good idea to create the Vray proxy objects from their original scenes, and then place them in your scene, rather than placing objects, then creating proxies.

    That way, you can have a library of vray proxies that you can quickly place in scenes as needed. Thats what we're trying to do with our car library.

    Comment


    • #3
      if i was starting from scratch i would certainly do that.. im only trying to do it this way due to the fact the cars have already been placed...

      anyone got any suggestions about the axis problem tho? someone from chaosgroup? is this a deliberate feature or a bug?

      Comment


      • #4
        I have a small script (unfinished for general public) that creates a proxy from a object in a scene (but at the origin so that it has the axis ok). The problem of the vray proxies is that they always have the origin in 0,0,0 so it best to align the object at this position before creating the proxy and then resposition in the previous position (thats what the scripts does). If you want the script pm me. And i will clean it up a bit.

        Best regards,
        Daniel Santana
        Daniel Santana | Co-Founder / Technical Director
        You can do it! VFX
        Lisbon/Porto - Portugal
        http://www.ycdivfx.com

        Comment


        • #5
          Here is a quick fix:
          Code:
          mtOCVRM_obj = selection[1]
          -- saves object position
          mtOCVRM_pos = mtOCVRM_obj.pos
          -- set object to 0,0,0
          mtOCVRM_obj.pos = [0,0,0]
          -- saves the original object in case things go wrong
          saveNodes mtOCVRM_obj (mtOCVRM_dir + mtOCVRM_objName )
          -- converts to mesh and then to vraymesh
          macros.run "Modifier Stack" "Convert_to_Mesh"
          macros.run "VRay" "vrayMeshExport"
          mtOCVRM_obj = getnodebyname ("vrayproxy_"+mtOCVRM_objName) exact:true ignorecase:true
          mtOCVRM_obj.name = mtOCVRM_objName
          -- saves a new file with the proxy
          saveNodes mtOCVRM_obj (mtOCVRM_dir + "x_" + mtOCVRM_objName)
          -- deletes old object
          delete mtOCVRM_obj
          -- xrefs new vray object
          mtOCVRM_xrefFName = (mtOCVRM_dir + "x_" + mtOCVRM_objName + ".max")
          mtOCVRM_xref = xrefs.addNewXRefObject mtOCVRM_xrefFName mtOCVRM_objName
          -- set xref to the old position
          mtOCVRM_xref.pos = mtOCVRM_pos
          hope i didn't make any mistake has this is part of a script i was working in. it save when had to this to lots o onyx on a file
          Daniel Santana | Co-Founder / Technical Director
          You can do it! VFX
          Lisbon/Porto - Portugal
          http://www.ycdivfx.com

          Comment

          Working...
          X