Jump to content
3DCoat Forums

Displacement strangeness


Recommended Posts

  • Advanced Member

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).

Link to comment
Share on other sites

  • Contributor

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

Link to comment
Share on other sites

  • Advanced Member

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

Link to comment
Share on other sites

  • Advanced Member

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.

Link to comment
Share on other sites

  • Contributor

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

Link to comment
Share on other sites

  • Contributor

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
Link to comment
Share on other sites

  • Contributor

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).

Link to comment
Share on other sites

  • 2 weeks later...
  • Advanced Member

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.

Link to comment
Share on other sites

  • Advanced Member

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! :)

Link to comment
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?

Link to comment
Share on other sites

  • Contributor

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

Link to comment
Share on other sites

  • Contributor

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
Link to comment
Share on other sites

  • Contributor

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!

Link to comment
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.

Link to comment
Share on other sites

  • Contributor

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.

Link to comment
Share on other sites

  • 8 months later...
  • Contributor

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

Link to comment
Share on other sites

  • Carlosan changed the title to Displacement strangeness

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...