Hi to all.
Zbrush have an Import option “Import Mat as Groups”. That’s good, but what about export. How to export polygroups back as multimaterial/material ID’s (different progs call it different)? I didn’t find any option for that. This is very important in many situations when you export model to another application (to render/animation/game engine) to keep this information. Especially when it’s some complex polygroups, it’s lot of work to redone do split it again.
You’ll have to export the polygroups in the OBJ, ZBrush doesn’t export materials (or write material tags in an OBJ file).
Hmmm…What do you mean by “Export the polygroups”? Yo mean option “Export subgroups”? But it does some differnt thing, it splits object to different meshes, it’s not the same. This way is good to export subtools in one obj not polygroups.
Or there is some another option that I don’t know?
ZBrush doesn’t export materials (or write material tags in an OBJ file)
So, If Zbrush doesn’t support exporting polygroups as materialgroups, can it be a Feature Request?)))
It’s absolutely easy, i think it can be done just by few lines of code.
Materials in obj as far as I know divided just by inserting such line in the table of polygons
usemtl materialname
And it automatilcally will be divided into different materialgroups without splitting a mesh. All the polygons after this line will be tied to this different material.
It can be used just “Usemtl Material001” “Usemtl Material002” 003, 004, 005 and so on…just need to insert such lines in the parts of the table where ends one polygroup and starts another one and it will be done
Of course it can be just an option. But it’s really useful one. Zbrush Polygroup and Material Group in obj is technically absolutely the same thing, so why not to export it.
The Tool>Export>Grp switch controls if polygroups are exported or not. Exporting polygroups won’t split the mesh, so if you are seeing separate meshes then either there were already separate meshes or the program you are importing into is splitting them.
Agreed, it wouldn’t be difficult to code exporting polygroups as materials. I may write a small plugin for it when I have time.
If want to keep polygroups while importing and exporting you can create a duplicated version of the desired polygrouped Subtool and create UV with UVMaster. Enable polygroups will create separate island for each polygroup. So if you want the polygroups back in the imported mesh from other program you can copy from the subtool you have correctly polygrouped and then paste in the new imported. Then Go to Polygroups And press Auto Group with UV
Maybe it doesn’t split it. But all the programs i tried imports it or just single mesh with single material ID or as separate meshes.
So yes, if there will be some sort of plugin and maybe will be in the next version of Zbrush it will be very very good.
If you’ll have a time and made this plugin, please pm me, to let me know.
][-][4Z4R][)) If want to keep polygroups while importing and exporting you can…
No, Thanks. I need some another thing. Vice versa, i need to keep my material Id’s/channels/domains while importing model to Zbrush (or if i made them in Zbrush) and back to another application. Because Zbrush isn’t the final apllication for these models, further i made animation and render this animation, and finally they used as sprites or as models in game engine.
Here some example of a final work…
https://dl.dropboxusercontent.com/u/84715405/!Show/HB/D4-Skaven.gif