Jump to content

How to Render Metaballs Efficiently?


Guest YoBeardMaestro

Recommended Posts

Guest YoBeardMaestro

Mantra is a fairly fast renderer, and I've been pleasantly surprised at the quality of results it can produce relatively fast, particularly motion blurring and volume rendering.

However, I've recently attempted to render some metaballs and found that it takes disproportionately longer to render these than other geometry types. To ensure that there wasn't anything funny going on in my scene I conducted a quick comparision, which you can try for yourself. Go on, it'll be fun.

In a simple scene consisting of a sphere (of type primitive) and a single metaball - in the same position to switch between them - viewed by a camera fairly close-up, with no materials or lights or anything else, the sphere took a mere 0:04 to render whilst the metaball took 5:17.

Now I'm guessing that this has something to do with the way that metaballs are subdivided into micropolygons by Mantra, because decreasing the shading quality of the metaball object (to 0.2, for example) reduced its render time to 0:07, without any noticable reduction in quality. However, if you were to apply any shaders to this object they wouldn't look good at this shading quality.

Similarly, converting the metaball(s) to another geometry type (which seems to be limited to polygons if the Convert SOP is to be believed) results in much faster renders (0:03 in my simple test case) but requires a high level of detail (i.e. huge numbers of polygons) for surface displacements to render without artefacts.

So here comes the question: how do you render metaballs efficiently without resorting to adjusting the shading quality or converting to an inferior geometry type? Is there a Mantra property ('hidden', or otherwise) that tells it to compute metaball surface position with less accuracy - whilst maintaining a greater accuracy for shading?

Even if there isn't any 'magic' switch or parameter, and everyone simply converts their metaballs to polygons prior to rendering, I'd still like to know and hints or tips you might have for achieving an optimum balance between geometric complexity and render quality.

I welcome anyone's thoughts on this.

YBM.

Link to comment
Share on other sites

Guest YoBeardMaestro

Jason, what do you mean by metaball procedural? I've seen it referenced in the documentation, but couldn't figure out how it would help me in this case.

Cheers,

YBM.

Link to comment
Share on other sites

Jason, what do you mean by metaball procedural? I've seen it referenced in the documentation, but couldn't figure out how it would help me in this case.

I believe he's referring to the "Mantra Metaball Procedural" SHOP. Add this SHOP, then you can either assign it to your object directly (<geo_object>Render->Geometry->Procedural Shader), or reference the target geometry indirectly via the SHOP's "Object" parameter. Have a look at the SHOP's help card for an explanation of the other parameters.

This procedural polygonizes metaballs at render time with control for the level of detail and respecting shading quality settings, as well as allowing for velocity MB and displacements.

Haven't tried it lately, but it used to work fine in H9.5.

As usual though, YMMV...

Link to comment
Share on other sites

Guest YoBeardMaestro

Thanks for your advice, chaps. The Convert Meta SOP seems to do what I was looking for (obvious once you know how to do it, right?)

I'll play around with the Metaball Procedural at some point and see how my mileage varies...

Thanks,

YBM

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...