Jump to content
3DCoat Forums
Zeddicus

Displacement strangeness

Recommended Posts

I've been playing with displacement mapping in v4 beta 13a and am still running into all kinds of problems. It is pretty much impossible to get anything that is actually usable in another program, such as modo for example. My test mesh was originally created in ZBrush as a high poly sculpt and exported to 3D Coat for retopo and UV creation. It has three UV sets so that means using the baking tool in the retopo room is out because it's only compatible with a mesh that has one single UV set (I asked about this in the beta thread, but got no answer). My only option is to merge to either MV or PP, and this is where things go awry. Here are some examples:

1) Merge to PP with displacement (retopo room menu)

2) Textures > Export > Displacement map layer (in paint room)

3) Chose the TIFF option which is 32-bit greyscale

4) Zero level is black (not normalized and normalized = same result)

post-9206-0-03562600-1365065713_thumb.jp

1) Merge to PP with displacement or NM (retopo room menu)

2) Textures > Texture Baking Tool (in paint room)

3) Chose the TIF option which is 16-bit greyscale

4) Zero level is black (not normalized and normalized = same result)

post-9206-0-81704300-1365065886_thumb.jp

1) Merge to PP with displacement (retopo room menu)

2) Textures > Export > Displacement map layer (in paint room)

3) Chose the TIF option which is 16-bit greyscale

4) Zero level is black (not normalized and normalized = same result)

post-9206-0-74151900-1365066128_thumb.jp

When I turn off visibility for the high res mesh after trying all of those, my low poly mesh usually looks fine in 3DC with it's displacement map. It's just exporting it that gets really messed up. I also get pretty much the same results if I go the MV route instead of PP. Speaking of merging to MV, vector displacement isn't any better. Check out these examples:

1) Merge into scene microverts (retopo room menu)

2) Textures > Export > Vector Displacement Map (in paint room)

3) Chose the TIF option which is 16-bit color

4) Zero level is black (not normalized and normalized = same result)

5) Tangent space chosen as well.

post-9206-0-17303700-1365066474_thumb.jp

Now the exact same thing, but saved as a 32-bit EXR instead:

post-9206-0-33680800-1365066524_thumb.jp

I've tried varying all kinds of settings and using different in/out depths (to no avail), but the one I settled on as the best (16/33) works perfectly fine if I'm (1) choosing grey as zero level and/or (2) creating and exporting a normal map. That first one only applies to greyscale displacement maps though. Vector displacement maps come out almost completely blank (grey with just some very faint wisps of blue for 16-bit TIF and 32-bit EXR, while 32-bit TIFF's are completely blank).

Share this post


Link to post
Share on other sites

Zeddicus, I'm so glad that you're touching this problem. I was never able to bake and export a correct displacement map from 3D Coat. I always get one of these: a blank map, depth only, stepped, or other even weirder oddities like baking displacement destroying the geometry (when baked to microverts).

post-12523-0-33680200-1364122882_thumb.j

Share this post


Link to post
Share on other sites

3D-Caot 32 bit displacement maps work really good in modo. Check this thread for 3D-Coat export settings:

http://3d-coat.com/f...977

Here is link to a thread on the Luxology forum that shows the settings to use for setting up Zbrush vector displacement maps in modo. I think the settings for modo are the same as for the 3D-Coat 32bit displacement maps.

http://forums.luxolo...px?f=36&t=72637

Share this post


Link to post
Share on other sites

bisenberger: I'm sure modo does a great job, as can be seen in other threads. The problem is with 3D Coat though and getting a usable displacement map from it (see all the image samples I posted). The only one that outputs correctly is where zero level is middle grey. This map type works fine in apps that can use them, but not modo based on my most recent tests. In modo the middle grey areas of the displacement map are causing my test mesh to displace outwards which shouldn't be happening. This is why I assumed we need to use the option where black is zero displacement instead of grey, and hence the reason for creating this topic. Even better would be usable vector displacement map, but 3D Coat messes those up too.

ajz3d: Yikes! I've never encountered that particular bit of nastiness thankfully. Just more proof that displacement still needs a lot of work in 3D Coat.

I just tested v4 Beta 14 with it's improved PPP displacement and the exact same results as outlined above still happen unfortunately. Besides the obviously numerous bugs, another thing I don't get is how Andrew ended up with several different paths for outputting displacement maps. There are three I know of and each tends to give the user a different result which makes no sense. The most obvious one for me, the baking tool in the retopo room, still doesn't work with multiple UV sets on one low poly retopo mesh and the other paths aren't at all obvious either. If I merge to PP with normal map, I can output a normal map but not a displacement map even when using the baking tool in the paint room after merging. These oddities and lack of unity must surely be frustrating for newcomers and veterans alike.

Share this post


Link to post
Share on other sites

I don't get it.

No matter how hard I try by fiddling with different options, using different baking (via export displacement, via export model, via bake textures, etc.) I can never generate displacement map I want.

Maybe my workflow is wrong? Here's a simple example:

1. Get a model into voxel room and add some details, like the text from the picture.

2. Import retopo mesh to Retopo Room, hit Retopo->Merge for per pixel painting with displacement.

3. Export displacement via export model command. Settings don't really matter - I tried many combinations, yours too Bisenberger. Results are always the same - blank displacement map shown in 5).

4. If I enable Show displaced mesh in the Paint Room, the mesh is torn apart in some places as in 4).

Retopo Room->Bake Textures throws everything into one basket, ignores names correspondence baking and returns an awful mess as shown in 6) instead of exploding the model and bake multiple maps - one for each UV-set.

This is really getting on my nerves.

post-12523-0-68124500-1365889518_thumb.j

Share this post


