Random color visualization for patch layout

Hi guys,

A request, this may already be possible, but I’m not aware of how to do it. Is there a way to have a display setting that shows the individual patches with random colors? This is very useful if you are working on the patch layout. It can quickly visualize what your edge flow is and what the shape of the patches is.

This feature is found is some other surfacing software. I grabbed an image for the web to illustrate it. This would just be an analysis setting that you turn on and off, think of it as an extension of the Zebra and Curvature tools.

Thanks,
Mark.

1 Like

Hi Mark - Nothing is built in that I know of, but I have heard this request before - I’ll put it on the pile if it is not there. In the meantime it is possible to make a script that assigns random object colors - I think I have one someplace, I’ll see if I can dredge it up and post it here.

http://mcneel.myjetbrains.com/youtrack/issue/RH-33592

@Mark_Landsaat - would this be for faces in a joined polysurface, or individual top-level objects (i.e as separate surfaces in your image)?

Here’s an ancient script that assigns random colors to selected objects
RandomizeObjectColors.zip (1.7 KB)

Unzip, save, then drag and drop the rvb file onto Rhino to add

RandomColor

as an alias to run the script.

-Pascal

Hi Pascal,

Thanks for the quick response and the help. However, I may need more handholding than this since I can’t get it to work.

I added the rvb file to Rhino and if I run the “Loadscript” command I can load it. When I run the "runscript command it does not show up. I can see AlignGrips and AlignGripsCrv

I have also tried typing RandomColor in the command line but it doesn’t recognize the command. I’m new to scripting, so have no idea what I’m supposed to do. What am I doing wrong?

Thanks,
Mark.

Hi Mark - I think I set that script up so that you can just drag and drop the rvb file onto Rhino and the alias will then just work. I’ll verify and get back to you, it would not be the first time I goofed…

I did goof - the script is incorrectly named - sorry about that- hang on a sec…

RandomizeObjectColors.rvb (882 Bytes)
@Mark_Landsaat Delete that one and drag and drop this one - the alias will be the same - RandomColor.

AlignGrips is good though… =)

-Pascal

@pascal, don’t you remember TestRandColor (Warning: includes funny disco effect :slight_smile: on view manipulation and works in every display mode. Run it again to turn it off).

c.

Hi Clement - I do… but it seems too um, jazzy, to be of real use for more than about 0.5 seconds - we don’t want users checking themselves into the local asylums.

But, yeah, @Mark_Landsaat - try testRandColor, if you can stand it it may work for you.

-Pascal

Hey, use it all day long and it makes Rhino great again :tired_face:

Pun aside, a display mode which colors sub-surfaces without exploding might be handy.

c.

Well, then - testRandColor for president!

Yes, I agree. Probably harder but who knows?

-Pascal

that’s pretty good actually… would be neat if you could lock the colors when they’re to your liking…

(otherwise, yeah, seems seizure inducing if kept on too long)

Hi Pascal,

This worked, thanks for helping me out with this. I did try the TestRandColor which is fine if you don’t manipulate the view. I think I will stick with the script for RandomColor. This does what I want it do. Thanks for the help.

1 Like

I just want to chime in and say that TestRandColor worked great since it was easy to toggle on and off, and even worked in both shaded and rendered mode.

However, there’s no predictive typing hints for this command, so unless you stumble on it in the forums here, I believe it’s impossible to find out for new users, so I’m hoping a proper mode with an icon will be added for it some day!

I must have missed the TestRandColor thing years ago and just ran across this so tried in in V6 by typing in the full command. It seemed to work but just the isocurves got the colors in Shaded Display so I used the Rendered Preview Mode and got the full effect. Nice, similar to what Fusion does. But then I tried to revert by running it a second time and my middle mouse button which I have set to show recent commands was doing the ‘pop up’ window thing. Then I noticed some other ini setting had gotten changed simple by my trying the Random Color thing. Lost my keyboard settings and worse I lost my custom aliases! I’m having a hell of a time getting things back to where they were. Just a word of warning when messing with test commands!

Hi @jodyc111, that must have been something else, i use the command often and never had a problem. Just tried to repeat it from the last used command list and it behaved as always.

_
c.

It seems that I did another step that caused the problem. I made a new alias for the Rand Color and that was screwed things up.

Well, I liked the feature so much that I needed to have it in my toolbar, and since I don’t think there’s an icon for it, I made my own:

RandomColor24

Feel free to use it!

2 Likes