Hey Krakatoa Peeps
I need to fill the negative space of a bone structure with some objects. I have filled a box using PRT volume and used Magma to make a selection using the geometry of the bone and deleted the particles creating the negative space that i need. I was planning to use frost to distribute various shapes among the particles. What I would like to do is use the Automatic Scaling Based On Interparticle Spacing as in the PRT cloner to have all the geometry all clustered nicely with minimal instersection. Is it possible to use a magma to create this scalling and pipe it to the frost scale channel? any pointers tips,startingpoint for the magma, would be appreciated.
That was quite the challenge, but I figured out a way to do it. I found a bunch of bugs along the way though, so you might have to be careful when you implement this yourself.
Here’s a scene showing it off:
KMX_FROST_RadiusFromInterParticleSpacing_Max2010.max (212 KB)
You need a couple of components:
- A PRT Maker with 0 particles generated and a Magma modifier assigning the Scale channel as the float value 1.0 (This is a problem since Magma is going to try and force you to use a Vector here)[/]
[]A PRT Cloner on your particle object, with ‘Set Scale Channel’ enabled using the PRT Maker as the clone objects in the list[/]
[]A Magma modifier above the PRT Cloner modifier that assigns the Radius channel as half of the Scale channel[/]
[]A Frost object configured to use the modified particle source, and with the meshing radius assigned from the particle’s Radius channel.
I found a number of bugs along the way, so it might be best to copy the objects in my provided scene. Specifically getting the PRT Maker to have a float Scale instead of a vector Scale is tricky. I had to do it via MAXScript, but you should just be able to copy the modifier (or save the flow to disk) and it will work fine.
Does this work for you?
Hey! Nice but I am having some issues, I think its do to with setting the scale as a float. In your file it all works perfectly. When I tried to recreate the effect I am having issues. When I turn on the set scale channel on the PRT cloner, my particles disappears from the PRT volume and as a result the Frost dosen’t work. I have attached the test file I was using to recreate the effect.
test_scene.max (256 KB)
Just copy the modifier from my Max file; don’t try and recreate it. You can copy it in a variety of ways including copying the actual modifier in the normal 3ds Max manner, or selecting all the nodes in the magma modifier and using copy and paste to copy them into a different modifier, or using the File menu in the magma editor to save the node configuration to a file on disk that can be reloaded in another editor window.
If you really want do it manually, the code to assign a float32[1] Scale channel is:
$PRTObject###.modifiers[#].magmaHolder.SetNodeProperty NodeID# "channelType" "float32[1]"
You need to substitute the appropriate scene object, the modifier index of the magma modifier on that object, and the ID of the output node that you are modifying. The Node’s ID number should be listed in the top portion of the node when you have the editor window open.
Hi,
In the end I just merged your prt maker into my scene and it worked. However I had saved the flows to disk as you suggested, but that didn’t seem to work thats why I was wondering. Thanks for the excellent help. If you are in London then beers on me.