24 Replies Latest reply on Jun 25, 2012 1:22 PM by Joe_Mulleta

    Making artificial grain non-deterministic

    Joe_Mulleta

      I just recently tried the film grain in ACR in combination with a timelapse and to my surprise the grain has exactly the same pattern in every frame which defeats the purpose of adding grain to a clip. :-(

       

      Is there a way to change that?

      If not, is this something that could be considered to be implemented?

       

      TIA

        • 1. Re: Making artificial grain non-deterministic
          Jeff Schewe Level 5

          Although what you are asking for is a bit beyond what the Grain was designed for, I don't disagree that there should be an option to add a random noise generation in the addition of the grain. But just know this is an edge case. Ideally for motion you would prolly want to add a degree of control for the randomness so it behaves in a manner that would work better in motion (which again is NOT what ACR was designed for). Prolly want some sort of "jitter" that could be cycled so it looks nice, right?

          • 2. Re: Making artificial grain non-deterministic
            Vit Novak Level 3

            Well, the fact is - real film grain pattern is different in every photo, so if there is an option for adding a grain in ACR (which I personally don't use, because my compacts have enough noise anyway and I don't like using much NR), it should simulate this, whatever the reason

            • 3. Re: Making artificial grain non-deterministic
              Joe_Mulleta Level 1

              Well put Vit.

               

              Jeff, for working in motion there is no need for the degree of randomness, it just has to be random like real film grain.

              • 4. Re: Making artificial grain non-deterministic
                Jeff Schewe Level 5

                Joe_Mulleta wrote:

                 

                Jeff, for working in motion there is no need for the degree of randomness, it just has to be random like real film grain.

                 

                Well, I disagree.,the "randomness"  needs to be a "good" randomness vs. a randomness that causes a pattern over time...it, (the pattern), really needs to be "random" (which BTW is not really" easy")...I would argue that the "randomness" needs to be an optimized "randomness" and not just and arbitrary "randomness" that is imposed...the way the grain "dances" is critical.

                • 5. Re: Making artificial grain non-deterministic
                  Level 5

                  This excellent exchange underscores the terrible deed Adobe committed when they bought Visual Infinity just to kill the superb set of plug-ins called Grain Surgery 2 (Add Grain, Match Grain, Remove Grain and Sample Grain), in my opinion the best film grain management tool ever (not digital noise), on any platform.

                   

                  Adobe already owns this technology, they just shelved it.  It would be just a question of porting it over to work on current operating systems.  The last Mac version—and I don't recall off hand whether there was a Windows version—only runs on Power Macs and hosted by CS4 or lower, a resounding reason why I'll keep a G5 Quad running Tiger forever.

                   

                  If Adobe chose to revive Grain Surgery and sell it separately under whatever name, I'd buy it in a heartbeat.  I thing they owe it to their shareholders. 

                  • 6. Re: Making artificial grain non-deterministic
                    Holland Cambell

                    A good alternative is CineGrain. It's a film grain library that has hundreds of stocks.

                    • 7. Re: Making artificial grain non-deterministic
                      Joe_Mulleta Level 1

                      There is nothing to disagree Jeff, you obviously don't get the concept of "random"...

                      Random grain can't cause a pattern over time by definition. PERIOD.

                      Also why shouldn't it be easy? Have you ever heard of gaussian noise?

                      • 8. Re: Making artificial grain non-deterministic
                        RASouthworth Level 3

                        I believe you missed Jeff's point (and there is no reason to state "obviously don't get the concept", adds nothing to the post and tends to pi$$ off the target recipient).

                         

                        Programatically generating random sequences, either one dimensional (random numbers) or two dimensional (image noise) is difficult to do well, requires care and a good background in number theory.  The eye will pick up patterns if poorly generated.

                         

                        Richard Southworth

                        • 9. Re: Making artificial grain non-deterministic
                          Noel Carboni Level 7

                          Richard, you, in turn now you don't seem to understand what is being asked for.

                           

                          I'm not hearing Joe claim the Film Grain pattern being generated in any one image is unacceptable, nor (with all due respect to Jeff) do I see any reason to believe that patterns would emerge if it weren't kept constant from frame to frame.

                           

                          Apparently the pseudo-random number generator that drives the noise added for the Film Grain feature starts with the same seed every time, meaning the pattern remains fixed frame after frame.  Joe just needs an option to have it start each time with a different seed.

                           

                          Programmers strive to produce repeatable results, which is normally a Good Thing. 

                           

                          But an option to "Increase Randomness" would be helpful in this case.  It would be easy to code - just avoid reinitialization of the seed to a fixed value - e.g., leave it alone or maybe use the clock (e.g., something that's constantly changing) to initialize it.

                           

                          -Noel

                          • 10. Re: Making artificial grain non-deterministic
                            MadManChan2000 Adobe Employee

                            I will consider it.  (The reason why the grain is implemented the way it is now is to make it stable across image sizes, including preview/proxy cases where the original image isn't available.)

                            • 11. Re: Making artificial grain non-deterministic
                              RASouthworth Level 3

                              Noel,

                               

                              Can you grasp the difference between "I disagree with you, and here's why..." as opposed to "now you don't seem to understand what is being asked for"?

                               

                              Why not just state your opinion without the personal references?

                               

                              Richard Southworth

                              • 12. Re: Making artificial grain non-deterministic
                                Noel Carboni Level 7

                                Richard, there is no fundamental difference between "you don't seem to understand" and "I believe you missed Jeff's point" or "your request is out in left field".  Kinda stings when it's aimed at you, doesn't it?  You reap what you sow.

                                 

                                In case this is too subtle for you to understand, I'm trying to show you how the way you say things publicly can make others feel bad.

                                 

                                And yes, I'm guilty of it too, and I'm trying to fix that.

                                 

                                -Noel

                                • 13. Re: Making artificial grain non-deterministic
                                  Noel Carboni Level 7

                                  Eric, maybe you could use some kind of hash generated from the input data itself.  That would have the characteristic of always being consistent for that image, yet different for each image.  Just an idle thought.

                                   

                                  -Noel

                                  • 14. Re: Making artificial grain non-deterministic
                                    RASouthworth Level 3

                                    Noel,

                                     

                                    I don't claim to be perfect, and I do slip into the personal mode, although at least I preceded the phrase with "I believe".  And I sure haven't added on pithy little sayings such as " Kinda stings when it's aimed at you, doesn't it?" and " You reap what you sow".

                                     

                                    I went back to a recent thread we were both involved in, and found the following quotes from you to me:

                                     

                                    ----------------------------------------------------------------------------------

                                     

                                    That's hilarious, since only one of us is arguing from a position of selfishness.

                                     

                                    I'm not sure what has set you off today, Richard, but you seem a bit out of line to me.

                                     

                                    You have it right - you don't understand.

                                     

                                    If you don't see the obvious differences there, Richard, then perhaps you should look into getting a better monitor or a better pair of eyes.  I have gotten good value from LensCrafters, myself.

                                     

                                    Can we assume, by your negative demeanor on this issue, ...

                                     

                                    Ah, so now it becomes clear we're discussing something that goes against long-standing beliefs you have been running on

                                     

                                    but do always try to keep an open mind.

                                     

                                    Thanks for your opinions, but really, you're just being too generous in providing them.  You really don't need to bother.  Really.

                                     

                                    -------------------------------------------------------------------------------

                                     

                                    And yes I did respond in kind a couple of times.  You may consider this acceptable from a style or humor standpoint, I consider it inappropriate for a technical forum.

                                     

                                    Richard Southworth

                                    • 15. Re: Making artificial grain non-deterministic
                                      Noel Carboni Level 7

                                      So you thought you were responding to me in kind, and I thought I was responding to your negativity.  Such is the way things can escalate on a public forum.

                                       

                                      Tell you what, what say we both reset.  I really have no beef with you, and I do value your viewpoint on things.

                                       

                                      I'll promise to be extra sensitive to hurting others' feelings if you will.  Deal?

                                       

                                      -Noel

                                      • 16. Re: Making artificial grain non-deterministic
                                        RASouthworth Level 3

                                        Deal.  And the first one to fall off the wagon agrees to write "Mea culpa" 1000 times.  Or maybe not.

                                         

                                        Richard Southworth

                                        • 17. Re: Making artificial grain non-deterministic
                                          Jeff Schewe Level 5

                                          Joe_Mulleta wrote:

                                           

                                          There is nothing to disagree Jeff, you obviously don't get the concept of "random"...

                                          Random grain can't cause a pattern over time by definition. PERIOD.

                                           

                                           

                                          Well, actually I do understand the concept of "random" or a stochastic process. A truly random generation of grain may not be really what you would want. A grain generation would pollly be better if it wasn't totally random but only appear random and produce a grain dance like you have with film which I'm not convinced is totally "random" but follows some patterns based on the coatings on film and the chemical processing of the film. The fact that the grain appears random doesn't mean it is 100% random. Add the additional factor of the movement caused by the film gate of the camera and projector you end up with what I call dancing grain because of the various factors. And yes, adding that sort of grain enhancement could be really cool.

                                           

                                          But then the problem is how do you do that for the grain? Once you have the grain set, do you store that setting in XMP so it's consistent every time you process that same image? Or could you live with the grain being different every time you process that image? In the case of time lapse, it WOULD be useful to be able to apply a different grain pattern to sequential images…but as Eric has said, there are implications involved. The real need for a stochastic grain is an edge case.

                                           

                                          I'm sure Eric will look into it, but how many users need it? Feature triage means that the engineering development do the greatest good for the greatest number of users on mission critical functionality. Of course, there are features that get added because they're, well, cool to do. Maybe stochastic grain and maybe even gate jitter may fall into this category...

                                          • 18. Re: Making artificial grain non-deterministic
                                            Vit Novak Level 3

                                            Guys, I think you are missing the point here

                                             

                                            It wasn't the question about generation of grain pattern and how random it is, but about making grain pattern different in every frame

                                             

                                            I think that a simple solution like rolling the existing grain pattern for (pseudo)random number of pixels horizontally would do the job, under condition that pattern is generated in a way that no connection between left and right edge is visible after it is rolled

                                            • 19. Re: Making artificial grain non-deterministic
                                              Jeff Schewe Level 5

                                              Vit Novak wrote:

                                               

                                              Guys, I think you are missing the point here

                                               

                                              It wasn't the question about generation of grain pattern and how random it is, but about making grain pattern different in every frame

                                               

                                              Agreed...but the question remains, can you live with a different grain generation for each time to process an image? If you want some sort of differences in the grain generation, what exactly are the implications for a single image setting? Does it change every time to touch the Grain setting? Do you store a specific setting in xmp so one can render the exact same rendering or do you change it every time? There are significant implications depending on what you want or expect...

                                              • 20. Re: Making artificial grain non-deterministic
                                                Vit Novak Level 3

                                                Yes, I agree that this subject is complex. Personally, I think that different grain pattern each time the same image is edited or processed wouldn't be a problem (as I understand, problem is the opposite - the same pattern on all images), at least not for me. Although, this can also be solved, for instance by basing the seed of random generator of the grain on some checksum of the file or so

                                                 

                                                Method I suggested above has a problem if there are images of different sizes open/processed together, but I believe that some similar and not to complex solution exists

                                                • 21. Re: Making artificial grain non-deterministic
                                                  Jeff Schewe Level 5

                                                  Vit, but as you admit, what happens if you apply a given grain size to images whose sizes (or crops of the same size) are applied are different? Eric hinted at the potential issues involved...I think it's a harder problem that it appears...and is still an edge case at best. Again, I'm ok with looking at the issue up to a certain extent...but personally, dealing with individual images, adding a stochastic process to the grain isn't a high priority...if it can be done with a low pain threshold, fine...if it's gonna be a pain, then it's hard to argue for...

                                                  • 22. Re: Making artificial grain non-deterministic
                                                    Vit Novak Level 3

                                                    I'm sure there are sound reasons for current solution and also I agree this is low priority

                                                    • 23. Re: Making artificial grain non-deterministic
                                                      MadManChan2000 Adobe Employee

                                                      I understand the reason for the request, and it does make sense for that scenario.  I did hint at some of the complexity issues involved.  Since our adjustments are parametric (driven by metadata), we need to establish some level of consistently.  Some of these are sort of interesting.  If you printed your image 10 times, would you want/expect the grain to be the same in all 10 prints?  If you visited a given image repeatedly in Develop, and each time you brought up the image the grain looked different, would that be weird?  If you had low-res previews of a given image, and the grain structure of the preview didn't match that of the full-res image, would that be bad?

                                                      1 person found this helpful
                                                      • 24. Re: Making artificial grain non-deterministic
                                                        Joe_Mulleta Level 1

                                                        Thanks, those are some valid points Chan