Jump to content

Zbrush to houdini - displacement maps


jim c

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
Link to comment
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

Link to comment
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?

Link to comment
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.

Link to comment
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
Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

  • 4 weeks later...

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

Link to comment
Share on other sites

  • 5 months later...

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

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...