ZBrushCentral

Make1Mesh v1.24 - plug-in for Zbrush3 (Updated 7/1/07)

Makes a Single Mesh, from a Tool with multiple SubTools.
The current Subtool, and all other visible Subtools get mergred into 1. The selected Subtool becomes the base of the new Mesh.
The Sub-D level of each SubTool at the time of activation, is the one that gets used.
Each extracted Sub-Tool, gets polygrouped, so if you were to split the resulting single mesh, you will get the same Sub-Tools you had before.

Clone method (default) - preserves poly-painting and UV maps, but changes the names of all the originaly used Sub-Tools.
PolyMesh3D method (ALT+click) - preserves the original Sub-Tool names, but deletes any poly-painting and UV maps on the created mesh.

:large_orange_diamond: Download Make1Mesh plug-in :large_orange_diamond:
http://www.mediabakers.com/files/Make1Mesh.zip

–Version History–
v1.2 - Added Features
- Added Shift and Alt modifiers for different useage.
- Counts total merged polygons, and checks against MaxPolysPerMesh setting.
- Default behavior is now to merge selected and visible Subtools.
- Option to rename after it’s complete. (use Shift Modifier)
- Returns original Subtool selection.
v1.22 - Added Features
- Changed method from MakePolyMesh3D to Clone. This should help preserve poly-painting and UV maps.
v1.23 - Bug Fixes

- Verify “Del Higher” and “Del Lower” before pressing them.
- Added IUpdate in each IFreeze and the main loop.
v1.24 - Bug Fixes, Updated Feature
- The Clone method changes the original names, which caused some side-effects. This update should fix them.
- Changed Alt behavior to include PolyMesh3D method.

<b>[Useage]</b>
          <b>(Click Button)</b> - Merge using Clone method. 