Link to post
Share on other sites

Retopo Room->Bake Textures. With every single voxel volume and retopo group hidden. All, except one:

post-12523-0-58839700-1365890440_thumb.j

Share this post


Link to post
Share on other sites

When you "merge for per pixel", what does your normal map look like? I agree that your displacement maps look awful so I'm puzzled as to why the program would contain a command that consistently produces garbage. Personally, I gave up on "Displacement" as it seemed to me associated with 'MicroVerts', which I never use. :wacko:

  • Like 1

Share this post


Link to post
Share on other sites

Thanks Tony. You've put me on the right tracks with that normal map. I've checked how it bakes and it turned out to be blank(!). So, I inspected bake options just to realise that scan depths were far too big for the model (I forgot it's exceptionally small). So I reduced them to fit it, baked the displacement and... well nothing. It was still blank. I had a hunch to try the Snap to outer surface baking method instead of Snap to closest along normal and you know what? It worked!

It's confusing, because even though displacement baking does use scan depths and baking method, it does not provide you with an appropriate window to choose it after you press Merge to PPP with displacement (like Merge to PPP with NM does).

Share this post


Link to post
Share on other sites

Glad you got it working ajz3d.

Here is something Andrew said in another thread:

"You may bake to displacement too. It works in latest beta. But it is better if mesh is quads only + it is better to subdivide mesh."

Here's the link to the statement in the thread: http://3d-coat.com/f...indpost&p=89995

Something I noticed in modo. The object needs to have subidvision toggled on (tab key in modo) or the seems split.

I also noticed that if export a model from modo to 3D-Coat for PerPixel painting if subdivision hasn't been toggled on before exporting the seams will split in 3D-Coat.

Share this post


Link to post
Share on other sites

I'm not sure if it has been mentioned in this thread yet, but also make sure to change to Low Value to -100%, if you set your exported depth from 3DC to be middle grey as zero.

Share this post


Link to post
Share on other sites

Javis, what do you mean by "Low Value"?

Ah ok, you meant one of Modo's options.

Share this post


Link to post
Share on other sites

Try these settings for the image and material in modo (highlighted in green) for the 32bit displacement:

post-1243-0-12018600-1365303704_thumb.jp

I figured the solution would be similar to V-Ray's displacement modifier where you take the displacement amount you've entered, divide it by two, then enter it as a negative value for shift (e.g. 5 cm would require a shift value of -2.5 cm). I wasn't sure how to do this in modo so thank you for posting your example showing low should be -50% and high +50%. Displacement maps where middle grey is zero are the only bug free type I can get out of 3D Coat and they work flawlessly. For example in 3ds Max there are usually visible seams when rendered, whereas in modo there are none. Now to see if I can finally get a proper working vector displacement map based on your example! :)

Share this post


Link to post
Share on other sites

Javis, what do you mean by "Low Value"?

Ah ok, you meant one of Modo's options.

Hey there. Sorry for the slow reply. Crazy weekend.

Yeah, Modo's options. How is it working for you? Still getting weird renders with your displacement maps?

Share this post


Link to post
Share on other sites

Thanks for asking Javis. If displacement manages to bake properly, I'm able to render it fine. However the bake sometimes gets some odd areas that aren't on the sculpt, like on the image I attached to this post - note the weird lines I pointed with arrows. I'm not sure what to do with them. I tried juggling with UVs, tried tweaking scan depths, but none of those two things seem to help.

post-12523-0-47008900-1367351001_thumb.j

Share this post


Link to post
Share on other sites

Hey there.

That's certainly strange. Would you mind sending me the file to take a look at it? I'd love to get this solved.

Share this post


Link to post
Share on other sites

Just a question, but it may be worth investigating: did you try to bake that without those very narrow support edge loops where the problem is on your low poly ? Looks like it can be a real problem for displacement when this area is highly subdivided.

  • Like 1

Share this post


Link to post
Share on other sites

You are absolutely right @Beat. Just did a quick test by deleting supporting edge loops and displacement bake is clean now. So is NM bake as well, with no more smudges. I guess I'll be taking this to Mantis.

Thanks!

Share this post


Link to post
Share on other sites

Can I send it to your MSN mail address?

Ahh, not sure where you got that. I don't use those. They are a matter of course. ;)

Send it to 3dcoat AT javisjones DOT com

EDIT: Thanks for the heads up on the profile email, btw. Edited it.

Share this post


Link to post
Share on other sites

You are absolutely right @Beat. Just did a quick test by deleting supporting edge loops and displacement bake is clean now. So is NM bake as well, with no more smudges. I guess I'll be taking this to Mantis.

Thanks!

Glad you got it working, I don't think you need to post that to mantis as this is actually a pretty normal problem. It's not a bug, it's just that the projection can't be calculated right if the polycount is very high in a very narrow area. This is true with all software.

Share this post


Link to post
Share on other sites

I'm trying to figure out why do I get this dreadful aliased displacement map whenever I try to bake hanging geometry (two or more objects on top of each other) with Snap to outer surface selected as a snapping method.

It also happens to baked normal map.

 

Can anyone help?

 

I attached a simple example. Just a sphere covered with a thin patch.

stackedObjects.7z

post-12523-0-30031100-1389874241_thumb.j

Share this post


Link to post
Share on other sites

Can someone bake displacement and normal maps (both for per pixel painting) from the exemplary scene from the post above and paste a screenshot, please? :help:

Share this post


Link to post
Share on other sites

I'm not posting screenshot, but tested your scene and there are still jagged edges. The workaround is to bake higher texture resolution (for ex. 4k) and scale it in ps/gimp to lower resolution. 

  • Like 1

Share this post


Link to post
Share on other sites

×