ZBrushCentral

Import obj issues... are there workarounds or fixes?

I’m running into a few issues on importing objects into zb4R3.

First, the objects are being stripped of materials, and everything becomes “default mat”. Is there a way to import and retain material groups? (The surfaces were done in lightwave, and poser pro sees them fine.)

Second, (and more troubling) the imported obj file is being mangled by zbrush. is there an alternate way to import objects without this occurring?

Here’s an example: A simple lilly modelled to use micromesh on. On the right is how it was modelled, and how it looks in lightwave and poser. On the right, is what happened when I imported it into zbrush, and then just exported it back out.

(Note the detachment of the flower parts, and the shorter stem, as well as lower petal issues.)

Attachments

import issue.jpg

I’m not sure what the equivalent is in Lightwave, but in other programs you’ll want to freeze the transforms / modeling history before exporting the OBJ. If those parts are entirely different meshes, you’ll also probably want to use local coordinates.

Are you looking to import the mesh with different polygroups per material, or different subtools?

I found a workaround for the mesh deformation… zbrush needs to have closed meshes on 3d modelled objects. As long as you don’t subdivide the mesh, it’ll leave em undeformed.

Still no idea how to retain surface groups. There was an old poser import zplugin that I think retained them, but I don’t think it works on the latest version.

I’m surprised that surface groups aren’t just imported and converted to polygroups, or that there is at least an option for this.

The only workaround I can think of is break a mesh apart into seperate surfaced objs, and import each seperately, and assign each its own polygroup, and then merge the result.

For a mesh with a number of material groups though, that’ll be a chore.

I’d like to import the mesh with different polygroups per material. When you export in lightwave 9.6, it just kicks out a clean compliant wavefront obj that works in pretty much everything.

If the .obj in Lightwave was comprised of more than one element then ZBrush will import those elements as seperate polygroups. Turn on PolyFrame (Shift+F) to see if it has more than one polygroup. If it does then you can use ‘Groups Split’ to divide them into seperate subtools.

I could group the obj in lightwave so I could get seperate subtools, but the goal is to retain the surfaces, not the grouping.

Here’s and example of the issue and what I’m trying to accomplish.

Say I have a bucket with 3 surfaces, a handle, the bucket, and a handgrip. I’d have different material settings for each, as the handle would be metal, the handgrip maybe plastic, and the bucket itself wood. I could keep all the textures on the same uv map.

In zbrush, I want to replace micromesh with the bucket to make placing several easier. I use micromesh to obj, and have say 8 buckets placed as I want them. I make those all one subtool, and export that as an obj.

I load that set into lightwave again and apply the textures… BUt I can no longer change the material settings (say reflective chrome for the metal handle) because zbrush has lost my surfaces, and made everything defaultmat.

I create content for poser, and need to retain the material groups.

Does that make sense?

Having them all as seperate subtools could get unweildy very quickly.

ZBrush uses it’s own shaders and they are internal only. You can’t import shaders from other apps into ZBrush nor can you export ZBrush shaders to other apps. That is probably why you are losing your materials when you export back out of ZBrush. If you have UV’s on the .obj then ZBrush will recognize that and maintain those UV’s throughout the import/export process. I don’t use Lightwave so I don’t know how materials work in that app. If you want to retain the material groups in ZBrush, what you could try is, in Preferences > Importexport, make sure ‘Import Mat As Groups’ is enabled.

I don’t want to export zbrush materials, just keep material groups I’ve created.

(Its the same thing in modo, max, lightwave, silo, blender, hexagon, pretty much anything that outputs obj files.)

But that option might just do the trick! I’ll try it and report the results.

EDIT: Well, thats half the battle. The material groups import as polygroups, so at least I can select/deselect those for work in zbrush, but when you export the obj file, all the polygroups are lost, and everything reverts to a single polygroup/material group. 8/

HOWEVER, the exported file has its polygroups converted into wavefront groups, so I can reselect them and redo the materials again back in modo/lightwave/blender.

