Not there yet? Post your work in progress here to receive feedback from the users.
User avatar
By Voidmonster
#259624
Image

Over the next couple days I'm going to try and work up a brief tutorial of my workflow for getting ZBrush into Maxwell.

Until I do, I'll share a little bit of how I did this particular image.

First and foremost: my ZBrush workflow is strange. I use AUV tiles exclusively and do all my texture painting directly in ZB. I haven't tried to do this with traditional unwrapped UV models. If you're working that way, I'll have some suggestions later on.

Secondly, I use 32bit displacements. 16 bit are probably sufficient though. Here are the Displacement Exporter codes that generate (what is for me) usable displacement maps:

32 bit: DE-JCFK-EACADA-D32
16 bit: DE-FCFK-EACADA-D16


Third, I always subpatch my exported ZBrush mesh before exporting to Maxwell. It lets me have a bit of control over how dense the mesh is and it's usually a good idea to have a slightly denser mesh for displacement than it is for modeling in ZB.

Once I've got the model textured, sub-patched and ready I start tweaking the displacement values.

Several important things:


ZBrush models export huge. Huge as in scale, at least when importing to Lightwave. I always scale my models to the appropriate size. Scale is very important to Maxwell, get it wrong and it will look wrong.

There is no universal 'right' displacement height. You will need to tweak this parameter a bit. Unless it's set to Absolute Height the value represents a percentage of the total model size. A setting of 1 means that a 1 meter tall object will have displacements that move a maximum of 1cm. Since the default is for an offset of 0.5, that means 500mm in and 500mm out (I may be wrong here). Height values that have worked for me range from 1 to 5. I suggest getting the camera close, having a reference from ZBrush handy to compare against and tweaking the value until it looks right.

The default 0.5 offset is correct for ZBrush. This means that Maxwell interprets the median color as neutral. Darker indents into the object and brighter sticks out.

I tend to use adaptive precision. You shouldn't because you probably don't have as much time as I do to just let things render. Adaptive works fine for me because I tend to just let things render overnight and 8 hours of rendering doesn't really mean anything to me. Adaptive means I don't need to tweak anything else. Before I do the real tutorial I'll try and figure out what that value should be. I suspect there are 'good' numbers based on mesh density. IE: model has 30,000 polys, use a Precision of 16, or something like that. I still need to do tests though.

And there you've got the quick and dirty method I use for getting from ZBrush to Maxwell. Before I write up the more in-depth tutorial the things I want to address are:
  • Using traditionally UV unwrapped models
    More depth on the Height value
    Much more depth on Precision
User avatar
By tom
#259635
Zak that's a great example and your directions are correct, about height and all. As you've said Adaptive is a quick shortcut to fetch the maximum out of it but of course you could play with precision and save a lot of time. With adaptive turned on, density of the base mesh has an opposite relation with rendertime, so that's good you subdivide it more than usual. On the other hand, 32 bit is surely has more precision which prevents stepping and probably the difference with 16 bit wouln't be remarkable -at least- for this example. Because, the heights are not that excessive. Waiting for your tutorial... Thanks!
User avatar
By Voidmonster
#259739
Max, I've done some testing with unwrapped meshes. I did run into an issue -- ZBrush gets stupid if the mesh has overlapping UVs (like a Poser model). However, if you separate each UV'd part into a subtool, all is well.

You still have to flip your textures though.
User avatar
By Hervé
#259742
Mubox also does not like overlapping UV's.. pretty normal if you think so... :roll:
User avatar
By Voidmonster
#261035
It has (probably unsurprisingly, since I started doing this in the middle of a project) taken me much longer to get back to this than I would have liked.

I'm not yet ready to do the full tutorial, but I'm starting to run some tests now.

I thought I'd post here and see if some of the folks who're much smarter than me could chime in.

What I'm trying to do right now is isolate the formula for just how much displacement height to use. I know that the same ZBrush model exported from SD1 and from SD2 require different amounts of displacement.

I think that displacement height is related to the percentage difference between the low res model and the highest subdivision level.

For example:

Model exported at SD1
800 polygons.
displacement height = 6.5 (approx)

Model exported at SD2
3000 polygons
displacement height = 2 (approx)

It really looks like there should be a formula for figuring out the displacement height value. I'm currently trying to figure it out through experiment, but this kind of mathematical experimentation is not a strong suit for me. I'm hoping someone else here find the formula while I flail around blindly at this math crap, but if not I'll eventually track it down and share it with everyone.
User avatar
By Voidmonster
#261037
For those interested, here's the model that I've been working on to render in Maxwell.

Image

(The missing hand is inside of another item)

I've already actually gotten this rendered in Maxwell, but I didn't like the model and went back and significantly reworked parts of it.
User avatar
By Mihai
#261067
Very cool model :D
For the displacement height, perhaps there is a relationship between the offset number that Zbrush gives you after creating the displacement map and the height we should set in Maxwell to get the exact same height as in Zbrush....
User avatar
By -Adrian
#261071
Nice model and sculpting!
User avatar
By marcotronic
#261167
very nice, Zak. May I ask you which host app you use? (Maya?) Or did you render this mesh directly in Maxwell Studio?

Thanks,
Marco
User avatar
By Voidmonster
#261228
Thanks for all the kind words about the modeling. :)

From the folks here, it means a lot!

Mihai:

I need to investigate the numbers that ZBrush spits out along with the displacement. (area whatever) I'm not at all sure what they mean. Preliminary toying with it didn't help.

So far I've found that with a specialized setup, it's not too hard to quickly isolate the right displacement height. I haven't needed more than 3 renders, and they don't need to go for more than a couple minutes to see if the displacement is correct. Still, when I finish this project (oh man has it been eating my brain) I'll try and figure out a solid formula.

Marco:

I'm using Lightwave as a host app. The LW plug-in is good enough now that it's where I prefer to work. Doing surfaces is way, way faster for me in LW than in Studio, mostly because the image manager is a lot faster.

Max:

I did some tests to try and use normal mapping instead of displacements. It's so very, very tempting. The difference in render speed is amazing. On the test scene I was using I got a benchmark of 45 using adaptive displacement and somewhere in the vicinity of 250 using a normal map. Unfortunately, the displacement was so much better that I didn't pursue it any further.

I'll probably go back to that technique later though. I think with tweaking I could get it close to the same quality.

What I was doing was to generate the ZBrush displacement as well as the normal map. Then I used Lightwave's native displacement system with the ZB displacement and layered the normal map on top of that. Maybe if I make the base mesh dense enough (and pre-displaced enough) the normal map will take it the rest of the way.

Have you had any luck getting UVs moved between ZBrush and Maxwell? I'd really love to see your knife rendered with proper displacements! That was looking really awesome.

If all goes well I'll have the full scene rendering tonight.
User avatar
By Maximus3D
#265274
Zak: You had time to progress any more with this ? i'd like to see you finish this already nice piece of work. :)

/ Max
User avatar
By NicoR44
#265276
:shock: how did I not see this one :oops: looking great Zak!!! love to see some new renders!
Last edited by NicoR44 on Thu May 01, 2008 9:34 am, edited 1 time in total.
render engines and Maxwell

"prompt, edit, prompt" How will an AI r[…]