By adamwade
#348727
Hi guys,

I always render the object channel with my final renderings to aid in photoshop selection. I have been noticing that the colors are almost all the same without enough contrast to select them independently (even with photoshop tolerance set low). It almost seems that the more renderings I create the worse it gets - as if the random color generator is running out of choices ? I finally tried the material channel option and those colors were vivid and contrasty. Any way to reset the random colors ? or other thoughts?

Thanks,
By JDHill
#348728
I can't speak for the code inside the engine, but I'd assume it generates colors in much the same way that the plugin does when it has to pick them. Whatever the case, let me know if you get a more desirable result using this script:
RandomizeMaxwellObjectIDs.zip
Alternatively, you could create a new toolbar button and paste the following into its macro:
Code: Select all
_NoEcho
-_RunScript (
   Dim obj, key, r, g, b
   key = "MWR_OBJIDCOLOR"
   obj = Rhino.FirstObject	
   While Not IsNull(obj)		
      r = "255:" & Cstr(Int(Rnd * 256))
      g = ":"    & Cstr(Int(Rnd * 256))
      b = ":"    & Cstr(Int(Rnd * 256))			
      Rhino.SetUserText obj, key, r & g & b
      obj = Rhino.NextObject(obj)
   Wend	
   Rhino.Print "Done Randomizing Maxwell Object IDs."
)
You do not have the required permissions to view the files attached to this post.
By JDHill
#349581
Both are for use inside of Rhino. To load the script, you can drag the .rvb file (that's what is in the .zip) from Explorer and drop it on your viewport. If you need instructions on how to create a toolbar button, then I'll need to know which version of Rhino you are using.
By JDHill
#349588
Sorry to make you answer another question, but you just happen to have indicated that most rare and elusive of Rhinos: the 64-bit Rhino 4. :)

So I have to ask, because that could mean you are using 64-bit Rhino 5, and made a typo, or that you are using Rhino 4, on a 64-bit OS (though regardless of OS, Rhino 4 is always 32-bit).
By JDHill
#349631
Not at all...it's not like it says "Rhino 4 32-bit" on the package or something. :)

To make a new toolbar & button:
  1. Go to main menu > Tools > Toolbar Layout...
  2. Click File > New, enter a name for your new toolbar file, and click OK.
  3. Click Toolbar > New, enter a name for your first toolbar, and click OK.
  4. You should see a new toolbar in the list -- close the Toolbar Manager.
  5. Look around your screen, you should see your new toolbar floating there.
  6. The new toolbar has one blank button; hold down SHIFT and right-click it.
  7. The Edit Toolbar Button dialog will be shown:

Image


You use the tools here to define the button: its button bitmap, left- and right-click tooltips, its button text, and whether or not it will show just the bitmap, just the button text, or both. Lastly, you can see how I have pasted the above script into the button's left-click command box; this will be run whenever you left click that button.
Help with swimming pool water

Hi Andreas " I would say the above "fake[…]

render engines and Maxwell

Other rendering engines are evolving day by day, m[…]