8 ms·
The rabbit hole of adding grain to digital photos
- desro 4y agoInteresting. Definitely a challenge if accurate emulation of film stock is desired. I almost always add a subtle amount of "grain" with LR when developing photos. It looks pleasant and seems to add a sense of coherency to an image. I find that in many cases where details are lost to aggressive NR or otherwise simply not present, grain can make it easier to "see" the missing detail... as with most things, the optimal amount of noise is not zero.
- jug 4y agoThankfully, as for mobile apps, there are some authentic looking ones out there handling both dust and grain as well as filters based on film stock scans such as RNI Films. :) No affiliation; it’s just among the best value out there that I’ve found. For computers and Lightroom/Photoshop you have stuff like Replichrone to help.
- ISL 4y agoIf adding grain seems like a strange thing to do, consider it as a way to signal to the eye, "This is the smallest scale on which there is any information, you'll have to infer anything smaller." I rarely add grain to images, but when I do, it can sometimes give a more-organic and hence perceptually-real feeling. There are image-software companies whose specialties include careful emulation of grain. I don't use them, but plugins like https://nikcollection.dxo.com/silver-efex-pro/ https://nikcollection.dxo.com/silver-efex-pro/ are intended for that very purpose.
- whoopdedo 4y agoIs this the same reason some people prefer phonographs to digital recordings?
- djkoolaide 4y agoI'd say the reasoning is adjacent but not the same. There will always inherently be some harmonic distortion when playing a record, and that sounds pleasing to the ears in a lot of cases. But the main reason records usually sound better is simply dynamic range. I'm a huge fan of 80s club music (Paradise Garage type stuff). I've spent a lot of time and money over the years ripping those original records, because unfortunately the digital releases of a lot of those songs were brickwall limited, which ruins the dynamics and punchiness of the drums and other elements of the music. I'm sure the same applies to other genres.
- musicale 4y agoCDs can support 90+dB of dynamic range, which is pretty great, with much less distortion and noise. A good classical recording can show this off pretty well. On the other hand, 80s club music was presumably mixed and mastered with vinyl-style distortion (and other features such as rumble, crackle, hiss, etc.) in mind. (Modern producers often try to replicate the pleasant saturation of analog equipment – and sometimes add vinyl-sounding artifacts, for better or for worse.) A well-mastered digital recording should (and does!) sound great, but I think the problem is that many CDs aren't well mastered and many were overly compressed, sometimes with terrible clipping, in service of the dreadful "loudness wars." In 2022 most dance music is produced digitally to begin with, and DJed digitally as well; presumably mastering engineers and DJs have figured out how to make it sound good when it's played in a club.
- i_am_proteus 4y agoOld albums were also recorded, mixed, and mastered on tape, which naturally saturates and compresses a bit in a way many listeners find pleasing to the ear.
- adql 4y agoLoudness war had many, many victims and the sound murders still happen to this day. I wish replay gain was standarized to a level where every player could just add few DBs in analog way for those songs that use more of the dynamic range, instead of mastering engineers having to choose between "loud" and "correct"
- FoomFries 4y agoI think for this and for photos it’s more the idea of imperfection. That patina, wabi-sabi or other entropic term gives an emotional response I don’t find in digital. I’m not looking for lossless digital I can’t really discern, which DAC basket to put my eggs in, or if the latest digital remaster just demolishes the loudness delta. I have, but these days I want a more tactile experience. I’m looking for the experience which surrounds the music or photo. And when I didn’t take that picture or record that music, it feels more ‘real’ when I can vicariously feel the experience involved. Anecdotally, I went on a trip with some friends recently and everyone took their phones while one person took a manual camera. Everyone uploaded to a shared album at the end, and the pictures which paint the picture of the weekend to me are the ones shot by the amateur which are often a bit out of focus compared to the hyper accurate self-stabilizing self-focusing technology. Perhaps it’s the romantic in all of us.
- Baeocystin 4y agoFilm makes you think about your shots in a way that you just don't have to to with digital. This is not to disparage digital cameras at all; they are amazing, and I love mine. But they are also different, and despite digital's many advantages, film offers something unique to the medium.
- IvanAnishchuk 4y agoTactile experience. Yeah, that's how I got into analog stuff.
- causi 4y agoit feels more ‘real’ when I can vicariously feel the experience involved. That implies the opposite of what you enjoy. The original experience had no grain, had no hiss. It was pure and clear.
- nimbleal 4y agoPerhaps we’re looking for the feeling of memory or dream. I believe that’s why 24 fps persists in film, for example — because it’s less real in the immediate, analytical sense, but more real in that it feels closer in some undefinable way to the way we imagine or remember — or even perhaps in our non-analytical moments directly perceive — things to be
- eyelidlessness 4y agoAmong many reasons people might prefer vinyl, one that really stands out to me as a plausibly objective factor: mixing for the media limits overall/constant “loudness” and imposes some higher degree of dynamic range than you’ll generally find in digital releases over recent decades. My understanding (which I’m sure will be corrected or have nuance added if I get this wrong) is that the “loudness”, often called “brick wall”, found in digital releases doesn't work well on the physical surface of a record because it can cause the stylus to skip more easily, so mixes tend to have more dynamic range to accommodate that… and people who prefer the media may generally prefer the dynamic range it forces.
- WastingMyTime89 4y ago> and people who prefer the media may generally prefer the dynamic range it forces. I mean a recording with a larger dynamic range is an objectively better recording. You can always crank up the volume if you want the loudest part to actually be loud. That’s the paradoxical situation. You have an inferior medium with a better mastering.
- globular-toast 4y agoPerhaps. But for me it's more that the LP is a great format for popular music. I don't really care how the recording was acquired as long as it sounds good.
- q-base 4y agoThat is a very interesting explanation. I prefer looking at images with grain. I wonder if that is why. Where have you found the explanation? Is it something you have inferred yourself or has it been studied?
- Puts 4y agoTexture is a visual ingredient just like color or form – and if you see it this way it's nothing strange adding it in post. Basically any analog method of visual reproduction adds some form of texture as a byproduct, but not digital screens. Yet think of a paper, it's the texture in the paper that makes it real, that it appears as something you can touch.
- q-base 4y agoI agree and have no qualms about adding it either in post or by deliberately shooting high ISO to enhance the grain.
- irae 4y agoThe reason to prefer grain would also be a good question. The recent return to analog photos we are observing recently might be caused by a shared preference for grain and other aspects of the film process. I was going to suggest this preference would likely be correlated to age, but most film enthusiast blogs/instagram I've seen are from people in their 20s. So my current theory is that photo/cinema enthusiasts are overly exposed to this visual look, since they get inspired by masters of the past, and the sample of acclaimed photo/cinema artists have to be still larger on the film media. And, direction, post production and stakeholders in Hollywood would also have this bias and welcome like to continue producing material with this looks.
- thanatos519 4y agoI suppose this is part of the reasons that "Dune Was Shot on ALEXA LF, Transferred to 35mm Film, Then Scanned Back to Digital" https://ymcinema.com/2021/12/03/dune-was-shot-on-alexa-lf-transferred-to-35mm-film-then-scanned-back-to-digital/ https://ymcinema.com/2021/12/03/dune-was-shot-on-alexa-lf-tr...
- julik 4y agoThat part is also known as "we had a very large post-production budget to consume so we decided to create a hell-ton of work out of nowhere". I've worked on a few digital-to-film-to-digital jobs back in the day and all of them were done not for the actual "look" properties of it but for transacting more money through the workflow.
- irae 4y agoIf the above is true, it is sad and OK at the same time. Sad because it is wasted work and wasted human potential (imagine same money applied to voluntary work, social contributions, etc). At the same time, it generate jobs, which is not bad considering the levels of unemployment. Either way, I would prefer more people employed competing for digital plugins that are indistinguishable from this process.
- julik 4y agoThis.
- l8rlump 4y agoYou can still download an old version of Nik Collection from when it was a free-to-use Google project. I'd be interested to know what people think of the grain emulation in that old version. https://archive.org/details/nikcollection-full-1.2.11 https://archive.org/details/nikcollection-full-1.2.11
- shrx 4y agoUnfortunately I expected a more substantial quantitative analysis rather than this nonsense: > Noise, by nature, is digital so it is all square-shaped, like a pixel, and it’s uniform in nature because pixels are just a grid of little, tiny squares. So when you look very closely you can easily tell that noise and grain are two very different things with grain achieving actual randomness of size and positioning while noise is just a table of black, white, and grey squares. edit: And calling film grain "organic" is a bit of a stretch, it's silver halide crystals.
- underwater 4y agoThe point seems valid: that digital noise will be per-pixel (as will noise from digital sensors). Whereas a scan of film grain is capturing literal grains which will not align perfectly with scanned pixels. The comparison image shows this.
- shrx 4y agoYou can generate noise with whichever shape, size and frequency distribution you need. It's entirely possible to emulate film grain computationally. one example: A. Newsom: Realistic Film Grain Rendering https://pdfs.semanticscholar.org/b791/566b0a38cc0269b1b7f9adbe5ba569aa4eb5.pdf https://pdfs.semanticscholar.org/b791/566b0a38cc0269b1b7f9ad...
- underwater 4y agoThat's why I said digital noise. If you're using randomness to generate something that emulates film grain then by definition it's not noise, it's a procedurally generated texture. The point was that many editing tools offer noise generation that works at a pixel level. The author was explaining why those are unsuitable for the task. That doesn't make it nonsense.
- ginsider_oaks 4y agoAre noise and procedurally generated textures mutually exclusive? The Wikipedia article for gradient noise[1] says: > Gradient noise is a type of noise commonly used as a > procedural texture primitive in computer graphics. [1]: https://en.wikipedia.org/wiki/Gradient_noise https://en.wikipedia.org/wiki/Gradient_noise
- jcynix 4y agoImageMagick is my favorite "go to" for image manipulation and I would start with this example script, if I wanted to add grain: http://www.fmwconcepts.com/imagemagick/filmgrain/index.php http://www.fmwconcepts.com/imagemagick/filmgrain/index.php And yes, ImageMagick can be a rabbit hole of possibilities too. But now I'm tempted to try it … tomorrow.
- cameronh90 4y agoOccasionally I have to physically sign, scan and email a form. However, I don't have a printer or scanner. I just paste my signature into the PDF then use ImageMagick to add grain and slightly rotate the pages so that it looks printed and scanned. Works every time.
- epgui 4y agoI just paste my signature into the PDF and send it like that. Occasionally I'll get someone complaining about some vague thing they can't quite articulate (something about it not being a "real signature" or not having been "really filled out"), but when I just insist that "yes that's my real signature" and "what I sent you is the filled form" they always end up accepting it. Usually it's just some clerk or administrator and they have no basis for refusing the document. I just tell them to pass it along and process it, they always end up doing so, and I never have any issues.
- kevin_thibedeau 4y agoIn the US, fax signatures are legally valid and scanned imagery is considered equivalent. A modified PDF is not sufficient.
- TeMPOraL 4y agoEventually, someone in the US will make bank selling "signature laundering machines" - basically the ImageMagick script on a microcontroller in a tamper-proof enclosure that's plugged as peripheral, with paper trail certifying that the output it produces is equivalent to printing a document and scanning it again, or faxing it, and therefore should be legally considered as equivalent to fax.
- CamperBob2 4y agoIt's a basic question, really. 10 PRINT "Is your name Stanley Kubrick? (Y/N)" 20 A$=GET$(); 30 IF A$ <> "Y" THEN PRINT "Don't do that"
- Flatcircle 4y agoI love what companies like CineGrain have done with this type of thing in the movie space. Most movies use their added grain now. http://www.cinegrain.com/ http://www.cinegrain.com/
- positus 4y agoConsider looking at https://www.dehancer.com https://www.dehancer.com . Dehancer and Capture One offer pretty much photorealistic grain. Dehancer is the better of the two in my opinion, but Capture One works very well for black and white photos.
- asimpletune 4y agoYou know what's weird about Dehancer to me? They have all these awesome features, with super customizable parameters, but their film grain animation doesn't correspond with the project's frame rate, at least not on FCPX. It's just weird to me that they didn't add that last little detail, when it seems like it should be easy to do. Maybe in Davinci they do it though, IDK.
- stavros 4y agoIt's really interesting to me that we have all this technology to reproduce errors in previous iterations of other technology. Here we are, adding grain to images that don't have it, because the error reminds us of our better days.
- cleansingfire 4y agoYou prompted an idea I find fun: If film grains are randomly or chaotically distributed, and fractal over enough orders of magnitude, grain might not be error but a medium which interprets and conveys information differently, with unique advantages. But now I'm afraid I sound like an audiophile who buys wooden amp knobs for performance.
- TeMPOraL 4y agoYou've stumbled on an actual, practical use case: encoding watermarks in the grain. I can imagine a watermark hidden in the grain, spread over long enough time (say couple seconds to a minute), so it can survive reencoding with heavy compression and containing enough bits to identify the source of the video on a per-copy/per-user basis.
- Gigachad 4y agoModern video codecs almost entirely remove grain and replace it with a lightweight description of what it looked like so they can generate a new and random grain that looks pretty much the same.
- berkut 4y agoIt's similar to lens flare: lens manufacturers go to great lengths to reduce lens flare (there's a limit to what they can do though), and in VFX/CG we often add them for effect in movies, both for full-CG stuff and even on top of plate footage from cameras which didn't even have much (if any) lens flare in the first place.
- yesenadam 4y agoFrom Veblen's Theory of the Leisure Class (1899) : ..the cheap, and therefore indecorous, articles of daily consumption in modern industrial communities are commonly machine products; and the generic feature of the physiognomy of machine-made goods as compared with the hand-wrought article is their greater perfection in workmanship and greater accuracy in the detail execution of the design. Hence it comes about that the visible imperfections of the hand-wrought goods, being honorific, are accounted marks of superiority in point of beauty, or serviceability, or both. Hence has arisen that exaltation of the defective, of which John Ruskin and William Morris were such eager spokesmen in their time; and on this ground their propaganda of crudity and wasted effort has been taken up and carried forward since their time. And hence also the propaganda for a return to handicraft and household industry. So much of the work and speculations of this group of men as fairly comes under the characterisation here given would have been impossible at a time when the visibly more perfect goods were not the cheaper.
- kloch 4y agoAnother issue I didn't see addressed in the article is the anti-aliasing filters on digital cameras. The filters are installed to mitigate Moire when shooting scenes with high frequency (sharp) straight lines They don't blur like a gaussian filter, they have two separate plates, one that spreads light horizontally and the other vertically, ideally by about 1.0 pixel radius in each direction. This results in "square-like" artifacts, especially if the filters spread by more than 1.5 pixels. The artifacts are most noticeable in astronomy where there is a dramatic difference between the appearance of star fields with and without anti-aliasing filters. I don't know how this effect works against film simulation but it probably doesn't help. If they are going to start with Gaussian blur anyway, then using a camera with the antis-aliasing filters removed might help.
- coffexx 4y agoInterestingly in the astrophotography hobby space, purpose built, cooled, OSC cameras without aa filters exist around the same price points as DSLRs intended for terrestrial use. To buy one though you really have to be into it (or have a lot of spare cash), as you can only really use it for astro work. If someone is just getting into the hobby they're probably using a relatively low focal length scope or lens with a DSLR they have laying around. What that means is a wide field shot with lots of tiny stars. Many of those stars might only fit within a single pixel unless they were very bright. In that specific scenario an aa filter has the advantage of providing more natural star colors, as the light that otherwise might only have hit a red or blue pixel in the bayer matrix is instead spread out into the other colors. It's less of a beginner thing to do, but if your shots are extremely under-sampled like that, dithering your subframes and using drizzle integration in post helps a lot with blocky (OSC + Mono) and off-color (OSC only) stars. That is, assuming you're trying to stack exposures instead of it being a once off shot.
- roelschroeven 4y agoDo current DSLR models still have AA filters? My Nikon D7100 doesn't have one; I believe the explanation was that it doesn't need one because it's resolution is large enough. In any case that camera never gave me Moiré problems. I haven't followed the digital camera market in detail anymore in +/- the last decade anymore, so I don't know what's going in regarding AA filters. I just kinda assumed other models would also drop AA filters.
- mgraczyk 4y agoI added grain to an image pipeline that's fairly widely used (millions of devices). I found that simple poisson noise in linear space with a bit of filtering gives a decent natural look with very low complexity.
- sbarre 4y agoI'd love to know more about your approach here... Do you have any resources you could point to if one wanted to learn more?
- rperez333 4y agoThat’s my experience as well, as a visual effects compositor, and responsible for quality control on a few large budget movies. Some artists had fancy methods for adding grain back on their images, but besides some control on the intensity based on the luminance, basic poisson noise is enough to match almost every digital or analog film scans.
- ipsum2 4y agoStupid question - do you generate different patterns of poisson noise on every frame?
- Kubuxu 4y agoAs they grain of each film frame is independent, you should but there are many techniques to avoid that, generate larger noise texture than your target size and use it with random offset, additionally you randomly mirror it in either direction.
- mgraczyk 4y agoI do, it's fast enough and done with integer arithmetic. I have seen others use pre-generated noise patterns.
- tryauuum 4y agoNow I am curious about the results and the app
- cleansingfire 4y agoNoise can improve recognition of marginal signals,so this might not just be aesthetic. I first learned about this in vision, but it's generally true. https://www.electronicsweekly.com/news/research-news/add-noise-clearer-signals-2020-09/ https://www.electronicsweekly.com/news/research-news/add-noi...
- neverartful 4y agoFWIW, film is still sold and there are commercial labs that still process film.
- bitL 4y agoDid you try Perlin noise? Looks much more natural, emulating particles.
- FpUser 4y agoI appreciate film "artifacts" but grain is not the one. I would never add it to a photo purposely. Beauty is of course in the eye of beholder
- omoikane 4y agoAdding grain is a great way to uniformly mask out whatever imperfections that couldn't be edited out. I would do that if I felt lazy and don't want to spend all the time removing dust from my photos. But even then, I would only add grain via some filter that has a "grain" parameter built in. I suspect adding just grain without other effects to go with it would not be an improvement in general.
- EamonnMR 4y agoI went into this kinda hoping there'd be enough guidance to write a shader that does this. Anyone have that article?
- kylehotchkiss 4y agoOne of my favorite thing about the smaller Fujifilm interchangeable cameras is the very encouraged film simulations built in. Editing after taking pictures is my least favorite activity so getting some high-quality well graded shots out of camera makes photography more enjoyable. My camera is an Xpro3.
- spindle 4y ago> the smaller Fujifilm interchangeable cameras I bought an X-T2 this morning :-) Since they're interchangeable, can I swap it with your XPro3?
- q-base 4y agoI bought my X-T2 several years ago for the same reason. Speaking of grain. The Fujifilm sensor actually adds quite pleasant grain at higher ISO. So I sometime shoot with deliberate high ISO because I like the look that comes out of it. I am a little jealous on your X-Pro3. The X-Pro3 is high on my wishlist :)
- kylehotchkiss 4y agoRent one for a week and see if you like it! It's an opinionated camera.
- q-base 4y agoThat is actually a very good idea. I am pretty certain that I will love it. The main feature drawing me in is the screen on the back, which will keep me from constantly looking at pictures right after I have taken them.
- cesaref 4y agoOn the aesthetic appeal of grain in photographs, it's worth noting that even before digital, photographers were particularly interested in the look of the grain. This is most clearly highlighted by the fact that even when film manufacturers produced higher quality film with less visible grain, the older film emulsions were still available as some people preferred that look. For example, Kodak make 'traditional' and 'T-grain' versions of their B&W film (I believe the 'T-grain' style has the grains stacked vertically rather than horizontally, allowing for more light sensitivity but smaller visible grain). So, if you want ISO 400 B&W film, Kodak will sell you TriX for traditional grain, and Tmax for modern 'T-grain'. The article discusses grain visibility in shadows vs mid tone and highlignts, and suggests that grain is visible across the entire image. This isn't true. The process of exposing film converts silver halide to silver granules where the light has been captured, so in shadows, the grain is purely silver halide which is removed by the fix step when developing the film, leaving only the film base. So, unexposed film (shadows) have no grain, highlights have all the grain. This is the opposite of digital, where if anything, noise is most visible in the shadows, whilst on film, shadows are pure black with no noise (from grain). Another thing, different printing processes cause the grain to be more or less visible. Traditional enlargers use collimated light which produces very sharp images, but accentuates dust and film grain. This fell out of favour to be replaced with diffuse light, which drops the sharpness a little, but is much more forgiving.
- lepouet 4y agoThis is all true but consider that you are talking about b&w film and the author seems to be talking more about color, the chemistry of color film is different and this is another rabbit hole.
- andreareina 4y agoTabular grain film had more uniform particle sizes; fewer large outliers -> less apparent grain. There may have been a difference in the emulsion (chemistry, thickness) as well but that's what I was told accounted for most of the effect.
- dcanelhas 4y agoIs there a reliable method for removing only the influence of grain in an image, automatically? If so, adding grain back into other images ought to be feasible task to solve with even a shallow neural net (since you don't even need to learn anything about the structure of the scene).
- cercatrova 4y agoInteresting, I actively remove grain from media, even going so far as to use AI models to degrain them.
- julik 4y agoA great article. I could probably give it some more depth with a bit of industry anecdote. VFX pipelines have dealt with actual film grain for a very long time (for about as long as there has been telecine/scanning) - and dealing with moving image grain-wise gives more perspective than doing that on stills. A few interesting items to consider if you ever want to dive into that domain: * There is a difference whether you want to "add film look" or you need to integrate digital images into an existing scanned film image. The latter is harder because "your" grain has to match "their" grain! * Grain in film is different to digital noise not because the digital noise is pixel based, but because the digital noise is a property of the sensor. Therefore digital noise will produce clusters of pixels or single pixels which run "hotter" or "colder" on every image shot. Some cameras are much worse with this (noise patterns are extremely regular between frames), some are better. Film grain are physical particles spread on a medium, which gives them a great property of incredibly high entropy * Consequently, when you want to increase detail you often can do "temporal averaging" - take multiple frames of the same subject under same conditions and average the signal across them. This removes virtually 100% of the film grain and allows you to produce a good "grain plate" which can then be re-added to your source material or digital material. Doing the same with digital noise of the sensor won't work so well, because (see above) a sensor inherently has some noisier elements than the rest, and they stay in the same position. Some digital cameras tried to innovate in this space by moving the sensor laterally during shooting, exactly so that you can later do temporal averaging to de-noise (unlike blurring temporal denoising is theoretically losless). And yes - temporal denoisingby averaging is also way better than the modern ML-based denoising (and cheaper computationally). * Grain - as well as digital noise - have varying response per color channel, as well as varying sizes. For grain this is because of the different dyes used to capture different parts of the spectrum, as well as due to "demasking" of the negative. The channel split depends on the film stock / type of sensor, how far the exposure is pushed - but also on the color management pipeline applied throughout the process. Sometimes your response per channel is actually "roughly" YUV instead of roughly RGB * Noise and grain will be affected by chroma subsampling - your "color" channels having less resolution than luminance channels. If you are working on material which has already been heavily compressed (like smartphone photos, lol) you need to take that into account * This might seem unimportant, but the _size_ of the grain is a great hint to the brain that "this was shot on mid-format" vs. "this was shot on 8mm" vs. "this was shot on 35mm". For proper artistic effect it is always a good idea to take this into account. There has been a lot of work done in the VFX world to provide for at least some "recorded" or analyzed grain sampling at least for widely used moving picture film stocks. Oh, and last but not least - you can throw rotten eggs at me, but "film look" is overrated, just as "no photoshop used" is overrated. I'll see myself out :-D
- dusted 4y agoAnother way of getting grain is turning up the sensitivity while lowering the exposure to compensate.. Of course that results in digital noise, which is not visually equivalent but is an artifact of your actual medium. If you don't like the digital look, you can still use this method, but develop the image twice, one timein monochrome with contrast and brightness in mind.. Then another photo with color and saturation in mind.. Then you cheat and do a Gaussian blur on the color photo that is strong enough that the digital noise diminishes to an acceptable level.. then you overlay the blurred color image on top of the sharp black/white image with saturation from the color image being used. This is a hack, and can also be used if you shot some color picture in adverse conditions and want both colors and sharpness.
- irae 4y agoIs it just me, or anyone else is feeling all of the examples of grain simulation (I even followed links in the comments here on HN to papers and plugins) all feel a bit "off" in comparison to real film pictures? Probably film enthusiasts would agree, else they would not be shooting on film even today. My best guess is that besides grain digital photos have a different dynamic range. The whole stack from silicon sensor, raw processing, etc, including screen manufacturing is trying to get to "real" images, in the sense that it is similar to what the human eye of the photographer saw in site. Film also tried to do the same, yet, I guess there are more characteristics than we can simulate with math. I bet if someone gathers enough data an AI based plugin might get closer to the actual film look rather hand-coded math based plugins will be able to.