[REQUEST] Select faces by bitmap RGB values
-
Hi Baldman,
Look at Didier's heightfield_gen.rb plugin which "creates a mesh based on a greyscale PGM or PPM image. Altitude is determined by the color of each pixel: white is highest altitude, black is lowest. Support for layer, automatic cleanup of coplanar edges."
Download at the Ruby Library Depot and see if this is something you could use..
-
Thank you GAIEUS for you reply.
I've tried with this cool ruby form Didier Bur but's hard to obtain a clean selection at the end of the process.
I think a modification of Didier's Code could do the job.
Unfortunately it is unreadable.
Didier si tu nous entends.... -
Well, it's definitely an old script (I already encountered it when I was a newbie back with version 5) and maybe it could use some revamping. I'll try to find the topic (from about 2 years ago) where people played with it and got interesting results but won't promise anything (on top of all, I have to go now).
-
Both didiers height field scripts are scrambled, which is what baldaman meant by 'unreadable' i guess.
-
If it's just black and white you're interested, you could convert your bitmap to vector lines before import.
-
The idea is to "paint" distribution maps with photoshop or whatever.
"Bitmap select" to select the faces and "components onto face collection" by Chris Fullmer to distribute the components onto the selected faces. -
Sorry to insist.
Nobody, really? -
There's no easy way to get pixel data from bitmaps in the SU ruby. Would need a library that reads the same formats that SU support. This isn't an easy request.
-
Thats what Didier BUR did with heightfield_gen.rb.
It's not with common bitmap files like jpg or png but...
Unfortunately Didier as disappeared for a while. I hope is fine.Anyway thank you Thomthom for your reply.
-
if there was a way to retrieve the bitmap information, that might be a gread addition to the component spray tool
distribution by bitmap...
Advertisement