ZBrushCentral

Exporting PolyPaint for use in another program...

Hya everyone, Hi ZBer!

I’m wondering where I might find a detailed description of how to export an object and its polypaint out of ZBrush and get it into something else.
All the information I can find on the wiki is out of date I think and I have not found anything in the documentation…

Cheers and thanks!
Mealea

If you export the OBJ while polypaint is on, it should export with it. Xnormal should be able to read the data, and possibly a few other programs (some programs you may have to set up the material to use the vertex color data for the diffuse, while others might not even both to read the vertex color when importing the OBJ so polypaint would be useless in those cases).

The alternative is to give the tool a set of UVs, and use Tool: Texture Map: New From Polypaint to convert the polypaint into a texture. Clone the map to send it to the texture palette where you can then flip it vertically and export.

Thanks Cyrid…

For the first part Im not sure what you are talking about, but on the second part you have nailed where the problem seems to be I guess (the uv bit). I got Xnormal but have no clue what to do with it. Yet.

New From Polypaint makes a wild scrambled mess…
Making UV’s with the Uv pallet makes this worse or in most cases just hangs or crashes ZBrush.
When I am able to make uv’s they produce the most bizarre files, taking what was scrambled in new from polypaint and pixolating the hell out of it into lots of dots or just stuff that looks like a jpeg error.
Doing the uv thing takes a LONG LONG time (way over an hour) and I don’t even know what I’m making it for other then I have tried everything else and nothing works.

Anyhow I have spent three days and a lot more bandwidth then I can afford on this project and have gotten nowhere so far so I will have to stop till next month.

Thanks for responding Cyrid, I will read as much as I can about what xnormmal is as i can, maybe something will click.

Cheers!
Mealea

Doing the uv thing takes a LONG LONG time (way over an hour) and I don’t even know what I’m making it for other then I have tried everything else and nothing works.

Make sure you are not creating your UVs at the highest subdivision. Go to the lowest, create UVs then go to the highest level to create the texture from your polypaint.

For the first part Im not sure what you are talking about

Simply put: Zbrush will export polypaint information easily enough, but not every program will import it.

ZBrush will save an OBJ with it’s polypaint data as long as the tool actually has polypaint on when you export, but from there on out it’s up to the program you’re trying to open it with to do the rest. Polypaint is just a vertex-color property, and as far as I know vertex-colors are not a standard part of the OBJ file format. So the importer has to be a bit more specific in order to use that extra information.

New From Polypaint makes a wild scrambled mess…

That should only apply to human eyes, not to how the computer will read and display the texture. It should look fine when on the model itself.
If you want a texture that is more readable to our eyes, use UV Master instead of the Auto UVs.

If the result of either looks like a mess when on the model itself, this is most likely due to how zbrush flips the UVs vertically. You’ll either have to flip the UVs back, or flip the texture vertically.

Making UV’s with the Uv pallet makes this worse or in most cases just hangs or crashes ZBrush.

It would be better to try and give the mesh UVs on a lower subdivision level with fewer polygons to work with. If your lowest level has a considerable amount of polygons by default, it’s going to be a lot of information to try and process so hangs are unfortunately more common.

It certainly shouldn’t take any where close to an hour to do though. How many polygons does the sculpt have?

The OBJ thing I did not know as Zbrush isint putting out .mtl files or anything, but just the .obj. I see what you mean though, Zbrush sees the polypaint on a .obj it creates… That is an interesting thing… and might be helpful.

It does look like a mess, and it looks like the same mess when I try to wrap it around the object in another program, just painful visual static basically. If I understand what is supposed to be happening here I apply Uv’s to the object and then use them to somehow to make the poly paint image map correctly in the next program, in theory this would be stored with the object right?
The object is 1.5 million polygons with no subdivisions as I made it with Dynamesh, I tried to get it to “reconstruct subdivisions” but it has triangles in it and refused.
I tried again by doing the same process but doing the UVs on a violently reduced (via decimation master) mesh of about 1500 polys and got the same result, visual static but this time with nice hideous angles like an insane origami. Rather ugly…
The problem as I see it at this point is that since I have never managed to get a game engine such as Unity or Source or Udk to work I tried the worst thing in the world, the SL viewer… and I think that that may be where things are going wrong but I honestly have no way of knowing since literately nothing worked.
I think my next step is to try Blender, but while I was busy learning one version of that they went and altered the whole UI and now I have to re-learn it, not that I was any good at it before but at least I could find the sculpt tools!
GRIN!
So… If I can get this to work in Blender that will be a big start, then maybe see if I can move it around in Blenders Game engine.

