Displacement with a chance of... “exploding” ?


#1

Hello all,

I’m not sure if this belong under mudbox or 3d max, but I figure I’d start here…
(please move this if it’s in the wrong place)

I started experimenting with mudbox a little while ago for making displacement maps. I made my mesh in 3d max, unwrapped it, and then went into mudbox. After, I exported out a displacement map and rendered it out back in 3d max using mental ray.

The result sometimes ‘works’ (no issues) and other times I get exploded pieces (not sure what to really call it), the latest shown below (in the red boxes):

(larger version: http://tim.ibocreative.com/stuff/cgtalk/side.jpg )

(larger version: http://tim.ibocreative.com/stuff/cgtalk/bottom.jpg )

The small one in the top left is without displacement and I’ve added a turbosmooth for displacing. The mesh does have 6 tris located in the tips of the larger fangs and horns, but I don’t think it’s the cause as there is no displacement there and has turned out fine before.

Anyone have any idea what causes this and how to avoid it? I say it ‘sometimes’ works because I’ve actually sculpted this 3 other separate times and sometimes I’ll get something exploding, and other times I won’t. I figure, I must be making some mistake unknowingly.

It always looks fine in mudbox:

The uvws look like ths:

(larger version: http://tim.ibocreative.com/stuff/cgtalk/uvw.jpg )

The actual displacement map result looks like this:

(larger version: http://tim.ibocreative.com/stuff/cgtalk/displacement.jpg )

The setting I used to export the displacement map is target level 0 and source level 4 (max). Search distance is 9 (best guess gives me 8.97), resolution is 2048x2048 with No antialiasing. I save it as a 32bit tiff.

I am using mudbox 2010 with 3d max 8.

And some other side questions: :slight_smile:

Anyone also know what causes those pure white bits in the displacement map?

And in the blue box, that ‘grain texture’… I read in another topic that it’s due to a lack of resolution in the displacement map? Though, I’m exporting at 2048x2048 which seems like it should be okay…

One last one, in mudbox the model has 1.5m polys, it takes an hour to export out a displacement map at 2048x2048, does it normally take this long? Is there anything I can do to make it faster?
-Using dual 3ghz, 3.25 gigs of ram (though mudbox doesn’t seem to use all of it, read it uses video memory more?) and 8800GT video card on winXP SP2


#2

hi… great work so far…
i like your dino…

those white spots are mostly caused by a to low lowress mesh and a to short search distance…
try to bake your dispmap between level1 (not zero) and your highest… and use the level1 mesh as base to displace…

mud is normaly fast in baking dispmaps… how long does it take…?
and try to use a 32bit floating point .exr file…


#3

Hi oglu,

Thanks, I’ll give it a shot. Just curious, is there any significant difference between a 32-bit floating point tiff and exr file? I didn’t know that file format was there until just now.

For this particular mesh, it took me just under an hour to export a 2048x2048 map, and just over half an hour for a 1024x1024 map. It’s always the ‘edge bleeding’ part that takes the most time.


#4

ok thats to long…
long edge bleeding times are mostly caused by bad uvs…

your uvs have to be really clean

  1. no overlapping uvs
  2. no flipped uvs
  3. enough space to bleed around the shells
    4 enough space to bleed to the uv space border

#5

Hm, I’m pretty sure I have no overlapped uvs (I read that it made zbrush crash, so I figured it would make mudbox do something similar). I also think I have enough space around all the shells and border as I read not having enough space also gave other users troubles (I had gone and reworked them from before with the purpose of giving more space around everything). I recall ‘4 pixels’ was mentioned somewhere here and there when trying to look up what edge bleeding did, is that correct or does it vary?

Which leaves ‘flipped’ uvs.

By ‘flipped’ uvs, does that mean anytime I used ‘mirror horizontal’ or ‘mirror vertical’ when laying them out in 3d max, makes them ‘flipped’? Because I did that. :slight_smile:

I shall unflip, rework, and check back tomorrow. :lightbulb


#6

When I’ve had super long waits at the edge bleeding stage it’s usually ended up being the UVs too near the borders of the 0-1 UV space or too close together. Scale them all down a bit more and try again.

You’ll need to scale them down more to use smaller textures. 4 doesn’t sound enough to me.

I don’t think flipped UVs have caused me problems, but I was baking normal maps, not displacement. I have no idea what a flipped displacement map would do, but it could result in the model being displaced the wrong way. It should be fairly obvious if something like that happens and it should be over the whole UV chunk not localised.

The dodgy bit of belly is probably due to the leg being caught in the projection. Either project less far, or use closest hit which should ensure the leg isn’t caught and baked into the belly.


#7

I’ve gone back and reworked the uvs. I discovered an option to reveal flipped and overlapped faces and fixed it all. I also added a bit more spacing to some of the shells that seemed a bit too tight (just visually, wasn’t sure how much was ‘enough’). And wow, what a difference, I exported it back out, did a 5 min doodle sculpt on it with the same settings as before (4 subdivisions) and this time it was less then a minute exporting the map out.

I have yet to figure out the real cause of the belly, but I’m going to go back and resculpt some of it with the new uv’s and see how it turns out. Should hopefully go smoother with no wait times at least now.

Thanks guys, you’ve saved me who knows how many hours in the future.:slight_smile:


#8

After rescuplting with new uvs, the oddity in the belly has shrunken down significantly but still was there.

robinb, thinking about it, you’re probably right, as it’s really the only trouble spot where the leg and belly form a sharp crease. I’ve mostly been using the best guess value (8.97) and always “closest to target model” option. Halfing the search distance to 4.5 does indeed make it go away.

Before and After :thumbsup:

I’ve also found this link which offers a different solution: (It seems to have cleared up the problem too for this mesh)
http://www.mrmaterials.com/jeffs-blog/100-displacement-and-broken-edges.html

An oddity I get now though is that there is a very faint pattern of the polys on the mesh. It’s just barely visible.

Any idea what causes it and how I can make it go away?
Edited - Never mind, I just forgot to tessellate my mesh high enough in 3d max.
Thanks for your help guys. :bounce:


#9

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.