ZBrushCentral

max 7 obj export to zbrush problem

I started and finished my model in zbrush. I import my model in its is lowest resolution into max, and add the uv’s. I export it from max back into zbrush replacing the lowest level with the new one that has the uv’s. It displays fine until I increase the resolution, and then my model goes insane.

I’ve spent alot of time searching the forums, and tried some of the suggestions, but haven’t found anything to do the trick yet. Has anyone solved this problem?

I’ve read it has something to do with max changing the vertex point order, but I can’t for the life of me prevent it from happening. In fact I’m not sure if max is doing it on the import, or on the export. I’m randomly changing settings between the two but nothings helping so far.

Here’s the settings I’m using.

Here’s a link to another thread with the same problem, but in maya:

http://www.zbrushcentral.com/zbc/showthread.php?t=17541&highlight=point+order

Attachments

import.jpg

export.jpg

Hi

I’ve had the same problems, and I believe some other people had had them, too. If I recall corretcly, it had been resolved that ZBrush doesn’t really like models to be re-imported on the lowest level with an altered UV layout, although it should be technically possible. I’ve tried a hundred times, but the model (and mapping) always get screwed up.
http://www.zbrushcentral.com/zbc/showthread.php?t=22062&highlight=normal+map

I made a compilation of ZBrush and 3DMax in PDF format related to thread posted here.-
I will put soon in my website to allow you to review¡
Thanks for your attention
Andreseloy

ps: is right now in my website

Great! I am sure looking forard to your compilation. It must have been a mammoth project to extract all interesting Max-related information from the dozens of posts…

Thanks for the help. It appears, so far, that an ideal solution has yet to be discovered.

ZaBenKei, thanks for that link, it was helpful. I never thought of creating a displacement map. That sounds like a good work around for now. I was so caught up in trying to solve the problem in a particular way. Doh!

andreseloy, I look forward to your compilation of max stuff. The forum search feature is great, but sometimes it is still hard to find what you’re looking for, so I’m sure that’ll help alot of people.

Any other ideas in the mean time? I’d like to hear of other clever solutions people use for this issue.

That displacement idea didn’t actually work out for me. I’m new to displacement, and didn’t realize the map I created would be dependent on uv’s. I guess that should have been obvious:o

I tried creating a displacement map in zbrush using the automatic mapping. I then separately imported my model with the new uv’s from max into zbrush and tried to apply the displacement map. I got a bunch of turds growing on my model :lol: at that point, and realized that wasn’t going to work.

Anyone have any brighter ideas? Back to searching the forums for now I guess.

Well, you probably changed the vertex list when you did the UVs - they’re stored in the vertices, after all and Max might not keep it the same a you do vertex-level operations. What exacty do you need the UV’ed mesh back in Zbrush for? To computer a normal or displacement map? Rather than trying to fix this in Zbrush you might be better off using an external tool, such as ATI’s normalmapper or nVidia’s Melody. Search the web for lots of links.

Also, if you have access to Maya you can use it to remap textures between different UV layouts. So you could transfer the Zbrush-generated tiles to your Max-generated UV layout and restore your mesh that way. Not sure how well Maya deals with the seams, though, it’s doing a render-to-texture. I’ve never tried to remap something as crazy as hundreds of small tiles.

Hi there. I’ll admit I don’t know how uv mapping works either, aside from how to get it done. This is all pretty new to me. So what you said about the uvs being stored in vertices and changing the mapping alone can change the vertex order is news to me.

Am I understanding that right?

I can’t use Maya yet so that’s a no go but thanks for the suggestion anyway.

What I’ve done is I’ve created a low resolution model in zbrush, and took it all the way through detailing. Then I baked the shading detail of the high resolution model onto a texture which will be applied on the low resolution model.

Upon jumping back down to the lowest resolution with the baked texture applied I see my model looks a little ugly, and at the next resolution level the polygon count is too high. So I decided to export my model at the second resolution level and cut off his hands and modify his head a bit, which were using way too many polygons and weld on the lowest resolution hands. So now I’ve got a modifed low resolution model which I can’t import back into the subdivided, and detailed hierarchy in zbrush.

I was using zbrush automatic uv mapping to make things easy, but now I want to find a way to take the baked texture off the high res model and apply it to the modified low res model.

My solution was to create similar uv layouts for the modified low res model and the high res model so I could use the texture for both of them. I’m not even sure this will work, but that’s what I’m trying to do anyway.

I’m having a problem changing the uv layout on my model back in zbrush now though. So is what I’m trying to do not possible then? You mentioned above that changing the uv layout will change the vertex order, so does that mean I’m screwed?

Just to make it clear, the model I’m trying to import back into my zbrush hierarchy has not been modified at all other than the uv layout. I’m dealing with the reduced poly model separately.

