::GetRenderingFacetMesh() for a terrain

While working on a fix for a number of my plugins that need to have a preview mesh and a rendering mesh I've come back to an unresolved issue. Can one get the rendering quality facet mesh for a terrain ? During a render the full mesh will be given to a deformer but I need to do my stuff during the preview.

The code I'm using works for all the other object types I've tried. Inside a modifier I start with the I3DShTreeElement then get the I3DShPrimitive.

TMCCountedPtr Instance;
TMCCountedPtr Object;
TMCCountedPtr Primitive;
TMCCountedPtr RenderMesh;

I also tried to call ::GetRenderingFacetMesh() from the I3DExGeometricPrimitive but I can only ever get the preview mesh for a terrain.

The Carrara surface replicator and the Inagoni Replica plugin work properly and always distribute over the full quality mesh so there must be a way to do it...


  • PGrePGre Posts: 71
    edited December 1969

    I'm totally spit-balling this, but is there a way of setting the preview mesh to match the rendering mesh, perform your operation, and then dropping the preview mesh back down to it's former preview quality?


  • Sparrowhawke3DSparrowhawke3D Posts: 98
    edited December 1969

    With a number of my plugins, like the terrain follower or footprints, the user currently has to turn up the terrain render mesh to full quality themselves. That slows down the workflow so I really want to avoid that. For what I am doing in those plugins the mesh can't be turned back down. In the fix I am working on for Jiggle I'm recording both the preview and render mesh vertex weights so the plugin can work at render time with a subdivision vertex model. Currently the user would have to turn a figure's preview up to full quality which makes them very slow to work with.

  • edited December 1969

    But if you ask it for the render quality mesh, won't it be slow anyways, since it has to generate that each time it evaluates your plugin? Maybe even slower, if it threw away the mesh each time, and then your plugin asks for it again the next frame.

  • Sparrowhawke3DSparrowhawke3D Posts: 98
    edited December 1969

    If I can't get hold of the full terrain mesh the plugins rely upon the user to turn it up and they may have to leave it up or loose the results. Displaying the highly detailed mesh in the preview is one part of what would slow it down for the user - if a terrain is hidden from view the preview is not slowed down at all. The render quality can be turned up higher than the preview which is limited to 1025x1025. You could be right about Carrara regenerating the mesh every time it is called but that would have to be put to the test.

Sign In or Register to comment.