RSS FEED
Showing posts with label random. Show all posts
Showing posts with label random. Show all posts

Unique random wirecolor

As I've indicated in my previous retrospective that there's a skeleton in my closet, a bulk of code waiting to be commented. Let's now have a look at a piece of code from almost a year ago (original question at Stack Overflow: Give each object in scene a unique wirecolor?).

Read more »

Array shuffling gotchas

Shuffling an array is a fairly common task in the world of maxscript, and even if you don't do it quite right it's still okay for most of the tasks it's used for. However when unique array elements get dropped in the process and other are repeated, it's definitely not the expected outcome.

Read more »

Select Random Elements by Percentage

This little script allows you to randomly select a number (given by percent) of elements in a mesh. Works both on editable poly and editable mesh objects. Note that for certain usage scenarios, applying MaterialByElement modifier and using the ID percentages generated by that might be faster.

Read more »

Random UVW Map Gizmo Shift

Recently I've been asked by a co-worker to write a very simple script to randomly shift UVW Map gizmo of selected objects by an amount in a given range. And that's what it does. I'm open to any suggestion as to how to increase its usefulness, though.

Read more »

Randomly switch object positions

The following function comes in handy when e.g. populating parking lots with many different cars. This way you only need to use one type of car for each section (and dummy helpers as placeholders for empty ones) and the randomness is then achieved by using this function:
Read more »
Return to top