perhaps I’m missing your point a bit, but if it’s not about making normal or displacement maps,why don’t you use Projection Mster to bake the shading etc. of an arbitrary model onto your (new) low-poly model? The workflow is to drop your lowpoly model (be sure to turn DSmooth and DRes in Display Properties to 0 first), create a new layer, draw your highpoly model, edit, conform to the shape of the dropped low poly etc., bake layer, switch back to the layer that contains your dropped low poly. Select tool–>Cloner Brush, turn off Retain Center, but turn on Layers Mode.
Use the cloner brush to copy all color information of the high poly to your low poly, then pick it up again.
Sometimes, this doesn’t seem to work at the first shot, so you might have to repeat the procedure once (using the two layers you already created).
Once the texture has been baked in successfully, delete the second layer, clear the first one and re-draw your lowpoly with the newly created texture.
Sounds complicated at first, but it really isn’t.

cheers
Ben

Hi ZaBenKei,

You’re probably not missing my point. I’m sure there are better ways to achieve what I’m trying to do. The thing is I’m using the material baking script which is the simplest way to get what I am looking for as far as I know. I think that it requires the low res model and the high res model to be in the same hierarchy. So maybe that explains where I’m coming from a little more.

Thanks for explaining that alternative method. I’ll give it a shot and see what happens. That would free me up from having to have the low and high res models in the same hierarchy, and then I could make edits between them without worrying about importing back into the hierarchy.

hey all… i just unfortunetly ran into the same problem here. i have to use max for work now even though i’m a maya guy… and as you know maya does not have this problem… so i did some research and many trials and tests and have come up with some interesting results… this might be a little tough to explain so bear with me on this one… now… to figure out the problem here what you have to do is analize the difference between objs coming out of max and coming out of maya… if you do you’ll notice that both have the same exact vertex ordering and same vertex normal information… what is different is the vertex face ordering. I’m not sure exactly why max does not do this the same way…but for some reason its happening… and obviously zbrush cares about this!! so lets think about this for a second… lets say you bring an object into zbrush… smooth it a bunch of times… then lower it and export the object out again… what really changed… the vertex order stayed the same… and the vertex face order stayed the same… but the vertex normals changed… so what happens when you import it back into max… it should take all that information in… however… it seems zbrush decides to redo the vertex face information in the same way maya does when you import it into zbrush… which means that after you do your uv mapping in max after importing it back in… and then export it again… max puts the vertex face ordering back the way it likes it… which is different from zbrushs… hope you’re all following me here… so to get around this i took the obj that was exported from zbrush… opened it in wordpad… then i took a newly exported obj after being in max and opened that in wordpad… if you scroll all the way down to where all the “f 1/1/1 2/2/2 4/4/3” begins… and copy all the “f” from the one that zbrush made… and past it over all the "f"s from the exported max one… then save the max one again… then import the max one into zbrush… it should work… however… here lies the problem… if you change the uvs in max… the f’s will change… in my example the second number after the first / refers to the vertex texture coordinate… and if you change that in max… it probably wont refer to the right one… i haven’t tried this yet… just assuming… a way around this might be to have a copy of maya floating around… i’ve found that going back and forth between maya and max with obj has been perfect… so i’m pretty sure if you uv the object in max… export it as an obj. then bring it into maya along with the imported obj from zbrush…(bear in mind the only way this works is if you have “false” selected in the obj import options) then do a transfer of uv coords… it should transfer perfect… then you can export the transfered one out of maya as an obj and it should work perfect in zbrush with all the texture coords in there… i realize this is a pain in the butt… and all of this hasn’t been tested… just my theory right now in the late nite… if someone else maybe has any insite on this maybe we can try to figure out an easy way of fixing this problem… it really shouldn’t be that hard if you break it down… hope this was helpful to someone…

I’ve no insight in this vertex reordering issue but some suggestion that might help in the workflow between 3ds max and Zbrush.

max OBJ export - Vertex reordering:

Personally I didn’t encounter this problem (at least until now) but I’ve heard other speaking of it. PEN suggested (on CG TALK) to export and import using the FBX format and using the free FBX converter to convert this to the OBJ respectively the FBX format. I’ve tested this and found no problems. I only had to activate the MRG button in Zbrush on import.

Loading new UVs into an existing Zbrush model
:

TVeyes explained the procedure if you only want to change the UVs:
"Importing a mesh into an existing Zbrush tool does two things. One is to replace all the vertice position data and secondly replace the UV coordinates.

If you only want to change the UV data you can store a morph target at subdivision lvl 1, import you mesh with uv data and then switch your morph target (Tool > Morph Target > Switch). That will move the vertices back to where they were before importing."

Loading new Uvs and changed geometry into an existing Zbrush model:

