View Full Version : Mozaic tiles and vertex color maps

01-22-2007, 11:28 AM

I try to simulate mozaic tiles with a specific map and so create a "stained image" effect ( problem.jpg).

So I've found a solution with vertex color maps attached to the central points of the mozaic's facets and colored with textured point...(points.jpg and poly.jpg)

My problem : zoom.jpg

I want to copy the vertex color maps value of the central points to the connected points of the facets in order to color the entire facets and not only the center...

Or find a way to color all the polygons of a facet with the vertex color maps values with a fantastic abracadabra in the node editor...

Can anyone help me or just understand my problem ? :screwy:





01-22-2007, 01:14 PM
Nice effect. I like this idea.

I think it would be worth the work to get right. I racked my brians and short of some plugin that might be around, I can't think of any other way than to grunt it out or otherwise maybe sombedy could scrpit something like this for you, but here's how:

Make sure you have the LW color picker chosen as your default color picker from the display options pannel (interface tab).

1) Select center point of 1 polygon group.
2) Hit i for point info
3) Select Edit Value [Vertex Color)] *your image map name* from the drop down list at the botom.
4) Click on the color square to open up the LW color picker
5) Click Store and close
6) Hit Shift ] on your keyboard to select connected
7) Open up the airbrush tool from the map tab and bring up the numeric pannel.
8) Click on the color square to upen up picker and click on Use then close picker.

9)Make sure your vertex map is selected - or keep this one and have another created as a back up so you don't overwrite it - and make sure the strengh is 100 percent then right click drag to make sure the nozel is big enough then LMB drag till all the points in that poly have the same value painted into them.

(You could alternatively use point color fot this, but that tool never works for me so I use the airbrush.)

8)Repeat 2000 times for each polygon group!

This is where somebody could write a script that you could run on each of those points perhaps.

Then I would merge those polys and delete the center floating points.

That would be one solution. I'll be trying to think of something faster, but for now this is it.

01-22-2007, 01:21 PM
And then I am not sure about the node editor but would that not still require a surface for each one?

Dave Jerrard
01-23-2007, 01:45 PM
I want to copy the vertex color maps value of the central points to the connected points of the facets in order to color the entire facets and not only the center..I've done this to color individual shakes (wooden shingles) using wieghtmaps. You're already mostly done.

Make sure each tile is disconnected from anything else. It looks like you've got a grout surface between them, so select those polygons and cut & paste them so the tiles are no longer connected.

Next, if you don't have FI's Weight Map Blur plugin, get it! It's almost unthinkable to do any weightmap editing without it. Apply this to the tiles. Since you only seem to have one ring of points around the center point of each tile, the default setting of 1 will blur the values so they're all the same value, about 1/3 of the value of the center point of each tile (assuming the outer points were all zero). All the points in a tile a wil be identical, but each tile will have its own weight value.

If the tiles were still connected, the blurring could cross over to adjacent tiles, and wouldn't be much better than what you already had.

Since the values of the center points will also be modified, there's a few things you can do to correct this. In the surfacing, you can adjust a gradient to account for this 2/3 reduction in values. In layers, this can be a bit more tedious than with the node gradients because you can't zoom in on the layer gradients. These always start at -100%, but node gradients can start and end anywhere you want.

The other options are to adjust the wieghtmaps in Modeler. The first option is to just redo the weight map using Textured Points, but this time make the texture 3 times more intense. The other option is to scale, or normalize the weightmap after applying the blur. There's two ways to do this!

One way is to create another weightmap, using Textured Points, and feed this current weightmap into a gradient that remaps it from 0 to 100. This will give you a second weightmap with the larger range. The other way is to use
the Normalize Map tool. This basically does the same thing - scaling a weightmap's values between two end values - but it does it on the weightmap you select. It doesn't create a new one.

Here's a tip. If you're just using the Layer method of surfacing, make your weightmaps range from -100 to 100%. The layer gradients always start at -100%, and by default range to 100%, with 0% in the middle. There's no way to zoom in on the positive side of these gradients, so you have only have the gradient's length to work with - the upper half is virtually useless with weightmaps that range from 0 to 100%. By spanning your weightmaps from -100 to 100%, you can use that upper half of the gradient. If you want to adjust any exisiting weightmaps to take advantage of this larger span, the same methods mentioned above will do that. Normalize Map can do this in a single step, by applying -1 to the Minimum and leaving the Maximum set to 1.

If you're using nodes, you'll probably find that keeping within the standard 0 to 100% range is better since you can feed weightmaps into other nodes - like the math nodes - to adjust, scale, invert, or otherwise modify them. Negative weight map values could complicate things on you here.

He Who Can't Believe He Only Discovered Normalize Maps A Couple Weeks Ago.

01-23-2007, 03:14 PM

I can see that that plug in will take a weight map and make it blur out to the edges from the central point.

What I am missing in this solution is where you actually take the image information and transfer it. I can see that you can map the image to a wieght map. In essence I can see that you would then take all of these map values and assing them color info with a gradient. That would work for shading on a roof. What I am missing is getting back to the original color of the image.

