PDA

View Full Version : Displacement mapping not working properly


phobos
09-01-2008, 08:59 PM
Hi there.
I've recently finished modeling and texturing a head in Zbrush and I want to take it back to cinema4d for further developing.
I must have followed every single tutorial I could find on the net and after 5-6 hours of hair pulling I'm about to give up...
First of all the displacement map is close to call it aligned but not 100% there.
That's at least my explanation of the artifacts I'm seeing here. (especially nose and also eyes but I think the eyes are a different thing).
http://idisk.mac.com/dkatsafouros/Public/NoDetail.jpg
Second of all there's a weird artifact problem in the displacement map.
http://idisk.mac.com/dkatsafouros/Public/DisplacementFromZbrush.jpg
I don't really understand how this has happenned since the models geometry in Zbrush doesn't look distorted or whatever. The eyes is the only place this is happening.

And last but not least even if I disregard the problems above I can't get any decent detail out of the model. Not that the model is super detailed but there are some stuff like wrinkles and pores, I would like to get back. I'm also losing a lot of the shapes of eyes, chin etc. What is causing that problem? Is it because the subdivision 1 model has only 846 polys? If I apply the displacement on a level 3 geometry I can get a bit better results. But if I want to get my wrinkles back I have to crank up the displacement height really high which means that the rest of the model get's messed up in the process.
Any ideas would be greatly appreciated.
Thanks in advance

hakanpersson
09-01-2008, 11:00 PM
You could try to goto subD level 1 and press "reproject higher subdiv".
Its basically displaces the mesh the same way any 3d app does. Most likely it will result quite alot of trash you need to clean up. But if you generate a displacement map after that, I am quite sure your 3d app will be able to reproduce the same result with more accuracy. (pinch/move etc sculpts the mesh in a way displacement cant reproduce, reprojects is sort of a cleanup).


Btw, eyes tend to be a quite delicate process to render/displace correctly. Most of the time I prefer modelling them nicely in maya with subD/smooth proxy to make sure they are precise at that stage, and then avoid sculpting them too much in zb.

Pores and stuff getting lost in render is ofc difficult to know the reason for. Size of disp map? Amount of tesselation? Also remember zb viewport renders with hard edges, if you would import a raw highpoly you would notice huge difference when smoothing the edges.

spaz8
09-02-2008, 12:12 AM
I will try and take some guesses at what is causing your issues. Don't have much info to go on.

The artifacting around the eyes is common. It is the result of your UV's ending there. You could try and use "adaptive" mode when generating the displacment map but usually the solution needs to be more geometry up and into the eye socket where you would not see it and have the mesh/UV's end there hidden behind the eyeball.

As far as the map not lining up.. my guess is that the UV's have been smoothed as a result of making the model into a sub-divisional model. If there is a "Linear" setting for your UV's in Cinema try that. Also sounds like your mesh is pretty low poly which means it is changing a lot as you up-res it. Try using a heavier base mesh.. and play with using GUV's instead of a traditional unwrap. Possibly just use the GUV's as a second UV set just for the displacement. Hope that helps a bit. -Ken

phobos
09-02-2008, 10:18 AM
The re-project higher subdivision worked better for the eyes. The artifacts have vanished or depending on the strength of the displacement, not worth mentioning. I didn't go as far as level 1 to re project. I went to level 3, did the re-projection and after that I went to level 1 and redid that again. I had no exploding geometry.

The fact though is that I still can't get any good detail. And of course the nose artifacts remain there whatever I do.... The displacement map I'm exporting is 4096x4096, which is quite high. I'm not sure what "Amount of tesselation" means. You lost me there...

At one point I remembered that there are some quick codes in the displacement exporter specifically for each 3d application. I put one that is supposed to be for cinema and 32bit displacements. In combination with a higher res model it improved the nose artifacts a bit but not entirely. It's driving me insane.

To get any of the surface detail, I have to put the displacement height very high. As a result it deforms everything else.
Spaz8 there's not a linear setting but I'm guessing the equivalent of it is Alias1. The default is mip mapping which makes everything a bit more soft so I always check the Alias setting.
Is that what you mean? Whatever the setting though I can't get rid of the artifacts in the nose area. You can see the results in the picture I posted before. I really don't understand what's causing it. Just in case I'm posting a picture of the different settings in cinema.
http://idisk.mac.com/dkatsafouros/Public/Settings.jpg

spaz8
09-02-2008, 10:42 AM
What is being referred to as "amount of tessellation" is how dense the mesh is rendering. I think were thinking that the mesh is not sub-dividing up to millions of polygons at render-time so that is why your are not seeing fine details in the mesh. Ideally the mesh will render at or just above the same polycount as your highest subdivision level in zbrush.

As for the UV's.. what i meant was the UV's interpolation setting.. not the material/texture sampling. Try looking in the mesh/object properties for a linear UV setting. Basically it keeps the UV's locked to the layout of the base cage unwrap, since I am guessing the UVs are constricting when the mesh becomes a sub-d object.

phobos
09-02-2008, 01:53 PM
well I found out what was causing the artifacts in the nose area.
I had some overlapping uv's....
I'll fix it and the problem will be gone.
About the issue I'm having with the detail. I found a compromise between detail and polygon count. I have to apply a displacement on a level 4 model (53688 polys). But I think that the polycount is quite high. I'm sure other people can get lots of detail with less polys. My machine can easily handle the polycount. The same goes even for my machine at work which is an old G5. But I can't help thinking that it still is a lot of polys. Especially if you consider that there will be other objects in the scene as well.
Am I right or I'm getting insane???

hakanpersson
09-02-2008, 02:59 PM
A good balance of detail/polycount is to aim for a basemesh that works great to rig and animate at lvl 1, and that holds up well in zbrush without having too many polys so that you can use displacement entirely without pushing the memory usage to a panic level. If you can finish your mesh at ~2 million you can render it too, but if you need 8 millions instead you are in deeper shit:D

But you could probably skin your 50k basemesh right away and apply only a normalmap too, and avoid tesselation and displacement completely, and it would still look good. Its a question of quality/time and what your target platform is.

phobos
09-02-2008, 03:31 PM
For this model I'l just stick with what I've done.

Later on I would like to try the normal map method. Are there any good tutorials for normal mapping in zbrush? A quick search revealed only detailing of planes and not full 3d models. But that was a quick search....
If there are any please let me know!!

CGTalk Moderation
09-02-2008, 03:31 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.