The case of the mesh that wouldn’t displace


Riddle me this: two meshes with the same displacement shader. One has displacement, the other doesn’t. What’s up with that?

dispmaps

Your first guess might be that it’s a “padding is at least %x smaller than it should be” warning, like this:

// Warning: [disp] planeTestShape: padding is at least 10x smaller than it should be! given disp_padding: 0, recommended: 0.00835387595 //

But that’s not it.

In this case, the plane (the mesh on the right, with displacement) was scaled up. Displacement happens in object space, before any transformations are applied. So effectively, the mesh was displaced, and then everything was scaled up. The displacement scale was just too small for the other mesh, which hadn’t been scaled up).

If you freeze the scaling on the plane, then both objects will be displaced the same, as long as the displacement scale was set large enough.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s