- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have exported a tree with a bunch of leaf cutouts from ThePlantFactory (which is free now!), and I want to reduce the bones to the lowest possible number. So I've deleted all the cutouts except for 1, which I now want to clone and rotate many times around the tree.
MaxScript seems the best way to do this, but the documentation is poorly written. It's clearly made by someone that already knows MaxScript, for people who already know MaxScript. What with the strange parameter names, single letter variable names, and examples that don't clearly explain each part of the command and arguments without jargon.
Here's what I've got so far, the clone command being the most confusing one that I can't figure out.
iVerticalLoops = 6
iCountMin = 8
iCountMax = 14
iAngleMin = 20
iAngleMax = 35
fScaleMultMin = 0.85
fScaleMultMax = 1.00
fHeightOffsetMultMin = 0.8
fHeightOffsetMultMax = 1.2
iHeightMin = 122.0
iHeightMax = 378.0
iHeightRange = iHeightMax - iHeightMin
iHeightIncrement = iHeightRange / iVerticalLoops
objSource = $Silverpine01_CutoutOrig
select objSource
--We'll create this many "rings" of cutouts around the tree
for iLoopCounter = 1 to iVerticalLoops do
(
--Number of cutouts to clone for this ring
iNumClones = (random iCountMin iCountMax)
--Clone the cutout, adjusting position and rotation for each one
for iCloneCounter = 1 to iNumClones do
(
fOffsetMult = (random fHeightOffsetMultMin fHeightOffsetMultMax)
iOffsetAngle = (random iAngleMin iAngleMax)
-- todo: Clone the cutout
-- todo: Add iHeightIncrement to Z pos
-- todo: Multiply new Z pos by fOffsetMult
-- Add iOffsetAngle to Z rot
--maxOps.CloneNodes objSource
)
)
I have basic experience with Lua, C#, and Pascal. Pascal in particular has good documentation most of the time, so I'm most familiar with it. But MaxScript's docs are scattered and not great in comparison.
Thanks for any insight!
Solved! Go to Solution.