<b>(Click Button + ALT) </b>- Merge using PolyMesh3D method.
          <b>(Click Button + SHIFT)</b> - After merging, a request to rename the new Mesh appears.  
          
          [i]Note: If you plan to use ALT+SHIFT together, make sure you press Shift first, or SHIFT might be ignored.
          [/i]
          
          Original v1.0 thread
         [http://www.zbrushcentral.com/zbc/showthread.php?p=366035#post366035](http://www.zbrushcentral.com/zbc/showthread.php?p=366035#post366035)
          [i]
       Also, I never figured out how to rename via script, so if somebody wants to tell me how, without saving, I'll add that in.
          [/i]

Youre the man - that is one of my favorites scripts ever for Z3!
Thanks a LOT bro! :+1:

Cool, thanks alot!

A request, would it be possible to retain polypainting after merging?
Maybe it already is, but it doesn’t work for me :frowning:

I can’t control some of the side effects that it may have. I’m not rebuilding the mesh outside of Zbrush, where I would have total control over UV’s and such, but inside Zbrush. It’s rather simple, copy a subtool, copy another, and merge them together. Copy a 3rd and merge that with the other 2 that are merged already. How they get merged internally, is upto Zbrush. If I wanted it to be perfect, I’d have to make OBJ’s of each, and merge them in an app outside of Zbrush, where I would have full control of it all. Zbrush has always had UV issues, starting with the fact that only 1 UV map is supported, and only 1 texture map. Even with multiple SubTools, still only 1 texture map.

If you know of a method that works if you manually do it inside of Zbrush, than I can add that in. Let me know if you come across such a solution.

actually since i haven’t tried it yet can’t say it works…but
if you are grouping then there is no reason that if you save those cols>tex (am not saying you should have to gamemaster as this would open up cans of worms i know you don’t want to open) then once your tool is whole you should be able to load each texture by itself (like you would before it was one mesh) by simply selecting the group you want and then loading the apropriate texture…if you are asking if you can combine them into one…that actually can be done by loading each group…doing the tex>col thing…to your one mesh then col>tex if the whole now is mapped in one…you don’t wanna go there i think GM…but if one stays in zb…a user can do this…this is one of the reasons polypainting was designed the way ti was

aminuts, I don’t really follow what you mean, but I’d like to. You think you can record a simple session that does what you are saying?

hi will try to do that tomorrow for you…but

really this is not an area you want to walk down i think for a public script but

i’ll give you…well try to give more plain what i am thinking…

since i can texture…and polypaint then save to texture any subtool i have…

and since make1mesh also polygroups my subtools…then i should also be able to make sure said group is visible then reload said previously saved texture and use tex>col to apply that to that group as a polypaint for that group…now this should work fine in theory…but as i have said… i havent had a chance to test it yet…for pix…will attempt to show tomorrow…once one has one’s whole mesh "repolypainted"this way then one could transfer this uv’d anydamn way they wanted i reckon…some ways with a tad more work than others but there you are…

hopefully that made sense…if not…i will try to post a script tomorrow afternoon.

I tried what I think you mean, and it didn’t work, so I may have done it wrong. The Col>Txr feature, is highly UV dependent, and the UV’s seem to get damaged when you use “Make PolyMesh3D”.

On another test, I did notice the polypaint colors holding steady, if I use “Clone” instead of “Make PolyMesh3D”, but that requires me to delete the higher and lower sub-d. That’s no big deal, as it will just take a little longer to process, but that might be the solution, instead of the texture route. Going to do some more testing to confirm my findings. But so far, I think “Make PolyMesh3D” removes all extra data, including UV and polypaint, which is causing the issues. “Clone” might be the silver bullet here.

I am using “Make PolyMesh3D”, since it gives me a mesh with no sub-d in it, which is the requirement for merging. Yeah, I know if they are all the same sub-d level, it works too, but to insist that everyone’s mesh is equally sub-divided per-subtool, is insane.

Actually, I was trying to think of a method for this too.

The objective is to have all of the subgroups in the merged model retain their polypainting so when done, it looks just like the polypainting on the original multiple subtool model.

It could end up being pretty easy to do adding subroutines which manage the following steps…

Select a subtool.
Select a texture map.
Press Col>Tex (saves a copy of the polypaint to the texture map.)
(Copy the Material:ItemInfo to a variable if you want to xfer that)
Clone the subtool.
Select the clone.
(Set Material:ItemInfo with variable and Fill Object)
Select the same texture map.
Press Tex>Col which should reapply the texture map as polypaint on the clone.
Select the mergeobject.
InsertMesh the clone

Rinse and Repeat for all subtools.

I guess you could safely use the same texture map for all transfers.

It might be necessary (or even smart) to add a step that assigns GUV mapping to the subtool before the Col>Tex step.

For export, you could save the maps with unique names that would match the clones.

Sven

[Edit ] Wait a Sec…

After all that, I see that cloning a subtool simply generates a copy with the polypaint intact. (including materials) When the clones are merged, the polypaint comes right along. So Duh, never mind!

Cloning bypasses the whole problem of MakePolymesh3d, right?

Sven (note to self: test FIRST)

yeah…you are gettin what i mean…and the probs it entails…and I am semi thinking i semi have a work around but again…that requires me experimenting.

i think we can safely say that pixologics idea of polypainting…and doing so with 0 uv’s…are not for naught…these probs we are trying to address in meantime me thinks are not necessarily for nothing but i think since zb has been dealing with ilm etc…how can we think multi-textures and bringing multitools together for same…have not been addressed in some way?..specially since polypainting which was available in z2 is now uv independent in z3? I think I love mr. alon…doing this frees an artist in about 38 million ways i haven’t even thought of yet…let alone what he has instore for us…so…hahhaha where was i? sighhhhhh

i gotta do some testing me thinks… :eek:

ha…Sven…you posted pretty much what i was thinking but can never state i guess in plain english…thanks…but yeah that’s it!! :smiley:

I updated the original link, to v1.22
I did not use the texture technique you guys are talking about, but something more simple instead. It seems to work OK for me, on both poly-painting and UV maps, but I only tested it just enough.

v1.22 - Added Features
- changed method from MakePolyMesh3D to Clone. This should help preserve poly-painting, and UV maps.

Marcus I agree with you, i use regularly the clone tool because it make “native” every tool you clone, say:material,texture,paint…become incorporated.
GameMaster: the addition are just outstanding.
for the moment the link dont work.
Andreseloy

Sounds like you caught the 1/2 hour window where I was having FTP troubles. Please try downloading again. :+1:

Gracias, Game Master 770, excelente plugin. Esta nueva versión se me cuelga a veces, aunque no siempre, en cambio, la anterior nunca me dio problemas.

Alegre tienes gusto de él. ¿En qué punto para? ¿Para en el mismo lugar, con el mismo acoplamiento? Apesadumbrado, sobre el mal español, utilicé un programa de la traducción.

(English version) - Glad you like it. At what point does it stop? Does it stop at the same place, with the same mesh? Sorry, about the bad Spanish, I used a translation program.

here is working fine! no delay
just to make sure: you have to click first the button from your plugin and then alt or shiftf key?
what is the results of pressing shift and alt together?
same rule: click button AND shift+alt?
Andreseloy

As a token of my appreciation for this plug-in, just this morning I had my first-born christened Game Master. :smiley:

GM,

The merge works well.

However, something funky happens after running Make1Mesh 1.22, in that following a merge I have problems launching other plugins. Is it only me? Have you or has anyone else noticed a similar problem?

Sven

Yes, I was going to mention this but wanted to be sure that it wasn’t due to my particular set up.

The issue is that after running Make1Mesh the interface doesn’t update correctly when loading zscripts into the ZScript window. I know the cause - it is due to the use of IFreeze around the Loop in Make1Mesh which causes some sort of recursive behaviour (I had the same problem with one of my own scripts). The solution is to add the [IUpdate] command into the loop.