Would it not just be better to find a plugin that would take those central points and spread the vertex color info to the edges. Done.

Unless I am missing something, otherwise you have to recreate the image by endless experiment with colors to match them to the original image.

Enlighten me. :)

Seems like you could write a script that would just get the info from each of those pioints and spread it to the contiguous geometry.

And correction:

Select connected is just ] not "Shift ]"

Here's a link to FI's page.


01-24-2007, 03:14 AM
Hi, I'm Melmoth's twin brother .. Yes I am :)

The technic is complete, thanksful to Dpont ( The Great Denis Pontonnier :bowdown: ).
We made a lscript that copy the vertex color information into the other connected-non-mapped points.
And It works !! just a problem, all of the polys must be connected in one volume, it actually can't work on disconnected tiles, but I hope we'll fix this .
I think we'll post some image results in a few hours, maybe the lscript to be optimized, and maybe a tutorial to explain the entire problem and technics.

The cocytan

01-24-2007, 04:33 AM
All Polys must be unwelded for correct colormapping,
My test:
-Unweld all cells/poly.
-Select all points.
-Spikey all (polygon selection mode).
-Invert point selection to colorize midpoints (figure 1).
-Run the lscript (-> figure 2).



01-24-2007, 05:02 AM
The lscript, adapted from Melmoth's one:
could be improved/modified if you want.


01-24-2007, 10:53 AM
You guys Rock!

Hope Melmoth finds this as useful as I will. :)

01-24-2007, 11:25 AM
All thanks to the great dpont :bowdown: for his knowledge on this small (and so useful )script and for the ideas of my brother thecocytan :thumbsup:, who tried to make his first lscript... not the last...that's for sure...( he's a bit mad, it helps... :D )

We'll try to find other ways for this mozaic effect and i'll post some renders with the cocytandpont lscript solution.

Thanks for all those solutions

01-24-2007, 01:09 PM
OK, so here is a simple one. As you can see, the possibilities are limitless.

The first thing is the creation of the shape. This is where the possibilities come in. And as a side note, think of the the fact that we are not limited to the 2D plane.

So to test this effect to get the hang of it here are some simple steps:

Create the shape:

You can do this many ways including importing EPSF. But you can follow these steps at any point along the way.

1)Take an object that is subdivided with a unique surface name and select all of the polygons
2) hit b for bevel and create a small bevel - inset only.
3) With polys still selected, copy this geometry
4) Undo to bring this layer back to its state before bevel.
5) Go to free layer and paste. You now have your shapes with no grout in the middle. If you want the grout you can use other steps including unweld as above or simply cut and paste back into the layer with the grout after you:
6) Select Multipy/Subdivide/More/Make Pole
This will create points at the center of each tile and leave the points selected. Keep them selected and create a selection set - bottom right [S] for selection sets, select new and give it a name.
7)With points still selected create a new color map bottom right [C] select new and give it a name. Make sure and assign it to the surface of the tiles.
8) Go to Map tab and select Textured Point (points still selected) Click on texture and load an image, size etc. Close that and textured point and you should now have the center points with your image color. You can deselect the points now and make sure and save your object.
9) Copy and paste to new layer and then go to Utilities/Lscript and click on LScript, navigate to the place you downladed and extracted the amazing script!!!!! Select the name and click open - done.

Your tiles now have been colored!

Wait, two more steps:

10) now select all polygons and hit Shift Z to merge polys.

11)Go to points selection mode hit w and then the + sign next to the point selection set you created and then delete.

Obviously there are many ways to go about this depending on your project and workflow preferences.

01-24-2007, 02:26 PM
Just a little clarification. I like to keep earlier steps in other layers in case I have to go back and do it again. Obviously you just delete these when done.

Also you could just cut the tiles out put them in another layer, do the vertex coloring steps and then paste them back into the layer with the grout and then merge points to have a solid oject again.

Anyone want to give a shot at a 3D object?

01-25-2007, 05:46 AM
Thanks "surrealist" to explain the previous steps before my problem.

Obviously the vmap was made with textured point and the mesh was created with a EPSF import...

Naturally the process can work with any mesh and image source, but our method had to work on a specific mesh...

The real and unique problem was to extend (or copy) the vmap value of the central point to the borders points in a lscript or a node editor way.

In our process to create the mesh, we find the central point with a spikey tool but your method is also a good way and give me some different to explore and find THE method, faster and more "flexible"...

thanks, :thumbsup:

01-25-2007, 11:24 AM
No problem. I figured that was an import.

I happed to have a still around from a film I shot. We did a scene in a church.

Here's a quickie using the EPSF import from Photoshop Mosaic tiles.

Fot those who may need to know...


1) From blank image in Photoshop, Select Filter/Texture/Mosaic Tiles, adjust top liking but bring the grout darkness down.

2) Click the magic wand on the dark grout to select all of the dark grey. From the paths tab select make work path from selection.

3) File/Export Paths to Illustraitor

This will create the .ai file Modeler needs for import to an object.

4)Follow above modeler steps and apply script

This is not a great example but you can see the potential.

The image: