BerconMetaball 1.0

Download: http://www.chaosgroup.com/forums/vbulletin/showthread.php?t=45994

Example result: http://www.ylilammi.com/graphics/MilkCoral.jpg
Example scene (max 2009): http://www.ylilammi.com/BerconMetaball/MilkCoral.7z

Source code for NON-commercial use: http://www.ylilammi.com/BerconMetaball/BerconMetaball\_Source\_2009\_26\_05.7z

I’ve tested it on all compatible Max versions (9/2008/2009/2010, 32bit/64bit) but very briefly, so its possible there are some major bugs in there. Metaballs are only compabile with VRay 1.50.SP3a.

Please report all bugs found here or email me.

INSTAL!

1. Select the correct version (Max 9 and 2008 use the same file).
2. Copy it to your 3dsmax/plugins/vrayplugins/ folder. ← VRAYPLUGINS/ not plugins/
3. Start 3ds max and you’ll find BerconMetaballs under VRay objects (same place where VRayPlane is)

USAGE!

Very similar to 3ds max’s own Blobmesh, but now viewport preview, shows up in render only. Just point
the metaball to some mesh or particle object.

Why is this better than the Blobmesh? Because:
1. Requires very little ram, its possible to render 10 000 000 particles with ~2GB ram
2. Perfectly smooth, no meshing artifacts
3. Supports true 3D motion blur
4. Very fast preparation time, there is no need to generate the mesh at all when starting rendering, just
render things you see and not those you don’t

LOOK AND FEEL!

Metaballs are points which have falloff radius, it starts from 1.0 when the distance to the point is
0 and fades of to 0.0 when the distance to the point is same as the radius. This function is not linear
its determined by the Distance Function. The surface is raytraced and lies where the density (all metaballs
distance summed together) of the field is the Threshold value. What this means:

High threshold = Slower to render but more metaball effect
Low threshold = Faster to render but less metaball effect (more like normal spheres)

When using high threshold the metaballs are smaller, compensate this with higher radius.

The “Use average distance” option produces smoother surface when used with fluid simulation particles, this
means that the particles must be evenly spaced to produce good results. You can use it with just normal
chaotic particles but it might result in artifacts. To reduce these artifacts play with the Cutoff and Trim
paramters.

Cutoff and Trim parameters affect the result only when “Use average distance” is checked.

SPEED!

You can control the quality with a single parameter and thats the “Step length”, its better not to touch the
Max error, good values for the Max error parameter are between 0.001 and 0.0001. It doesn’t have that much of
an effect to render times. High max error values produce artifacts like black dots.

Step length determines how large steps we take when tracing the metaballs. Bigger steps mean we might miss some
metaballs but it renders faster. Generally values that are 1/10 of the metaball radius produce fairly accurate
results very fast. For example Radius: 5.0 and Step length 0.5 would be a good starting point to start tweaking.

ADVANCED!

Bounding Volume Hierarchy is an acceleration data structure to search the points fast. It doesn’t affect the end
result at all, it simply makes metaballs render faster or slower. Max tree depth determines how large the data
structure is, it goes in exponent of two so depth 15 means maximum number of leaves is 2^15. Leaf length the maximum
dimensions of single leaf and leaf size maximum number of points in single leaf.

Its generally better not to touch Max tree depth at all, higher values might use more ram and depth 15 should
be enough even for few million particles.

Play with the Leaf Length and Leaf Size if you want to optimize your render times.

- Jerry

Hey, thanks a lot man. I will test it on max 2010 x64.
And great image by the way.

Hey, MasterBercon! Thx a lot.
Your “Example scene” contains the sourcecode and not the max-scene.

nice day!

Oops, and its not even the latest sources. Thanks for noticing, I’ll have to fix that when I get home.

thank you very much MasterBercon for sharing your work!!

I wish you all the best in the 3d industry (in the future please stay in the 3dsmax/vray community) :)))

regards
mickael

Another fantastic plugin from you ! Thank you very much.
I´m just doing the first tests, and the speed is impressive.

I just noticed that DR does not work with this plugin.
All the render slaves (wich have the plugin correctly installed)
just render out the plain geometry.

best regards,

sam

Hmm… I was afraid there might be some issues with DR, but I’m not really certain what might cause them.

If vlado could give me a hint how DR works differently with objects than local rendering?

There seem to be some issues with Network Rendering in general.
When I try to render with backburner,
all of my slaves would give me an error “Missing DLL, Berkon…”
I checked twice, they all have the right dll in the right place.
I also put them directly into the plugins folder just to see if it helps,
with no success. When I send a job to the network and start a Backburner
server on my local machine, the rendering starts as expected. The only
difference I can see is, the slave machines only use Network rendering licenses
(Max and Vray)

Btw. I´m just rendering a test animation with 2 Million particles. 30sec. per Frame
(no GI). I could have used even more, but actually you wouldn´t see a difference
in that resolution. Very impressive !

Yeah pretty odd. I think I’ll wait for somebody more knowledgeable to bring more light into the issue. Now I’m taking a break from developing anything.

I added the source code and example scene to the first post. I think I managed to keep the source code pretty readable and tidy so if anybody wants to look into and suggest improvements I’d be happy to hear them.

Don’t hold your breath! :wink:

Serious! Cool, looks like some fun to be had :smile:

I tested the DR here at work and it works just fine with Windows XP 64, Max 2010 64 and VRay 1.50 SP3a 64.

Make sure that your render nodes have the plugin file in their VRAYPLUGINS folder, not the normal plugins folder.

I´m on Max2008/32bit Vray 1.5SP3.
I just installed it on another workstation.
When I start max I get an error code 14001 when loading your plugin.
According to google this is a problem with missing libraries.
.Net or Microsoft Visual C++ redistributable. The slave machines
don´t have any C++ redistributable installed at all and only .net 2.0.
I´ll upgrade and install them to see if this helps.

Oh yeah, 2009 and 2010 ship with those redistributables. I always forget them. Here are the urls:

32bit: http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647&displaylang=en
64bit: http://www.microsoft.com/downloads/details.aspx?FamilyID=eb4ebe2d-33c0-4a47-9dd4-b9a6d7bd44da&DisplayLang=en

Also, I compiled the plugins with SP3a, I’m not 100% sure it works on SP3.

sorry, I´m on sp3a.
I just updated to .net 3.5 and that fixed the problem. Now it works !

when i open the milk scene Max asks me for BerconPflow…

any chance to see a version for Max 2010 ?

From his other thread

Jerry, you’re the man! looks like this will be fun to toy around with.

Thanks so much for this! It is so much nicer than max’s built in meta blob stuff.

I have one feature request through. Would it be possible for the radius to be set by the particle size? I like to set random particle sizes when making meta blob objects and the built in max meta blob stuff seems to use the particle size for radius of each particle/blob. It makes for some fun non uniform shapes like cartoon clouds and stuff like that. It would also be nice for when particles are growing and shrinking.

I was thinking the same thing!