Weird artifacts in using a grayscale image for displ mapping

I’m trying to figure out some way of posting an image (for free) to show what I’m talking about, but basically when I make some black and white test images on a gray field and map it to a scaled cube, I get noise at the edges of the displaced areas. The effect is not desireable.

What might cause noise or distortion for such a mapping? I am trying to follow the instructions provided here,

http://soylent-green.com/tutes/Displacement.html

and especially the last part which describes using an image. I use a JPEG image made in GIMP.

To to duplicate my results:

  • Create an image with R, G and B all set to 128 in the background, or equivelantly, Value set to 50. Make some detail in White and Black. Try text or geometrical figures as suggested in the above link. Save or export as a JPEG file.
  • Open a new file in Blender 2.36 for Windows (XP in my case). Delete the basic cube, add a mesh plane and scale it to fill the camera window. Subdivide it 3 times with the “w” key.
  • In the Mesh tab for either Object or Edit mode select SubSurf with the Simple type (this type is just easier to view in the edit window). Choose a render division of 4 or higher. This is the other number setting to the right of the Div setting.
  • Add a new material using default settings and add an Image texture. Load your image using the default settings using the buttons that show up when you select Image as the texture type.
  • In the Map To tab in the Material buttons deselect the Col button (the image you loaded will disappear in the preview window, you can reselect this to orient yourself, but is not necessary for the desired effect.) Select the Disp button.
  • Render.
    Notice that the higher the subsurface value, the worse the distortion gets.

Try http://www.imageshack.us/

Until I see a render, I’m not sure what the problem could be. As a random guess, it could be JPEG compression artefacts - what happens if you use a lossless compression, like PNG or TGA?

Here it is:

http://img274.echo.cx/img274/2847/logotestimage2dh.jpg

This is the JPEG file I used:

http://img137.echo.cx/img137/5194/symbiotalogoiv4to.jpg

Thanks to ImageShack for Free Image Hosting

Actually, if you followed the instructions exactly, this is what you get:

http://img274.echo.cx/img274/7339/logotestimageii7sx.jpg

If you adjust the color, light and camera position, you can see the problem better.

What happens when you set the Nor value to 0?

Zoom in real good on your image. You’ll see the problem.

Yep, that’s definately JPEG compression artefacts.

Always use lossless compression (eg PNG or TGA) for displacement maps, and see your problems fade away…

Yes, using TGA and PNG seemed to cure the surface artifacts! I also tried removing the Nor and increasing Dis to see what happens. Here is what I get:

http://img289.echo.cx/img289/6836/logotesttga5ut.jpg

And also, Yes!, zooming in on the original shows that aliasing is the problem for the “S” in those images.

I still don’t understand why the displacement is not more strictly linear. Why is there the appearence of beveling? Shouldn’t it be a strictly linear displacement? For a default setting, this is still a pretty rough image. Is there some other feature of the original image that causes this beveling?

Recall the simplicity of the image that is at the tutorial above in my first post. Are there likely to be any settings for that different from the default settings outside “Disp” and adding an image?

I tried an original Blender according to my instructions and with Disp set to about .5 and Norm set to zero. Render SubSurf is at 6. Here is what I get:

http://img282.echo.cx/img282/1741/testlogoii6dk.jpg

There is still a lot of noise at the edges that you don’t see in the tutorial. I’ve tried applying a Gaussian blur to the image and the noise just gets softer.

It would be insightful to see what the exact settings and files are used in the cube example in the link of my first post.

Thanks to all who contributed here so far!

I don’t think they noticed your solution, which as it happens is the solution.

For displacement texture channel to work correctly, the Nor slider MUST be at zero for that texture. If you want to use a bump map as well, add it to another texture channel. Also a 50% grey image for the displacement map works best. You can either get to this by adjusting the brightness and contrast of the disp texture in the colours tab of the texture buttons, or add a new 50% grey layer in gimp and reduce transparency for the layer to 50%.

Sonix.

Try turning on Set Smooth for the mesh and OSA 8.

If we add all the contributions together, we get:

a) Have a close look at the image you are going to use as a displacement map - jaggy edges and random pixel noise will make for a messy displacement
b) When using a displacement map, set Norm to 0
c) Mess around with the smoothing buttons (set smooth and subsurf)
d) Don’t forget to swtch on the OSA

In your case renderbird, it looks like a combination of some of these

Yes, that’s a little better.

(Note that this post is in response to the OSA suggestion)