PDA

View Full Version : How to: ColorVMap to WeightMap



Thomas M.
06-04-2007, 04:49 PM
I need to transfer a ColorVmap into a WeightMap, but I have no clue how to do this. The problem is I can't go the way via an UV map as I can't unwrap the model or atlas map it without LW crashing. Is there a direct way? I need to choose polygons by weight, based on the color information give by the VMap.

Any clues? Help urgently needed.

Cheers and thanks in advance.
Thomas

Dodgy
06-04-2007, 07:02 PM
Use the Vmaps>Color>Texture Point map plugin. It allows you to combine vmaps in any number of ways, not just into a colour map, but weight maps or morph maps.

Thomas M.
06-05-2007, 12:08 AM
Thanks Dodgy,

already tried it myself. Problem is that you can't choose ColorVMaps as an input parameter. You can "bake" an UV or a Weight map into a CVM, but not the other way round. That's unfortunately my problem.

Cheers
Thomas

Sensei
06-05-2007, 01:56 AM
VMapManager from TrueArt's Modeling Pack can bake color map to image, and then it can be loaded as UV map texture, or as weight map..
http://modelingpack.trueart.eu

Thomas M.
06-05-2007, 01:57 AM
Wouldn't it be pretty simple to write a LScript which transfers either the r, g or B channel to a weight value? Or a mixture of all three? It's a shame that I can't transfer it natively in LW. Anybody any ideas? Help! Help! He.....

Dodgy
06-05-2007, 02:59 AM
That's absolutely true... Sorry I was up until god knows what time last night, I must have punchy... I'll see about writing you an lscript. :)

Thomas M.
06-05-2007, 03:20 AM
Wow!

Unfortunately the UV map workaround won't work as the object can't be UVed. To complex.

Sensei
06-05-2007, 03:36 AM
You don't have to UV map like normally you do modeling object nicely unwarping.. It's just for plugin to know which vertex has what pixel on rendered image.. If you save color vmap to image, then load using exactly the same UV (it can be even random), exactly the same value will be loaded as intended..

Dodgy
06-06-2007, 06:21 PM
I've written a ConvertVmap plugin. Find it here:

http://dodgy.ghostoutpost.com/Files/MGConvertVmapsMD.zip

It allows you to choose any vmap's value for any value of the new vmap, so you could use the U value of a texture vmap and the red of a colour map in a new UV map for example. You can also scale and offset the values.

Thomas M.
06-07-2007, 09:26 PM
Hi Dodgy,

just returned from a public holiday. Will try it on my way to work on the laptop. Thanks so much!!!

I'll post an example of how to make efficient use of this plug in soon. Got to to do with high res renders. Wished I came across this idea month ago.

Cheers
Thomas

Thomas M.
06-10-2007, 08:21 AM
O.k., first of all thanks again. It's great that you wrote this. And yes, it works. And well, it doesn't. As far as I could come up with it's related to the RGB vertex map. I can't access it's data. At least not the one that "Surface baker" attaches to my object. If I create a ColorVMap in modeler and use "Textured point" everything works fine. I can transfer the color channels to a weight map. Also this vertex map shows up in the "Point info" dialog. The vertex map from "Surface baker" can be made visible in modeler and layout, but it doesn't show up as a vertex map in "Point info".

So the question remains, how can I transform the RGB vertex map into a RGBA vertex map (which would work with your script) or is there anything I miss. I'm pretty happy with the script and both sad as I couldn't solve the problem entirely.

Any idea what's wrong with "Surface baker" or me handling the situation/script?

Cheers
Thomas

Thomas M.
06-10-2007, 08:56 AM
P.S.: The baked surfaces maps although show up in your file dialog, but the data isn't accessable. The weight map never shows any details (or anything except from the base weight).

Castius
06-10-2007, 11:11 AM
If you create any vertex map in Layout you must resave the object in layout. Otherwise it's only temporary.

Thomas M.
06-10-2007, 11:16 AM
That's what I always do. I can access the map in the Color Vertex Map panel, but it only has three channels RGB. There's no Alpha and I can't see the map under the point info (like it isn't attached to the points). And so far I can't make use of this great plug-in. Anybody any ideas? In a way the map is there and it isn't. Wired!!!

Dodgy
06-10-2007, 01:18 PM
Colour maps have always been slightly odd. I have got it to work on my machine though. Are you baking a discontinuous or continuous colour map?

Thomas M.
06-10-2007, 02:00 PM
I guess I tried both, but I'll just test it. Anyway, so far as I can say, all baker stuff turned up as RGB maps in your selection panels, not RGBA. While the stuff from textured point is always RGBA, which works. Isn't there a way to make a RGBA out of RGB. I'll just try the cont./discont. stuff now.

Cheers

Dodgy
06-10-2007, 04:16 PM
You should be able to turn the RGB maps into RGBA maps using my plugin. It should just fill out the A with a zero value if you set the channel to a channel that doesn't exist (i.e. the A channel of an RGB map).

Thomas M.
06-12-2007, 03:09 AM
Finally I found the mistake. It's been related to a few single point polys in my object. Embarassing. Thought about everything, but not that. Checked my object so often during work that I have no clue of how this could have happened.

The only problem is now, why Surface Baker doesn't bake the illumination on my deformed object (bones, displ. maps). I just takes the position into account, but not the deformation. I know a workaround for my still, but this could/should be easier.

Thanks so much Dodgy.

Thomas M.
06-13-2007, 10:48 AM
It working. Unfortunately neither with 9.0 nor 9.2. Surface baker is somehow broken and in some lousy way corrupts its data or is crashing constantly with continuous switched on or while trying to use the pull down menu. 8.5's layout and your plug in worked fine. The only thing is it takes more than 30 minutes with approx. 300.000 points. I tried to take a look at the script to limit it to one channel, but I'm not familiar with LScripts. I guess it would be much faster if the routine would be able to work only with one channel (I just use the Red channel). Otherwise you saved my behind. Thanks.