View Full Version : Unknown grid pattern in Image

10 October 2005, 02:28 PM
I got a problem on rendering displacement. My displacement map only contains some lines and all other area is white. When I use it as displacement map, it appears bumpy on the white area, with grid pattern.

I've tried to lower shading rate, increase filter width and turn off extrapolate derivative. I still cannot eliminate the artifact.

Just attached an image with such a problem. It would be great if anyone could advise. I really don't know how to get rid of those grid pattern.

10 October 2005, 09:23 AM
You might as well have posted a picture of a kitten for all I can tell from that image! :)

Post a higher-res image (you can use imageshack or something else for free image hosting).

Although you don't say, I'm guessing you're using renderman.

How are you getting the scene into renderman?
What kind of surface are you rendering (polygon/nurbs/subdiv)?
Does the artifact change at all when you change the shading rate or does it stay the same size?

If it's a polygonal object, are you reapplying the shading normals after displacement?

10 October 2005, 12:19 PM
I have seen that before - usually on NURBs if I recall. The Renderman forum usually just says play around with the derivatives attributes - never worked for me either ;)

I don't have a clue what causes this myself - it is damn annoying. Especailly as displacement is one of prmans better featurse.

You can also get grid artefacts with raytracing, but I don't think it's related.

Might be better showing an example with only displacement (or a test grid texture) sligtly bigger and with a wider view so see it better.


10 October 2005, 01:14 PM
I've seen that sort of grid pattern when using very high frequencies of noise. I eliminated it by simply lowering the number of octaves of noise in the fbm shader I was using.

It definitely looks like you've got more displacement happening than the simple displacement map you describe. I would take another look at exactly what displacement shader is attached to the geometry, and make sure it's the one you think it is. What other tools are you using? Maya? MTOR, Liquid? XSI?

Kevin Atkinson

10 October 2005, 10:17 PM
The easiest way to find out if your problem is grid related is to up the bucket size and grid size. If the errors are always on grid boundaries then it's more than likely a derivatives issue.

I think the underlying problem is that calculatenormal() needs micropolygons on all 4 sides of a vert to calculate an accurate normal, but on grid boundaries this is'nt the case, so the renderer has to guess. Extrapolated derivitives can make things worse for rough surfaces because it's as likely to extrapolate in the *wrong* direction as the *right* one. I'm suprised though that disabling extrapolated derivatives didn't help matters if it is indeed a derivatives issue.

Anyways, like everyone has said probably best if you can post a better image, with all the color/specular stuff taken out.


10 October 2005, 01:27 PM

Actually the model was done using zbrush and rendered with mayaman in maya. I suspected that the UV map generated by zbrush causing the problem. Still checking.

10 October 2005, 06:40 PM
I have seen this before also. I think we traced it back to one of two things -

1 - Using 8 bit images for displacements would introduce some banding artifacts. Please use 16 or floating.

2 - Filtering. What filter are you using to do the texture lookup? Avoid using a box filter. Play with the filter types and values to see wich one gives you better results.

I hope one of these is the answer.


10 October 2005, 02:25 AM
I think Rudy's 2nd point and tweekers comments are spot on.
I know that problem vey well. It usually shows up when displacement textures are undersampled. Aka a texel of the highest mip map level spans more than one u-poly. Most texture filters are set up to preserve maximum detail. This approach fails at boundaries when the resulting value is used to displace.
In PRMan, the solution is to use the radial b-spline filter which afaik got introduced to address exactly this issue.
Other RMan renderers like e.g. 3Delight currently don't have this filter and suffer from this problem in the described case.
A solution here is to upsize your map so a texel is again smaller than a u-poly and add some noise.


10 October 2005, 03:35 AM
Sorry but I found that the camera is under some group nodes that have scale not equal to 1 (I'm using maya). >.<

Set them to 1 and problem solved now.

Thanks all of you anyway.:scream:

10 October 2005, 09:07 AM
Interesting - I'll have to look out for that one. I guess it must mess around with the filtering.

prman (and Mental Ray) can get pretty picky about scales on cameras, whereas Maya doesn't care too much. This can cause issues with lights with scales above them - the actual scale on the light is taken off by MTOR during RIB generation - however it doesn't take into account any transform nodes above that.


10 October 2005, 05:27 PM
YES... camera scaling in PRMan is BAD..It can throw off a whole bunch of stuff. avoid it always. :)


CGTalk Moderation
10 October 2005, 05:27 PM
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.