Announcement

Collapse
No announcement yet.

Repetitions in procedural noise

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Repetitions in procedural noise

    Unfortunately we sometimes get some visible repetitions on the 3D noises, most apparent when using sparse granite noise for surface discoloration or bumps. I noticed in the source code that 256 predefined grad vectors are used for the noise function, could this be expanded to 1024 values to come around this issue? It seems that the individual noise is often visible when viewing from a distance where the 256 grad optimization should be unnoticeable (at least in the high resolutions we are using, 8k x 8k)...

    I don't have a sample image on this at the moment, but it happens quiet often with all kinds of noise.

    Best Regards,
    Max

  • #2
    Which noise shader are you using? For V-Ray 2.0, we use the same code for the Noise and Volume noise shading nodes as used by the Maya software renderer, so the results should be identical to it.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Hmm, granite is where it's most obvious, but as I said it seems like it can appear in all noises.

      After a little research I figured that it could also be due to the Marsaglia effect, http://en.wikipedia.org/wiki/George_Marsaglia. I found the exact same phenomena in the applet on this site, http://www.cs.pitt.edu/~kirk/cs1501/...ns/Random.html, where the dots appear on planes in some angle. We have mostly had this problem for flat surfaces, where the solution have been to rotate the 3D placement node to some random orientation.

      I have no idea if this effect can be totally avoided...

      /Max

      Comment


      • #4
        Ah, for the Granite it might be possible yes. Will look into that.

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment


        • #5
          Sorry, the granite seems fine, I meant the rock all the time!

          /Max

          Comment


          • #6
            It's definitely somewhere in the perlin noise, as rock uses that. Look at the screenshot which is a rock with a 3D placement with uniform scale 0.05 and rotated 1 degree. This seems to be the worst case, when the placement box cuts the geometry at a shallow angle. As you can see I have zero diffusion and a relatively low mix ratio to produce a kind of spotty effect, and this is also where the effect is most visible.

            What we have done is to use the granite instead, which seems to be fine and does the job if we only use one of the three dot layers. Sorry for confusing you.

            I will do some further experiments with other noise types to see what I can find.

            Click image for larger version

Name:	dump.jpg
Views:	1
Size:	479.6 KB
ID:	844547

            /Max

            Comment


            • #7
              Here is the same test but with a one octave fractional brownian motion, this time the placement is scaled to 0.005 uniformly but still rotated 1 degree in Z as before. I had to decrease the scale further to show the effect on such low contrast noise. It's often desirable to have a small low octave noise like this and that is maybe why I run in to all of this noise strangeness...

              It seems that the grad and permutation tables in the noise_func.h is the fault here as no other random function is used there, and both the rock and brownian uses this. The granite uses the "LinearCongruentialRNG" which gives other results and works ok for us.

              Click image for larger version

Name:	dump2.jpg
Views:	1
Size:	465.4 KB
ID:	844548

              /Max
              Last edited by max@mfx; 05-10-2011, 06:48 AM.

              Comment


              • #8
                It's all Perlins fault really.

                I get the exact same effect when I did a fresh implementation of Perlin noise in Processing. I added a slight offset in z for each y line which mimics the behavior I showed when rotating the placement box slightly in Maya (though in my version it's really a skew but that doesn't matter for the demo). And this isn't even using a pre-calculated grad table, but a built in random with seed depending on (x,y,z), so I can't complain on the pre-calculated grads in your version...

                Oh well, I'd better live with the fact and start implementing Gabor noise for VRay then.

                Click image for larger version

Name:	dump3.jpg
Views:	1
Size:	269.5 KB
ID:	844550

                /Max
                Last edited by max@mfx; 05-10-2011, 07:46 AM.

                Comment


                • #9
                  There are several way to get rid of the repetition with the procedural textures. You can connect another noise texture in the UV offset. There is a nice tutorial somewhere on the net.
                  Portfolio: http://www.cgifocus.co.uk

                  Comment


                  • #10
                    Cool, I'll try to find that. Thanks.

                    Comment


                    • #11
                      Here is a good one:
                      http://www.sigillarium.com/blog/lang/en/318/
                      Portfolio: http://www.cgifocus.co.uk

                      Comment


                      • #12
                        Thanks. Nice one for 2D textures, but we discussed repetitions in procedural 3D textures in this case. Maybe the same ideas could be used in 3D as well but I think the problem goes deeper than that..

                        Comment


                        • #13
                          I tried mapping another brownian to the rotation of the placement node for the visible brownian but I soon realized that all that is sent from the placement node is one single transform matrix and NOT one transform for each sample during rendering (in which case it would have worked). There is really no way of changing the P variable (position of current sample) per sample as I can think of. Any ideas?

                          /Max

                          Comment

                          Working...
                          X