ZBrushCentral

Production issue - import and export of OBJ's

Zendo, if you have maya…as i do…do this:

Make the Uvs in maya in the o-1 space…then export .obj as usual. Go into Zbrush as usual and texture the object. When you export…only export the texture…its less clicking around and probably more efficient. The AutoUV tiles looks nice…but if you ever have to go into photoshop to hand paint something…its just not possible. If your Uvs are layed out in a way that makes visual sense, you can go in and paint the object. Thats my approach anyways because i have to be flexible enough to go between several apps for my job…and for somethings maya is faster…and for others pshop is faster…but zbrush is really fast and smooth(but crashes a lot!!) for painting models

Zendoftheworld: Here is a test ZScript which contains several export variations…

Click here to download the export-test ZScript

Import your mesh into ZBrush and then export the mesh by pressing each of the export buttons (rename the files accordingly). Import these objects into Maya and check the faces/vertices order. If you get a proper export, let me know which of these options has worked properly. If not, we’ll try another test :slight_smile:

I recommend that you make a test object that is not symmetrical to ease in testing.

2bytes: Are you using the latest version of TextureMaster? If you are using the latest version and still experience difficulties, please email your system specs and as much information as possible to [email protected] for further examination.

-Pixolator

He He Zendo
You are out of danger :slight_smile:
Pix take the problem by the horn :smiley:
Good luck !
Pilou

Hi Pixolator,

First - thank you so much for assisting with this issue. It is very much appreciated.

It will be of benefit to many and hopefully any improvements can make it into the future versions.

I am currently testing your script with symmetrical and asymmetrical objects.

I’ll be as thorough as I can and hopefully we can get this right.

I will let you know the result within shortly (may be tomorrow as it’s getting late here - I live in Australia and it’s 11:30pm at the moment).

Thanks again.

Cheers,
Zendoftheworld…

Dear Pixolator,

Well, here’s the result of my first test:

