ZBrushCentral

Displacement texture Stretching

I have had problems for a while now with this, basically if you take a tube into Zbrush that has no end caps so its totally hollow, like a macNcheese noodle :slight_smile: and create a normal or displacement map it gets streched towards the ends.

I used the crease edge so that when I smoothed it I dont get it shrinking, you can see in the image that the volume is the same, the mesh on the left was my re-exported from Z brush mesh at lowest res, and the one on the right is the one from the highest res, so I can see that there is not shrinkage in the mesh that would maybe result in the texture pulling at the ends.

also there appears tp be detailed texture data that gets created in the dis map that goes beyond the uv set for the .obj file which further convinces me that Zbrush is doing something wierd to the UV’s when it creates the Dis map. I used the adaptive sampling and thats all I changed form the settings.example.jpg

This is a common problem I deal with everyday with ( subDs ) Renderman as well. I have also rendered displacements with Turtle. Have you tried turning on
UV smoothing in Zbrush when you subdivide? Then turn on adaptive mode.

When you render as subD the mesh is being streched/smoothed but
the map stays where it was. Its kinda like if you drew a smily face with a marker
on the back of your closed fingers. Then at render time you open your fingers
and the image gets streched. What you have to do is to “pre-smooth” the UVs
of your low-res. You can do this in a variety of ways, some can involve writing
custom code. One hack in Maya is to poly smooth your model ( turn on UV smoothing as well in the option box ) with history on.
Then in the channel box set the smoothing subdivision level back to 0. Your
UVs should still be smoothed. Then bring that mesh into Zbrush.
But you will still have problems at borders. Without custom code you will need to
tweak border UVs by hand.

I think I kinda see what you are saying, but what I still dont get is that it seems to be happening inside of Z brush when I create the displacement map itself, you can see where the texture is stretching at the edges, the bump spikes on the back of the mesh are within the uv region but when the map is generated you can see where it is streched off the ends, so even if at rendertime with my sub D’s there was somekind of tweaking goin on there is still a problem with the actual displacement texture that can never be fixed because is was generated with bunk data, like on that last spike on the bottom there should be a spike in the texture with skin on the other side before it hits the edge of the UV’s but the spike is steached out past the UV boarder, so the pixels that should describe what is inbetween the spike and the edge of the mesh boarder dont even exist

, does that make any sense…

oh and yeah I tried the UV smoothing and that just introduced an entire new set of problems :slight_smile:

what I guess would be best would be to just use Z brush to create the high res mesh and then export it as an obj and use someother software to compare the high and low and give you a hightMap, do you know of any software that will do this, I was looking at Melody which is a freeware app from Nvidia and you can load a low and High res model and generate a normal or Dis map, I will give that a try and post some results.

Well I took the meshes out of Z brush and used Nvidia’s Melody which is freeware from thier site, and was able to generate a displacement map with the end distortions!! whoo hooo, there was a small obstacle that was, you can just take your lowres cage in and compare cause you will get a map with segments where you polys are, so you have to smooth your lowres mesh several time to account for the sub D smoothing that occures when you render. I got pretty good results with 3 division smoothing in Maya. Now if I was just smart enough to write an app that would give you a displacement map based off 2 meshes but knew to turn your cage to Sub D’s before it generated the height data would be great!! any takers!!! :slight_smile:

if you look at the edges of this map and the edges of the other one in the post that was from Z brush you can see how Z brush is streching the edges of the texture.MelodyDIsEx.jpg

there is still a small problem and that is the edges of the smoothed out cage mesh dont line up exactly with the edges of the high res mesh so you get some small seems, oh well its a lot closer than before and probobly wouldnt be a problem on a contigouse surface creature.

By the way, here is an excellent tutorial about using the Turtle renderer for this.

Yeah turtle is what I usually use to check displacement results, I have been using mental ray as well but its harder to control the displacement offset, turtle is just so easy that its tough to go back to mental ray :slight_smile: