Jump to content
jim c

Zbrush to houdini - displacement maps

Recommended Posts

I'm having problems getting my ZBrush displacement map to work in Houdini. Nothing I'm doing seems to work, and the posts make this sound so easy, that I'm obviously missing something. I'm a newbie to both ZBrush and Houdini, so I'm sure that's part of the problem. I'll try and explain what I'm doing and maybe someone here will be able to point me in the right direction.

On the Houdini side I'm using Houdini 10, and the VEX_zbrush_displacement.otl from the Sidefx Exchange site. I found instructions about a VEX_zbrush_displacement.pallete but I never did figure out what that was, where to get it, or how to install/use it. I'm loading the otl as a library for a specific hip file only, if I try it the other way, it pops up either error/warning dialogs, or the material SOP node shows warnings about a missing attribute, or something like that.

For ZBrush I'm using ZBrush 3.1

I created a sphere, subd'd up to level 5 (2.99 million points). I added a bunch of detail, so I have something like this:

testshape.jpg

I go back down to subd level 1, export the tool as an obj file. I create a geo object in Houdini, add a file SOP, and import the geo node. I use the pelt tool to create a UV set like so:

Fullscreen%20capture%207232009%2093116%20PM.jpg

Then export (from the pelt node) as an obj file. Back in ZBrush I import this new obj file in. In ZB, I go to the Displacement section, change DPsubpix to 4, DPRes to 2048, click on both Adapative and SmoothUV, click on Mode, and finally hit the Create DispMap button. Chug, chug, I have an alpha. I export this with DE Settings quick code of DE-JCGK-EACADA-D32.

I get a bunch of tifs, something like:

t1-uv2-6a.jpg

Back in Houdini I create a material node in the SHOP manager with the VEX_zbrush_displacement displament shader and the clay surface shader.

Fullscreen%20capture%207232009%2094634%20PM.bmp.jpg

Add a SOP material that points to this and render. No luck. Go to the Geo object's Render tab, and Geometry, and toggle on "Polygons as Subdivision". Still no luck:

de-testrender.jpg

Clearly this is completely wrong, but I don't know what I'm missing.

My understanding was that a displacement map would actually distort geometry at render time (as opposed to a normal map which only provides the illusion of this). However this doesn't appear to be happening. The houdini model is the subd level 1 version of the model, not the final hi-res version. My impression was that I didn't need to bring this in, as this would defeat the point of using a disp map.

Edited by jim c

Share this post


Link to post
Share on other sites

hey

in zbrush you have to export your displacement map with multidsiplacement 3 under zplugin to get a real 32 bit map.

this code for the exporter works fine for me for a 32 bit Greyscale map: DE-JCGK-EACADA-4D_D32 (and additionally turn on smooth)

when you create your map under the diplacement tab on the right bottom, and it becomes visible in zbrush under the alpha palette,

its 16 bit, and the de options exporter just saves it as 32 bit..)

then bring your obj to houdini with your uvs and take the simple displace material from the libary. just push the dicing of the obj a little bit

and it should bring perfect result.

on the houdini uv pelt side i cant give you advices as i do my uvs in a different package...

hope this helps

Share this post


Link to post
Share on other sites

@jimc

The OTL works fine for me - please send me the warning-details - I will check it.

Do I understand this right:

You created the sphere in ZBrush, you worked on the details in ZBrush, exported the model and got this in Houdini for pelt?

Share this post


Link to post
Share on other sites

@jimc

The OTL works fine for me - please send me the warning-details - I will check it.

Do I understand this right:

You created the sphere in ZBrush, you worked on the details in ZBrush, exported the model and got this in Houdini for pelt?

I meant to put what the error was, but last night when I wrote this I wasn't able to duplicate it (of course). I'll try again tonight.

No, the initial ZBrush export contained no UV. After bringing in the initial obj file into Houdini, I added a UV Pelt node ot hte file SOP, added a seam, and adjusted the Iterations and Boundary Springs till I got what I wanted. I'm so sure I did it very well, but that's a whole other issue. Previously, I had also tried using the UV Unwrap SOP, with default parameters. Once the UV's were adjusted I then exported the geo from Houdini from the pelt node, and then brought this new obj file back into ZBrush. Using UV Check, this verified that ZBrush was picking up the UVs properly.

Share this post


Link to post
Share on other sites

hope this helps

Wow, dead on easy. Sigh, I can't believe I blew most of a week on this, from trying to create shader networks from scratch, etc. Thanks for the help everyone!!

Share this post


Link to post
Share on other sites

OK one last "problem", though I suspect I know what is causing this.

Here's a shot from mplay:

mp-balrog1.jpg

From zbrush:

balrog-zb1.jpg

The mplay shot has little artifacts under the eye region, the front of the mouth area, where the horns join in the front, etc. I presume these are artifacts due to issues with the UVs? The UVs were created in Houdini by adding a UV Unwrap node, accepting the defaults, and adding a UV Brush node and adjusting the few vertices that were crossing over.

balrog-uvs.jpg

full link

Here's the resulting displacement map tif from ZBrush:

PM3D_balrog%20head2a-uv21001%2BD16.jpg

Full link

Assuming this is from the UV, is this just an issue of coming up with a better set of UVs? Or is there some other step I need to do in ZBrush or Houdini?

Edited by jim c

Share this post


Link to post
Share on other sites

Yeah, the pictures I showed are off a bit.

Actually I tried letting ZBrush create a UV map. AUV didn't look very good, but GUV tiles worked perfectly!

mp-balrog2.jpg

Thanks again!!

Share this post


Link to post
Share on other sites

I've never understood exactly what the pelt tool is for... doesn't it raise the surface a bit? So couldn't this be why its changing the look of the model, I think for this all you would need is the uvunwrap on the model and then the displacement should do the rest.

Share this post


Link to post
Share on other sites

I've never understood exactly what the pelt tool is for... doesn't it raise the surface a bit? So couldn't this be why its changing the look of the model, I think for this all you would need is the uvunwrap on the model and then the displacement should do the rest.

The Pelt tool is just another way to work with UV points. See this series of tutorials on UVs:

http://www.sidefx.com/index.php?option=com_content&task=view&id=996&Itemid=132

Hope that helps

Jim

Share this post


Link to post
Share on other sites

The Pelt tool is just another way to work with UV points. See this series of tutorials on UVs:

http://www.sidefx.com/index.php?option=com_content&task=view&id=996&Itemid=132

Hope that helps

Jim

I'm looking at these tutorials and i cant get the beak group to display the uvgrid. i'm stuck at lesson 4.

fst00005_lgt_seagulluvpelt_v004.hipnc

Share this post


Link to post
Share on other sites

I think you forgot to set the hint primitive (for each pelt/group) !

Share this post


Link to post
Share on other sites

I'm looking at these tutorials and i cant get the beak group to display the uvgrid. i'm stuck at lesson 4.

I'm not at home so I can't open the hip file, but check your visibility SOPs to make sure you haven't inadvertently hidden one of the groups. I'm assuming you followed along exactly, if so you'll have a bunch of visibility SOP that you can control the various groups with.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×