Basically, ‘method 1’ (the first button in your script" and ‘method 5’ (the last button in your script) were the ones that worked.

Well, sort of.

Let me explain:

Method 1 - this perfectly matches the typology and the original OBJ file, but, the textures seems to be on the wrong side as if it was flipped in X.

Method 5 - this doesn’t match the typology of the original OBJ file, but the texture does appear as it was painted in ZBrush.

For example, here’s both sides of my model in ZBrush being painted:

And here is what happens when these models are exported from ZBrush using your new scripts (method 1 and 5) and the UV co-ordinates and texture are applied to the original Maya object:

Therefore, the perfect export routine would:

a. keep the UV topology like ‘method 1’ AND
b. keep the texture on the correct side like ‘method 5’.

Can it actually be done, Sir General Master Monsignor Pixolator?? (please).

Cheers,
Zendoftheworld…

Hi Zendo
New suggestion :slight_smile:
For helping Pix Maybe you can in Maya try twice a function “Flip” for a sort of unify vertices and facets .
Pilou

At this point, the answer should lie with the Flip/Mirror deformations and the Texture flip buttons (maybe in conjunction with a Rotate). Unfortunately, I do not use Maya , so I have no way to test directly, or what functions Maya has for these kinds of manipulations.

Also, have you considered the possibility of writing a MEL script to take things the rest of the way? That is of course dependant on what Maya’s functions allow.

Hi :slight_smile:
Zendoftheworld: Not all 3D applications are using the same coordinates system. ZBrush coordinates system is designed to fit with the orientation of the canvas (which is facing the viewer) instead of the more common ‘floor’ based 3D system.You may be able to adjust for these differences in ZBrush (or in the other application that you are using) by following these steps…

  1. Create a test mesh in the other application, then assign UV coords and create a texture with easily identified markings (such as the one you did with ‘left’ and ‘right’ markings).

  2. Import the mesh and texture into ZBrush. Draw the object in canvas, enter edit mode and rotate the object to its natural orientation.

  3. If the object does not look as it did in the other application, try using a combination of the following controls to ‘realign’ the object…
    Tool :small_orange_diamond:modifiers :small_orange_diamond:Flip, Tool :small_orange_diamond:modifiers :small_orange_diamond:deformation :small_orange_diamond:Mirror,Tool :small_orange_diamond:modifiers :small_orange_diamond:deformation :small_orange_diamond:Rotate (90 or 180 degrees on any of the axis) and Texture Flips.

If you are able to produce a sequence of transformation to achieve the desired result then it will be easy to write a ZScript which will execute these steps automatically upon import.
4. If you are unable to find a satisfactory transformation, try applying a transformation in the other application, prior to importing it into ZBrush.

If you are still not able to find a solution, please email aurick a sample OBJ file and a texture with images of the object in the other application, for further examination. (In any case, it will be easy to resolve this in the next Z version :slight_smile: )

-Pixolator

Hi Pixolator,

The “Export 1” button/routine in the new script you wrote works perfectly.

It keeps the typology of my original object 100%. The only thing is that it flips my object in X, which is easily handled in Maya by scaling it in X by -1.

Is it possible to create a new script with only the “Export 1” button in it??

I know very little about creating ZScripts…so I am going to have to investigate further…

Thanks for helping resolve this issue. I’ll write a tutorial for all your ZBrush users who utilize Maya in their production pipeline.

I would dearly like to see something like this in the next version.

Thanks again Pixolator.

Regards,
Zendoftheworld…

Hi :slight_smile:

Zendoftheworld: You may click here to download the Export1 ZScript.
I have written two more export-ZScripts, one (or both) may be able to fully resolve the problem (including the X-Flip)…

First, click here and try this ZScript, if it is not working properly then click here to try the other ZScript.

Hope this helps :slight_smile:
-Pixolator

Hi Zendo
You are coddled :slight_smile:
Pilou

Thank you Pixolator!

Frenchy - the man is great for many reasons, not least his generosity and committment to his customers.

Many others should take a leaf (or forest) out of his book.

Pixolator - thank you. I will post results shortly.

Best regards,
Zendoftheworld…

Hi Zendo
“his book” ? The manual or a “real book” ?
I think that everybody will be interested to know !
Pilou

Hi Pixolator,

The first script worked well. The second seems to mess with the texturing a little.

Thanks so much for making these! How else can I show my appreciation!!!

Hey Frenchy - all I mean about taking a leaf out of Pixolator’s book is that others should follow his fine examples.

Cheers and regards,
Zendoftheworld…

I know it’s a little late to jump in this thread, but hey. The problem isn’t in Zbrush, it’s in maya. When maya exports an obj file, it reorders the vertex numbering.
I came across this thread while looking for solution for this very problem.
Does anybody know how to get maya to export obj’s without reordering the vertex count?

cheers,
Rudy

rudythegrozyni: The following tip is from Zendoftheworld’s tutorial in the ZBrush 2 Practical Guide, page 442

“When importing to Maya you need to disable “Create Multiple Objects” by selecting False in the Import Options box to ensure the vertex order doesn’t change.”

Fantastic…

thank you!

Found this old thread from 2001? maybe. So after numerous response’s from pixolator and many years later, has this problem been resolved in ZB3.1.
Im doing blend shapes in Maya but i’d love to do the sculpting in Zbrush.
Is the vert reordering still a problem when reimporting back into maya from Zbrush?.

Frank
[email protected]

Hi Frank,

Wow - you really dug deep to find that. The fix to this was discovered a long time ago and often quoted. Just disable the “Create Multiple Objects” option when importing into Maya and everything is fine.

Regards,
Paul

This is exactly the problem I am experiencing now in Lightwave. No matter how I flip my textures in Photoshop, my right ear texture winds up on my left ear. Do I need any of these scripts, or is there a built in solution now?

I find ZBrush extremely powerful and fun, but a nightmare if you want to get things in or out of properly. I spend more time scanning this forum than I do working.