ZBrushCentral

Random materials to Polygroups

Hi! I have never had reason to think about making a ZScript until now. The reason is that the new Zbridge doesn’t allow you to send a subtool to Keyshot divided into subparts according to polygroups, the way Subtool Master do when you export a OBJ file.
The only way to get ZBridge (as i understand it)is to assign a different material to each polygroup. This can be tedious work if you have many subtools. So i started to look at ZScripting. But before i spend time to learn how to make a ZScript it would be nice to know if it’s even possible. In other words, what i need is a general script that can assign different materials to each polygroup of a subtool, picked in order from a list or a specific folder. After checking the command list i start to think it can’t be done. Can someone whith the right skills tell me if it’s worth trying.

Regards Izztor

It would be possible but I’m not sure how efficient it would be with large meshes with a lot of polygroups. You’d be also be limited by the number of materials available.

Basically what you’d need to do is:

  1. Split a subtool into separate subtools based on its polygroups. (Tool>SubTool>Groups Split)
  2. Cycle through the resulting subtools and embed each with a different material.
  3. Merge the result.

For a model with subtools you’d need clone each subtool before you split it, then re-append the merged result at the end.

I’ve read your reply Marcus.

Seems you talking about the manual way which i am familiar with and it is even simpler than you descibe it, you just hide all polygroups but one and you apply a material and then you do the same to all polygroups in the the subtool. And you work your way through all subtools.

Or maybe you where talking about the way it has to be done in a ZScript. In that case it probably takes a lot of scripting skills to put together something that works.

Maybe i just put some god music on and do it the manual way.

In either case thanks for your input.

Izztor

http://www.zbrushcentral.com/showthread.php?188035-BA-Thesis-ZScript-Creating-Masks-for-dDo-Quixel-Suite-and-Compositing

Izztor,

I was outlining a method that could be scripted. ZScript doesn’t have a way to isolate polygroups so other ways would have to be used.