Weeee!
It never ends!

Thanks again!
and Cheers!
Mealea

  1. Create low poly model.
  2. Set up UV’s for it.
  3. Subdivide it.
  4. Sculpt the details.
  5. Polypaint your high res mesh.
  6. Convert PP to texture & export it.
  7. Switch to subd level 1.
  8. Re-import low poly mesh.
  9. Extract normal map.

That’s the basics of low poly modeling for a game engine. You take your low poly mesh, texture, and normal map out of ZBrush to the next app and set those up so it displays properly. A low poly model should look as if it’s actually a high poly one. It is very important to do the UV setup early in the process when you still have a low poly mesh, preferably using traditional methods (pelt mapped UV’s with minimal seams).

If all you have is a high poly mesh with no UV’s, your going to run into trouble just as you’ve discovered. In this case you’ll have to retopologize your mesh (sure hope QRemesher comes out soon) which will give you your missing low poly model. There is no easy way to do this bit of long, boring manual labor lol. Then you can create UV’s using that low poly mesh and then create/export your texture maps.

If you model is 1.5 M polys retopologise it (either in zbrush, blender or other application)and then project back the high res detail.
With exporting the baked polypaint to a texture you’ll have to flip vertically or it won’t map properly in the external application.

Ok…
Now I think I see… Retopo is sort of out as this is very very convex in places… and has tentacles…
So…
I start over. (this is a good idea now for a nuumber of reasons)
I don’t use dynamesh (which is where the problem began I suspect).
When I have the basic shape set my UV’s and then sculpt and subdivide and so on till Im ready to paint.

EDIT:
I started over from scratch and got more inane results, Im going to try a cube with no subdivisions and see what happens…

Thanks you guys, if the cube does not work Im going to stop, I have been at this for four days nonstop and have acomplished nothing so far aside a lot of frustration…

Also Richard, I will look at flipping the texture, I was not aware of that… if that was the problem the whole time Im going to scream.

Cheeers,
Mealea

To get a lower res model you could use dynamesh. Not as good as manual retopologising but may be workable.
Duplicate your model, with your new version turn on dynamesh at a lower resolution than you were using before, project this onto your high resolution mesh. Subdivide your new mesh and project again. Repeat this process until you reach the resolution of your original but with added benefit of subdivision levels.

I’ve used this method successfully. You may have to fix some areas if you have trouble with the projection.

No need to duplicate the mesh unless you are doing it for safety. Just turn off Dynamesh, subdivide the tool, lower the dynamesh slider to like 64, click on freeze subdivision levels, turn Dynamesh back on. Turn it back off, unfreeze subdivision levels, and zbrush will do the reprojection for you, with subdivision levels.

As for UV’s, use PUV’s for creation. Worked much better for my polypainted heads than the other options.

Im going to try this, it looks very interesting, but I have a few things to learn first I think, Im missing soome step or some background concept here and Im not sure what but I WILL FIGGURE IT OUT!
GRIN!

I duplicate just about everything for that exact reason…

I’m getting the same results from high rez and low rez things made both with and with out dynamesh and with and with out subdivisions.
So my guess is that Im missing some part of the process but its so bloody long its absurd.

I realized that what I can do and should have been doing the whole time is recording everything as a ZScript and that way I could review what I have done to see what I missed.
That is next.

To keep from going crazy I will give this project a bit of a rest for a few days and see what happens after that.

Thanks again you guys, I think this is great stuff and I will get it!

Cheers!
Mealea