Announcement

Collapse
No announcement yet.

Post Translate toggle displacement/subdivision

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

  • Post Translate toggle displacement/subdivision

    It seems there's no simple boolean Post Translate Python equivalent of the "Displacement" and "Subdivision" overrides in the VRay render globals (and possible some other toggles too)? Instead - comparing vrscene files with these settings on/off - VRay adds/removes nodes from the vrscene according to how these options are set in the render globals.

    I'm trying to override a bunch of render settings Post Translate and wonder about the safest way of mimicking how vray interprets these settings?
    Last edited by Dan Andersen; 07-08-2018, 01:23 AM.

  • #2
    No, there isn't. These two switches change the behavior of the translator.
    If they are enabled we create GeomDisplaceMesh and GeomStaticSmoothedMesh, if they are not enabled we just export GeomStaticMesh plugins.

    If you want to disable displacement/subdivisions for a particular instance you could do something like:
    Follow the mesh parameter in the GeomDisplacedMesh or GeomStaticSmoothedMesh should give you the mesh object (something like displaced.get("mesh")).
    After you have the node and mesh plugins in python variables it should be possible to just re-assign this to the original Node::geometry parameter or just to create a new Node which references the GeomStaticMesh plugin and delete the old Node plugin.

    If you want to add displacement/subdivisions to a node it would be a lot more complex. I'm not sure it is even possible at the moment.

    Lets us know if this explanation helps.
    Last edited by t.petrov; 10-08-2018, 08:49 AM.
    V-Ray developer

    Comment


    • #3
      In fact the case where you need to add subdivs/displacement shouldn't be too hard. I see there is the exportTexture method.
      So you can export a texture and then you could assign it to the displacement/subdivision plugins.

      p.s. You can see the documentation of the post translate in https://docs.chaosgroup.com/display/...ed+V-Ray+Scene
      V-Ray developer

      Comment


      • #4
        Good info, and sort of the conclusion I arrived at too (manually exporting/re-piping vrscene nodes in the post translate script), but it's very helpful getting it confirmed - thank you!

        I've read the post translate docs many times - refer back to it on pretty much every project we work on

        /Dan

        Comment

        Working...
        X