Jump to content
3DCoat Forums

Export displacement/vector displacement to ptex


bergj
 Share

Recommended Posts

  • Member

I've been able to bake 32bit tangent space vector displacement and bring it into Houdini and render without errors, even when I bend and deform the object. This is really really good!!! However - the problem is that seams are especially bad on vector displacement maps. Im using mantra anyway which has a ptex node built in and its easy to render tangent space displacement files if you build an object to tangent space matrix.

First - about the tangent space UV bake..............

Im confused about the process. I go to texture>>>export>>>vdm>>> select UV set >>>>then chose from object space/tangent space/absolute (I choose tangent space)>>>> choose the map type (zero is black, not normalized), then I was told to choose a place to save the file. After that it generated the map.

1) Why isnt there a dialouge where I can select my "source" high rez object to bake from? For instance in mudbox you choose your HI and your LOW objects.

2) I assume it is taking anything near the cube and getting point positions and doing subtraction? How does it know how far to do this operation if I cant set any bound parameter or define what my HI is?

My main question about ptx vdm baking:

I imported a reference object (cube) into the retopo room and retopo>>>merge with ptex. Then, I go to texture>>>export>>>vectorDispl to ptex. After doing this the only options I get is what the filename is. I dont get to choose what ptex object to bake from, what space for the map or the type.

I look in a ptex viewer I have and obviously nothing has been written and the file size is only ~400kb. Not only can I not choose the LOW object but I cant choose the HI or any options. This is a major issue and is the same with displacementToPtex and vdmToPtex. I tried using the regular dialogue for UV vdm for my Ptex vdm and renaming it but obviously the math is different and this doesnt work.

post-12185-0-32150700-1346376911_thumb.p

Link to comment
Share on other sites

  • Advanced Member

I'm sorry bergj i didn't understand everything(sorry for my french).

I never used the 3D Coat vector displace extractor one, because i'm very new to 3D Coat and i created mine.

But as far as i know you can only bake vector displacement in a shared space between 2 objects , the UV space look to be the choice to do but i'm not aware of the last development .

So it looks obvious to me that you should create your tangent space in Houdini from the UV set that you used to calculate the "vector displacement map" and to read the vector from the ptex transfered vector map to displace your fragment or vertex position.

Hope it makes sense,

Pixo

Link to comment
Share on other sites

  • Member

yes, I can already do vdm onto UV. The issue is the lack of settings when I press "extract vector displacement to ptex" - it only lets me choose a file name instead of the relevant, required parameters and also does not let me specify the hi and low object.

Edit: unless what I should be doing is using the "absolute positions to ptex" feature which gives the following values. They dont actually correspond to the HI object when I baked onto my low when I map them to the diffuse channel to cheq. The hotspots should be where the spikes come out. this is definetly incorrect.

I have my shader set up as follows to get the relative tangent space - I would have to change it to get absolute to work if the baking would get fixed. I know that normal, binormal, tangent are orthagonalized and normalized against each other.

7af2fab7.png

8af9caec.png

4116b526.png

Link to comment
Share on other sites

  • Advanced Member

They dont actually correspond to the HI object when I baked onto my low when I map them to the diffuse channel to cheq. The hotspots should be where the spikes come out. this is definetly incorrect.

You should report it to http://3d-coat.com/mantis,normally the ptex map should correspond to the value baked onto the regular UV if it's what's you meant,I'll test it .

By the way, how did you get this network? i'm not a houdini power user ,i did some long time ago.

How do you compute the tangent (computetanFromUV),from which ST or UV, set ?

I'm just surprise that the _utan is considerate as the surface normal instead of the tangent.

Did your texmap take care about the color space? linear or sRGB, float or 8bit ,how do you linearize it?

What the "multiply by neg1" and the "setNormal"?

Take care,

(sorry for my french)

Pixo

Link to comment
Share on other sites

  • Member

I actually got it to work. I imported a plane as ptex, and went to the sculpt room and used the move tool to make the following. Then, I did extract ptex vector displacement with Flipped ptex checked. This gives me results that are usable and look like absolute tangent space.

89711864.png

Link to comment
Share on other sites

  • Reputable Contributor

I actually got it to work. I imported a plane as ptex, and went to the sculpt room and used the move tool to make the following. Then, I did extract ptex vector displacement with Flipped ptex checked. This gives me results that are usable and look like absolute tangent space.

That's good to know...sounds like the workflow for exporting PTex file for VRay, as well.
Link to comment
Share on other sites

  • Member

I have an issue now where if I want to import a high resolution mesh as Big Mesh and bake onto it that the ground plane that should be black (0 displ) is now blue meaning that it will sink in when rendered and lose the original volume. I tried adjusting the bake parameters in the retopo room to 0 for in value but it doesnt do anything.

The above image that was created in the sculpt room only has the correct value of the unsculpted plane being black but if i save this hi rez out to an obj and import it back in as big mesh it bakes incorrectly.

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.

 Share

×
×
  • Create New...