Archive for August, 2011

DAZ Studio displacement in Carrara 8

So I have started to get back into 3D graphics lately. It’s been almost a year and a half since I’ve done anything in this. Currently I’m trying to work in Carrara 8 from DAZ 3D. C8 is a full featured 3D package with modeling, animation, etc. and it supports the Poser / DAZ Studio characters and other content. I like the program, but am finding it hard to convert how I thought about my images in DAZ Studio over to C8.

My latest challenge was trying to work with Stonemason’s Streets of Asia set in C8. Stonemason is a great environmental content provider and supports DAZ Studio really well. But as with most things in 3D graphics, what works in one program doesn’t work in another. Or at least not the same way. The case I’m looking at here is trying to get the displacement maps which worked great in DS to work as wll in C8.

DAZ Forum Threads

The original thread discussing this experiment / project is here: Trick to Displacement?

To allow new Carrara users to find this blog entry and the discussion, I also created a new thread: Handling Displacement

DAZ Studio

I setup the shot I wanted to do in C8 in DAZ Studio 3. I added Streets of Asia and a single distant light to simulate the sun. For the purposes of this experiment, I hid the ivy that is normally on the left side of the opening in the Ached Wall that is part of the courtyard. The following image shows how it looks in DS3 (click to see it bigger).

In particular, note how the writing is carved into the walls and the stones in the lower left and right corners have depth to them.

Carrara 8 – Default

I created a new scene in C8 and imported Streets of Asia into it. I adjusted the default distance light and camera to match my DS setup as closely as possible. I hid the ivy here too and hit render. The following image shows what it looks like by default.

See how flat the wall looks? The stones in particular look like they are painted onto the wall (which in fact they are in 3D speak, just not how they should look in the final image).

Carrara 8 – Displacement

Being somewhat obstinate, I ignored some of the advice given in the thread I referenced. My thought was “Stephan created this with displacement in mind, I need to get that to work.”. So I loaded his displacement map into the shader, made sure displacement was enabled and hit render. I got the following image.

Believe it or not, there is a little difference between the two, but you have to look REALLY closely. You can crank up the amplitude of the displacement, but all that does is bring to light one big difference between C8 and DS.

DAZ Studio automatically subdivides most surfaces. Especially when bump or displacment maps are applied. These added polygons and vertices allow DS to increase the density of the mesh for rendering and improve the fidelity of things like the displacement effect. Carrara doesn’t do this by default, but you can turn it on surface-by-surface in the shader room. So, I turned on subdividing in the shader settings at the default level of 2 passes, and got the following result.

Better, but you see the grooves in the lower left part of the wall? That’s because the wall is made of polygons that radiate from the central opening. Clearly 2 passes isn’t enough. Now C8 warns you that each pass of subdivision can add up to 4 times as many polygons. Since I’m just doing a single image and don’t have to worry about the computational cost of doing that for each frame of an animation, I’m ok with whatever it takes to get the image I want. The following series shows how sliding subdivision passes up to 4, 8 and 10 (maximum) improves the results.

4 Passes

8 passes

10 passes

Interesting to me that the application of Stephan’s displacement map in C8 seems to be picking up some noise in the texture that DS didn’t see or pay attention too. You can see it especially in the pits and bumps on the stones in the lower left.

Other than the noise, using 10 passes (which took about 2 minutes on my computer) clearly gets decent results. I could probably clean up the noise myself in GIMP or something, so I seem to have solved how to get Displacment to work in Carrara.

Carrara 8 – Bump

Most people would probably declare the 8 or 10 pass renders “good enough” and go on. But I’m still not totally happy that I don’t have the DS image replicated in C8. So I decided to try loading the displacement map directly into C8’s bump channel (and turn off Displacement). Rendering using the default bump settings got me the following image.

If you’re wondering where the bump is, don’t worry, so was I. 🙂 So I cranked up the bump amplitude to 50% then to 100% with the following results.

Bump @ 50%

Bump @ 100%

So it’s not bad. The noise I menitoned earlier is even more obvious here, though. So the image would need to be cleaned up some. Even the 50% render might be “good enough” for the texturing of the wall, but one thing that I really wanted to see was the shadowing of the stones in the lower corners of the wall, and bumping by iteself doesn’t really get me there.

Carrara 8 – Normal Maps

If you read the thread I linked above (or if you started there and came here), you’ll see many people mentioned using Normal Maps instead of Displacement or Bump Maps. Normally those are created by adding details to a high-polygon version of an object and then using tools in a 3D program to compare the high-density model with the low-density model and figure out how the polygon normals would be tweaked on the low-density model if it actually had the details in the high-density version.

I don’t have a high-density model to create a normal map with; however there are other tools available. As Age of Armour points out in the thread I linked at the beginning, there are filters for both Photoshop and Gimp which will convert a displacement map to a normal map. I tried the Gimp one, but wasn’t too happy with the results. There is, however, another option. The freeware program called XNormal also has a converter. I tried that one and go better results from it.

I re-ran the same bump channel tests as above, but instead of using the texture map, I used a normal map in the bump channel. The results are shown in the following series of images:

Normal @ 18% (default)

Normal @ 50%

Normal @ 100%

It definitely seems to look better to my eyes than using the displacement map in the bump channel directly. It isn’t picking up as much of the “noise” in the texture file, probably because XNormal automatically ignored some of it when I processed the file.

So, I decided to see what happens when I go above 100% strength. The following images are at 125%, 150%, 200% bump strength with the bump channel configured with the XNormal normal map file.

Normal @ 125%

Normal @ 150%

Normal @ 200%

For my purposes, even at 200% I think the normal map is giving me the depth of texture I wanted on the wall without adding a bunch of random holes and bumps that I didn’t. Again I could probably improve my results by filtering the displacement map a little to remove some of the unwanted noise before processing through XNormal, but I’m approaching the “good enough” stage where I have to admit that pushing much further would be to fix individual pixels in the final image which nobody but me would notice.


Well, if I’d just taken the advice at face value, the experiment wouldn’t have been necessary. 🙂 But for me it sometimes helps when I know WHY something is the best way beyond just “the experts say so”. If you read my whole experiment, I hope this has helped you some too.


If you go back to the original thread, you’ll see Age of Armour suggested another enhancement to the process I used. Basically after converting the Displacement Map to a Normal Map using XNormal, I pulled the converted file into GIMP. Then I duplicated the layer, performed a 2px by 2px gaussian blur on the copy and set it to Overlay. I then made 2 more copies of that layer. There is no Bump Map for this texture; so I just left it at that. The resulting image shown below has my manipulated Normal Map file applied at 100% in the Bump channel of the shader for the wall. I think it’s pretty much perfect and just what I was hoping to achieve.