Randomize Elements

13 votes
Version: 
0.03a
Author Name: 
Vojtech Cada

 Randomize elements the easy way. Slow as hell with complex models (500k poly and more).

Additional Info: 

Installation: Copy the .ms file to your scripts\startup folder or run as a script if you only want to try it out. The modifier will be available in the Modifier List.

Notes: If you want to exit the Generate loop, hold the Esc key. When using Show Once update option and switching to baseobject/different modifier in stack and back, you have to click the Update button once again to show the randomization. Exercise caution when using this for complex meshes.

Credits: The original getMeshElements function comes from Jorge Rodríguez (aka PolyTools3D).

Version Requirement: 
3ds Max 2016
AttachmentSize
randomizeElements.ms8.67 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lightcube's picture

I peeked in and honestly the

I peeked in and honestly the center code looks a lot like what I started with. Seems like I was having problems when the object was transformed in the scene. But I was using SimpleMod... which may have been part of my issue. I've got to start playing with the new goodies in 2016.

_______________________

Shawn Olson

Developer of Wall Worm

Swordslayer's picture

My pleasure

My pleasure. Once you get the elements and their centers, the calculation itself is 'translate point from the center to the origin, scale it there, rotate it, move it back, offset it' (or swap the last two if you like) - see the getRandomTM function. For me the part that was always hard to make reasonably fast with complex meshes was getting the elements and that part of the script logic comes from Jorge Rodríguez.

Victory, hmm? Is there a competition? Cool If only there was more time, outside of work I spend very little time with max and the time spent at work is all hard-surface modeling - you know what, have a look at what we do and spread the word, that way I might soon get paid better and work less Wink 
jk, but not really

lightcube's picture

Thanks for sharing

Thanks for sharing Swordslayer. I made a scripted plugin identical to this last year but never released it because I couldn't figure out the right transformation calculation to get the element rotations to always rotated from the element centers. No need to finish it now.

PS. You are on a rampage lately with all these great shares. I think you are working on a Flawless Victory.

_______________________

Shawn Olson

Developer of Wall Worm

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.