Is there a suggestion box anywhere where I can request that zb export polygroups as wavefront materials instead of as wavefront groups? If I was rigging a figure, I’d have lost the rigging groups going into zbrush and back out, with the rigging groups converted to the material groups.

(Of course, it looks like I’d be loosing either the wavefront format materials or the wavefront format groups.)

Ideally for best compatibility, zbrush should retain both materials and grouping of wavefront format obj files.

I’m surprised this hasn’t been resolved by now.

I’ll echo this in the r3 thread, so the developers see the issue, and can hopefully address it in a future patch.

Lol

This sounds like a pretty strange workflow to me to be honest, though I’m coming from a different background. I’m not sure if it strikes me more as using the wrong program for the specific task at hand, or doing things in the wrong order. I know in the bucket example you mentioned using zbrush just to place the props, but to me even that sounds like trying to use a hammer to pound in a screw.

Zbrush’s material system works differently so I’m not sure how well it would respect existing material definitions or if that would just be a waste of resources as far as its concerned, and I don’t think you’ll be able to force it to assign different materials to polygroups when they can’t even support different textures normally. Subtools would be a different story, and I’d probably prefer them over polygroups (plus I think the result would be cleaner in the case of the buckets; the meshes now have one material each rather than several clusters, remain physically separate items like in the real world, and it would let you set up a very simple parent/child relationship instead of having to introduce a rig or cluster-center deformations). And then there’s the alternative approach: a single mesh / material that uses specular and gloss textures to differentiate between things like plastic and metal.

Speaking for myself, I’d much rather have polygroups wind up as seperate polygon islands like they currently do rather than seperate material clusters. It seems to work out nicely for when I need to explode the mesh for a cleaner bake, force hard edges around UV seams, or merge meshes but still keep things seperated. I use objs extremely heavily between several different apps, but very rarely if ever do I use mtl files (most of the time I dont even bother creating them when exporting an obj as it just ends up being another file I’ll have to delete).

The bucket example was just a simplified one for explanation.

Here’s a better one. I’m working on an organic scene for poser or lightwave. I want to place 30 low poly flowers, and then use zbrush’s move brush to massage them to make them look different from each other, much like the demo video showing how to use micro mesh to replace it with 3d mushroom objects.

Then I want to export them so they can be loaded back into lightwave or poser.

Each flower has 3 different material groups, one for the flower petals, one for the leaves, and one for the stem.

In either application, the petals will have a transparency map applied, and the leaves will have more specularity than the stem or petals.

I’m trying to force myself to use zbrush and learn its strengths. (As an example, lightwave is dog slow when it comes to uv mapping, decimation, or other tasks, where zbrush is lightening quick.)

I’ve been using lightwave for more than 20 years now, but zbrush brings a host of new tools to the game that makes some work a million times faster, and I really am trying to stik with zbrush to learn it inside and out.

It sounds like Marcus released an update to the poser plugin back in Jan that will help resolve my issue a lot, and he mentioned he could add another additional feature that would resolve my issues entirely.

(I didn’t realise the poser plugin was updated to work with r2/r3 till this am.)

Does this make more sense now?

(And flowers are just one of a list of projects using zbrush in this developement.)

I’m not getting any of my Maya ‘sets’ recognized by ZBrush when importing OBJs…Previous to ZB4 no probs at all.

Bit OT, but also cannot get my ZTools older than ZB4 to load. Is this a Windows 7 64 bit thing?

There’s an option under preferences/importsexport to convert mats to polygroups… maybe that will help?

The poser plugin migh talso work if you save the object in obj format.

Good suggestion, and thanks, but it didn’t quite work…

However - I DID on a hunch just re-save’ the config file again, and wonders of wonders… it works now :sunglasses:

*Didn’t change anything, other than 'unchecking the ‘import mats’ button that you suggested, Garee…

Thanks again for diving in with some hints :+1:

Attachments

HeadSets.jpg

My pleasure!