Announcement

Collapse
No announcement yet.

Displacement and custom maya plugin

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

  • Displacement and custom maya plugin

    Hi,

    What would be the best way of getting a custom maya plugin (for example something similar to the sphere sample) to use the standard displacement attributes in the vray-maya integration?

    Thanks
    -Don

  • #2
    Looks like there is an explicit check in the translator code to not wrap custom geometry in a displacement/subdivision plugin, but it's trivial to remove it. Are you creating a GeomStaticMesh plugin directly in the createVRayPlugin() method of your custom plugin, or some other plugin that creates GeomStaticMesh later on at render time?

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

    Comment


    • #3
      Hi Vlado,

      I'm creating a custom plugin which creates GeomStaticMesh at rendertime.

      Cheers
      - D

      Comment


      • #4
        So just to make sure: in the createVRayPlugin() method of your Maya plugin, you create a custom V-Ray plugin, which later on creates a GeomStaticMesh? If this is the case, then you'll have to wrap the GeomStaticMesh plugin(s) into GeomDisplacedMesh wrappers when you create them. You must also fill in the various displacement settings (like the displacement texture, edge length, displacement type etc). Since the V-Ray translator itself never sees the GeomStaticMesh'es, it can't create a corresponding GeomDisplacedMesh plugin to fill it with the displacement options.

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

        Comment


        • #5
          It just seems I'll be duplicating code which is handled by already by the maya vray integration. While wrapping a GeomStaticMesh in a GeomDisplacedMesh is understandable is there anyway I can rely on the existing code to generate the maps?

          If I generate GeomStaticMesh directly on the maya side is the situation improved?

          Cheers

          - Don

          Comment


          • #6
            Originally posted by dboogert View Post
            It just seems I'll be duplicating code which is handled by already by the maya vray integration.
            Yes, there is that unfortunately. We can do something along these lines: check if the V-Ray plugin that was created contains a parameter called "displacement_type", and if yes, we can attempt to fill in the various displacement parameters (the texture map, edge length, view displacement on/off, displacement bounds etc) - which would have to be named exactly as in GeomDisplacedMesh. Then, you can pass those parameters directly to any GeomDisplacedMesh or GeomStaticSmoothedMesh plugins that you create.

            If I generate GeomStaticMesh directly on the maya side is the situation improved?
            We could recognize that and automatically wrap it in the correct displacement plugin.

            Let me know which way would be more convenient.

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

            Comment


            • #7
              I'd prefer not to have to emit GeomStaticMesh directly in the maya plugin.

              I suppose as long the maps are translated, the subd & displacement attributes can be created on custom nodes and I know the displacement map name then I can just need to create
              GeomDisplacedMesh or GeomStaticSmoothedMesh as appropriate? Is this what you meant?

              Thanks
              - Don

              Comment


              • #8
                Originally posted by dboogert View Post
                I suppose as long the maps are translated, the subd & displacement attributes can be created on custom nodes and I know the displacement map name then I can just need to create GeomDisplacedMesh or GeomStaticSmoothedMesh as appropriate? Is this what you meant?
                Yes. In that case, for the moment, I will just add a check for a "displacement_tex_color" and/or "displacement_tex_float" parameters of your custom plugin, and if they are present I'll attach the displacement texture to it. Is that ok for the time being?

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

                Comment


                • #9
                  sounds good. Thanks Vlado.

                  - Don

                  Comment

                  Working...
                  X