With one model of mine I inserted an additional step in order to use its changed geometry:
I had exported the model in its cage state and then moved its vertices inside 3ds max. Before reimporting the altered geometry in Zbrush I had to build the cage state again. Doing so kept the geometry intact on the higher levels.

Or you can simply reapply your displacement map to your altered model.This approach is described by Aurick in the thread “Updating/Refining generated Displacement maps”.

Hope that helps,
Andrea

Thanks for that information Diamant, and Boa. I’m going to have to try out those ideas and see if I can have any sucess.:slight_smile:

Hi again Boa. I tried your suggestions but couldn’t get them to work for me :confused:

I tried the fbx converter first. Just for an experiment I exported my low res as an obj from zbrush. I converted it to fbx, and then directly back to obj using the converter. When I tried to import back into zbrush it said the models don’t match… face count or vertice count blah blah. I can’t remember the exact error message at the moment. I tried with, and without the mrg option in zbrush too.

Why can’t stuff just work?!@!:angry:

Just for fun I tried TVeyes morph target method for switching uvs. I export my low res as obj, import to max, slap an unwrap uvw and automatic flaten mapping, collapse the stack (not sure if that’s necessary) then I export. I create a morph target in zbrush, then I import the obj with new uvs. I then hit switch to hopefully fix whatever is screwing up. I go up to the next subdivision level to make sure everything is ok and my model blows up again. Surprise! :laughing:

I’m not sure I understand what you mean about the cage method you describe. Would I just export my model at its lowest subdivision level as usual, tweak it in max, then hit the cage button before importing back? Or do I hit the cage button before exporting, and before importing back?

When I hit the cage button I get a really ugly low res cage compared to the interpolated one zbrush has created based on the high res. I’d like to work on the interpolated low res model if possible.

The displacement method sounds interesting. I can’t say I thought of trying that. I’m going to look up that thread and try that out as well.

I’ve actually adjusted my workflow to avoid the need to export my low res model after subdividing and detailing it so hopefully I won’t have to deal with this at all, but since I have encountered it it’s still bugging me! It would be nice to know that if I need to tweak my low res outside zbrush after subdividing it and detailing etc I could. Oh well I guess for now.

Your help is appreciated, thanks again. :+1:

Sorry to hear that it still does’nt work.

The FBX workflow:
In my test I imported and exported the FBX format to/from 3ds max, I used the OBJs between Zbrush and FBX. This worked for the test … I’m sorry, I know that doesn’t help you now.

The Cage method:

Before you create a displacement map you are supposed to do one of the following:

  1. Loading your original Level1 tool or obj into Level 1
    OR
  2. Switching back to the stored morph target (stored on Level 1 before sculpting on higher levels)
    OR
  3. Press the cage button (which results in the ugly low res cage you saw)

Only after that you should create your displacement map. See the phone tutorial in the zbrush help for the exact procedure.

With one model which I exported to obj in its cage stage I used the cage button on import again because I wanted to make use of changed UVs. With the cage button still pressed I could go to higher level without seeing my model blowing up.

Just an idea: Have you checked for overlapping UVs? They could be responsible for models going crazy.

I’ll have to play around with your suggestions some more. If they work for you I must be doing something wrong. I don’t think I’ve got any overlapping uv’s because I’m using guv tiles.

Well thanks again for all your help. :slight_smile:

In case you’ve used one of the ReSym functions after you applied your GUV Tiles it is quite likely that your UVs are overlapping. Usually it is only one UV polygon that goes crazy. Good to be aware of that bug of (Smart) ReSym before using it. Especially if you have painted an detailed texture already …

Good luck with your tests. If you find any reason for the misbehaving model let us know!

Andrea

Well that’s interesting to know. I wasn’t aware of that. As a matter of fact I have been using the smart resym quite a bit. I’ll try applying guv tiles again before I export to max. I tested the workflow using maya the other day export obj from zbrush import to maya, move some verts, export from maya, import back to zbrush and increase my subdivision level… no problems. I do the same thing in max kaboom object explodes!

I’ll give that last suggestion of yours one last shot though. Funny thing is I’ve been so busy making changes to my workflow to get around this issue I forgot why I wanted to do it in the first place :lol:

I’m going to go back and check my first couple posts to see what I was trying to do now :smiley:

Hi.
Coming in late but glad I found this thread.

I’ve been using Blender to import my Max 7 obj models before importing into ZBrush, then export them again as obj’s. They are rock-solid in ZBrush. I know Blender is another learning curve but it’s a simple File> Import obj, and File> export obj, & quit Blender.
Oh yeah, Blender also adds a box to the project which you have to delete before you import your Max model.

A bit annoying, but 100% success rate so far.

Upham :slight_smile: