Announcement

Collapse
No announcement yet.

Linking GeomStaticSmoothedMesh to GeomStaticMesh

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

  • Linking GeomStaticSmoothedMesh to GeomStaticMesh

    Hi,
    I have a geomStaticMesh plugin that I would like to smooth.
    Seemingly the GeomStaticSmoothedMesh need to be used, However I can't find any example on how to link the mesh parameter of GeomStaticSmoothedMesh to my geomStaticMesh plugin.
    Code:
            smoothGeomPlugin=newPlugin("GeomStaticSmoothedMesh");
            DefPluginListParam *meshParam=new DefPluginListParam("mesh");
            meshParam->setPlugin(0,baseGeomPlugin); // baseGeomPlugin is my GeomStaticMesh plugin
            smoothGeomPlugin->setParameter(&meshParam);
    This doesn't even compile.
    Any suggestion on what to correct in the code to smooth my mesh ?
    Thanks.

  • #2
    Code:
    smoothGeomPlugin->setParameter(meshParam);
    V-Ray/PhoenixFD for Maya developer

    Comment


    • #3
      Thanks, I can compile & execute now.
      However the result is not the same than when rendering a "real" mesh. See both pictures attached.
      One has a Maya-native Cube rendered with VRay Smooth/Subdivision, and the 3 items behind are the Cubes rendered with my SmoothMesh code. And same for the other picture with spheres. Any parameter I would have forgotten ? Thanks.

      Click image for larger version

Name:	Cube.jpg
Views:	1
Size:	254.1 KB
ID:	859197

      Click image for larger version

Name:	Sphere.jpg
Views:	1
Size:	303.5 KB
ID:	859198

      Comment


      • #4
        It seems to me that the issue is in your mesh data. Subdivision needs proper mesh topology to work properly. You have passeed probably 6 planes, not a proper cube mesh.
        V-Ray/PhoenixFD for Maya developer

        Comment


        • #5
          I indeed gave 12 triangles to one geomstaticmesh plugin. What would be the difference with a proper cube mesh ? Common vertices shared among different faces ?
          Thanks !
          Last edited by lcrivell; 16-12-2015, 03:54 AM.

          Comment


          • #6
            Yes, of course.
            V-Ray/PhoenixFD for Maya developer

            Comment


            • #7
              Can you show us the GeomStaticMesh and GeomStaticSmoothedMesh plugins in your vrscene?
              It should just work.
              Do you set other parameters than mesh in your GeomStaticSmoothedMesh instance?
              V-Ray developer

              Comment


              • #8
                Putting a proper geometry (common vertices) made it work like a charm. Thanks !!

                Comment

                Working...
                X