View Full Version : Converting 2-colour images into polygons???

02-25-2009, 05:54 AM
OK, here's a weird request. I want to import a simple 2 colour black and white image into Lightwave and convert that image into polygons.

Basically, each black pixel in the image would become a polygon and all white pixels would be omitted so it would be like getting a 3d version of the image.

Does anyone know how to do this?


Revanto :p

02-25-2009, 06:20 AM
This is just thinking out loud, but may get you started...

One approach would be to start with a single cube and apply a morph where all of the cube's points move to (0, 0, 0). It'll still be there, but you can't see it. Next, you need to switch your base object and your morph, so the base object has the cube's points all set to (0, 0, 0), and the morph at 100% gives you the cube.

Now, use Array to create a grid of these collapsed cubes. The array should match the dimensions of your image. For example, if the image is 400 x 600 you want a grid of collapsed cubes that large.

Now you have a grid of collapsed cubes that you can send to Layout. In Layout, add the Morph modifier to the object. Then, use the image map to drive the morph.

I haven't tested this, so I hope it's not leading you down the wrong path. I'll check back later when I have more time. Hope this was helpful.

02-25-2009, 06:27 AM
Some visual examples of what you need would be a big help here.

If you are after literally each black pixel becoming indiviual polys; that would require manual cutting up, and you'd most likely end up with a huge [possibly even un-workable] number of polygons depending on the size of your initial image.

Another thing you might be after from your description is taking the image into Illustrator [or other vector based artwork application], to trace the image in order to create an Illustrator 3 eps [or equivalent]. You can then import this into LW, as a single poly, there you can do as you wish with it.

Hope that helps.


02-25-2009, 06:54 AM
I'm pretty sure Larry Schultz (Splinegod) has a video tutorial on something very like what BlueApple described. It was an animation of bacteria growing, and the same technique is used, and worked well.

Same morph from all points at zero to full size, and driven with a texture map.

You may need to have the base object with all points at zero and the morph target at the full size, which will require some Background_to_Morph trickery.

Edit: Might have been a William Vaughn video.

02-25-2009, 08:17 AM
As Nangleator pointed out, the technique I outlined is not mine. I did some searching but can't find the original thread. If you come across it, they do a much better job of describing the process than I did.

02-25-2009, 08:17 AM
You are correct. That would be one of my vids on displacements and endomorphs :)

02-25-2009, 08:35 AM
OK, here's a weird request. I want to import a simple 2 colour black and white image into Lightwave and convert that image into polygons.

TrueArt's Modeling Pack http://modelingpack.trueart.eu
has legacy interactive plug-in called ImageForm
It's analyzing images for front, top and right sides and generate 3d object
Here are screen-shots

02-25-2009, 03:33 PM
OK, the reason I'm asking about this is because I'm helping my friend out with a tutorial he's working on for Zbrush that uses Lightwave. I have an idea that would help his technique but it is a bit up-in-the-air until I can find how to do my part.

So, because this is for a tutorial meant for everybody, I do not want to suggest using a commercial plugin as it would exclude alot of people. Anyway, the plugin does not suit the needs of my idea.

Basically, what I originally wanted was a flat grid of square polygons that would reflect the size of the image. So, if I my image was 100 x 100 pixels square, my polygon grid would be 100 polygons by 100 polygons square. If I were to apply the image as a texture onto the polygon grid then I could just select all the polygons coloured white and delete them leaving only the black coloured polygons left which is what I want.

However, the big flaw in the plan is polygon count. If I have an image that's 1024 x1024 in size then that would equal 1,048,576 polygons in total, which is something my system can't handle. Even an image at 512 x 512 is pretty steep.

Now, BlueApple gave me the idea of using a morph which could separate the black and white polygons making it easier to select the black from the white polygons But the issue with polycount remains.

I hope this has cleared up what it is I am requesting. I know I'm asking alot here but I am positive that there is an easier solution somewhere. If I'm lucky, I will find it myself.

Thanks for the feedback so far.

Revanto :p

02-26-2009, 03:20 AM
http://pweb.netcom.com/~ghartens/cookie.html (Thanks to flay.com) I used it once or twice, generates very high density meshes, but you always can crunch them down. As far as I understand, its exactly what you need.

02-26-2009, 03:45 AM
Ooh, so close. The plugin works good in theory but it didn't give me the result I wanted. It needs to be polygon for pixel. But, thanks, anyway. I'll keep the plugin just in case.

I actually tried to do a little trick in Zbrush that might give me the result I wanted but it didn't seem to work out. In theory it worked great because Zbrush can take the high level of polygons but the result was less than satisfying.

Oh well. I'll have to keep experimenting.

Revanto :p

02-26-2009, 04:19 AM
hm - strange - i was sure it give you polygon for pixel (thats why was useless for me, even comment you can read on flay says: "It generates a square poly for every pixel in the image. So you need a lot of teadious cleaning. I rather trace the image in Illustrator and import eps into modeler.") but maybe I got bad memory.