- मोशन ब्लर को “तार्किक चरम” तक ले जाने वाला यह प्रयोग मानव दृष्टि के motion smear और स्क्रीन playback के बीच का अंतर घटाते हुए blur को नए ढंग से परिभाषित करता है, और इसे procedural real-time animation पर लागू करता है
- प्राकृतिक दृश्यों में retina के cone cells प्रकाश stimulus को समय के साथ integrate करते हैं, जिससे receptor-level blur बनता है, लेकिन कम framerate वाली screen पर बिना blur वाला video प्राकृतिक smear के बजाय overlapping frames जैसा दिखता है
- पारंपरिक motion blur किसी frame के time interval का average लेकर प्राकृतिक दृश्य के करीब पहुंचता है, लेकिन तेज़ objects में discontinuity बच सकती है, इसलिए शुरुआत और अंत को कम weight देने वाला shutter function ज़्यादा प्राकृतिक परिणाम देता है
- real-time shader implementation multisampling और analytic ray tracing से बचता है; moving object को time-inclusive coordinates की density function के रूप में represent करता है, फिर time integral को volume ray casting से render करता है
- अंतिम “Torusphere Accelerator” orbital motion वाली sphere और rotating torus को व्यावहारिक रूप से infinite speed तक blur करता है, और “motion-blurred normals” न होने की वजह से surface normals को अलग interpolation से संभालता है
प्राकृतिक दृश्यों की गति और स्क्रीन playback का अंतर
- Motion blur मूल रूप से camera shutter खुले रहने के दौरान subject के move करने से बना film artifact था, लेकिन video को natural scenes और perception के हिसाब से अधिक समान बनाने के असर के कारण यह उपयोगी हो गया
- 3D और animation में “camera को simulate करना” और “natural दिखना” हमेशा एक ही लक्ष्य नहीं हो सकते
- natural motion blur देखने के लिए चार सवाल ज़रूरी हैं
- हम natural scene की motion को कैसे perceive करते हैं
- screen पर playback किए गए scene को कैसे perceive करते हैं
- दोनों मामलों में perception का अंतर क्या है
- video motion blur उस अंतर को कैसे कम कर सकता है
Cone cells का time integration और motion smear
- उजले वातावरण में मानव दृष्टि की initial processing cone cells करते हैं, और phototransduction तुरंत नहीं होता
- light stimulus की delay को time direction में stimulus को smooth करने के तरीके के रूप में model किया जा सकता है
- Howlett et al. (2017) का goldfish cone cells example photoreceptor में आने वाले photons की संख्या, weighting function, और उससे बने “effective stimulus” को दिखाता है
- इस weighting function के shape और human cone cells के ज्ञात response time को मिलाकर input scene में perceived image simulate की जा सकती है
- नतीजतन, natural scenes में भी photoreceptor level पर natural blur, यानी motion smear, पहले से मौजूद होता है
- example simulation मानता है कि observer object को आंखों से track नहीं कर रहा, बल्कि किसी fixed point को देख रहा है
स्क्रीन video में traditional motion blur क्या करता है
- सीमित frames per second वाली screen देखते समय, बिना motion blur वाले video की perceived image expected motion smear नहीं, बल्कि overlapping frames जैसी दिखती है
- motion blur लागू video में हर frame किसी एक moment को दिखाने के बजाय, frame द्वारा cover किए गए time interval के सभी moments का average लेता है
- यह एक frame time के दौरान shutter खुले camera से बने video जैसा है
- इस तरीके की perceived image natural scene के case से कहीं अधिक मिलती-जुलती हो जाती है
Shutter function से discontinuity घटाना
- traditional motion blur में भी कुछ object speeds पर motion smear में discontinuity artifacts रह सकते हैं
- shutter function पूरे frame interval को equally average नहीं करता; यह frame की शुरुआत और अंत के moments को कम weight और बीच के moments को अधिक weight देता है
- नाम diaphragm camera की shutter efficiency वाली उपमा से आया है, लेकिन यहां उद्देश्य camera simulation से ज़्यादा screen और natural scene के perceptual difference को घटाने वाला function चुनना है
- यह समस्या signal processing के window function बनाने की समस्या से बहुत मिलती-जुलती है, और लोकप्रिय window functions अच्छे परिणाम देते हैं
- subjective test के आधार पर, जब object एक frame के दौरान अपने width के बराबर scale की दूरी तय करता है, तब shutter function उपयोगी हो जाता है
- कम speed पर इसकी ज़रूरत बड़ी नहीं होती, लेकिन तेज़ move करने वाले objects में यह ज़्यादा natural दिखता है और paused frames भी ज़्यादा smooth लगते हैं
- यह approach आम camera simulation तरीका नहीं है, और consecutive frames की time ranges एक-दूसरे से overlap कर सकती हैं
- सामान्य camera simulation में frames के बीच time overlap नहीं होता, और अक्सर frames के बीच के moments छोड़ दिए जाते हैं
real-time shader से “infinite motion blur” बनाना
- target animation orbital motion वाली sphere और rotating torus को combine करता है, और दोनों को व्यावहारिक रूप से infinite speed तक motion blur करता है
- final result को interactive बनाने के लिए इसे real-time shader में implement किया गया
- multisampling हर frame के लिए कई time points के scene को render करने का तरीका है
- object speed जितनी अधिक हो, required samples की संख्या proportionally बढ़ती है
- यह “infinite speed” animation के लिए fit नहीं है
- analytic ray tracing motion blur भी एक विकल्प हो सकता है
- mesh में triangles को prisms में बदलने का तरीका है
- pure analytic approach भी संभव है, लेकिन यहां यह ज़्यादा भारी तरीका हो सकता है
- material processing के लिए दोनों तरीकों में अभी भी multisampling चाहिए
- चुना गया implementation “integrated volume motion blur” कहे जा सकने वाले hack जैसा तरीका है
- moving object को ऐसे function से represent किया जाता है जो time सहित coordinates को input लेकर inside के लिए 1 और बाकी के लिए 0 की density return करता है
- इस density function को time के respect में integrate करने पर किसी भी time interval की motion-blurred density मिलती है
- result को volume ray casting से render किया जाता है
- यह photo-realistically accurate तरीका नहीं है, लेकिन real-time performance में बहुत लंबे trajectories handle कर सकता है
orbital motion वाली sphere की motion blur density
- orbital motion वाली sphere को 2D cross-section में orbital motion वाले circle की problem तक reduce किया जा सकता है
- मान लें circle का center origin से दूरी R पर है, और circle का radius a है
- polar coordinates में दिए गए radius r के लिए object surface का angle θ निकालें, तो point के object के अंदर आने और बाहर जाने के times calculate किए जा सकते हैं
- object अगर speed v से orbital motion करे, तो angle coordinate में time term vt घटाने के रूप में express होता है
- किसी spatial point पर object के मौजूद रहने वाले time interval I और current frame time interval F के intersection की length motion-blurred density बनती है
- shutter function s लागू करने पर density और s(t) को multiply करके integrate किया जाता है, और अगर s का antiderivative S हो तो इसे
S(max I) - S(min I)रूप में calculate किया जा सकता है - animation में इस्तेमाल किया गया sine-based shutter function इस तरह design किया गया है कि integral value 1 हो, और time axis पर overlap होने पर भी किसी भी moment पर sum हमेशा 1 रहे
rotating torus और spiric section
- rotating torus को भी sphere जैसी ही process से handle किया जाता है
- torus का 2D vertical cross-section spiric section, या Spiric of Perseus कहलाता है
- torus का minor radius a और major radius b मानकर, किसी specific position c पर cross-section लेने से polar coordinate equation में torus के अंदर का region represent किया जा सकता है
- surface angle θ को solve करके positive और negative दो cases मिलते हैं, और दोनों boundaries के बीच का हिस्सा solid torus की density के रूप में इस्तेमाल होता है
- बाद के steps orbital motion वाली sphere जैसे ही हैं: time interval निकालना और shutter function integral apply करना
अंतिम Torusphere Accelerator
- final scene sphere और torus को combine करता है और standard volume ray casting से render करता है
- Surface normals के लिए extra handling चाहिए
- “motion-blurred surface normal” जैसी कोई concept नहीं है, इसलिए implementation में normals को mix करके इस्तेमाल किया गया है
- live animation basic mouse और touch interaction support करता है
- यह सभी devices पर ठीक से काम न कर सके, इसलिए page के top पर pre-rendered video भी दिया गया है
- final shader Shadertoy पर भी देखा जा सकता है
HN discussion से आगे आए मुद्दे
- Hacker News discussion में motion blur quality को artistic choice के रूप में देखने का नजरिया सामने आया
- color space conversion की अहमियत पर भी बात हुई
- film VFX में motion blur historical रूप से कैसे विकसित हुआ, इस पर भी चर्चा हुई
- early CG film Jurassic Park को physically impossible box shutter function इस्तेमाल करने वाले example के रूप में mention किया गया
- games में motion blur अभी भी एक controversial topic बना हुआ है
1 टिप्पणियां
Hacker News की टिप्पणियाँ
सीमित screen refresh rate पर motion blur को render या capture करते समय समझौता यह है कि दर्शक स्क्रीन पर चलते हुए object को अपनी आँखों से follow कर सकता है
वास्तविक दुनिया में ऐसा करने पर object साफ़ दिखता है। इसलिए या तो आँखों की movement track करके relative motion के हिसाब से blur देना होगा, या infinite refresh rate पर motion blur को पूरी तरह हटाना होगा। दोनों ही मौजूदा तकनीक से practical नहीं हैं, इसलिए कहीं न कहीं हमेशा कुछ अटपटा लगेगा। अच्छा director या game designer यह अनुमान लगाकर shutter speed या rendering blur चुनेगा कि दर्शक की आँखें कैसे move करेंगी
अगर rendered content वही visual language नहीं बोल सकता, तो refresh rate से अलग, एक tool कम हो गया समझिए। बेशक इसकी भी कुछ सीमाएँ हैं; 400Hz पर अगर फर्क ठीक से दिखे, तो यह काफ़ी चौंकाने वाला होगा
rendered content में दिलचस्प बात यह है कि इसे और आगे बढ़ाया जा सकता है। उदाहरण के लिए, एक frame की duration से लंबे shutter angle जैसे concept के साथ खेला जा सकता है, जिसे हम पहले से समझ चुके हैं ऐसा मानते हैं
यह तरीका peak screen brightness घटाता है और flicker से बचने के लिए minimum frame rate मांगता है, लेकिन persistence blur को कम करता है, जो असल दुनिया में न होने वाला eye-tracking blur है। सटीक रूप से कहें तो tracking blur को पूरी तरह हटाने के लिए हर frame को अनंत रूप से बहुत कम समय के लिए दिखाना होगा, इसलिए यह practical नहीं है। फिर भी VR headsets ऐसे flash/strobe तरीके का इस्तेमाल करते हैं
यही कारण है कि CRT और plasma screens की motion clarity, LCD या OLED से कहीं बेहतर थी। पहले वाले हर frame को थोड़ी देर के लिए चमक की तरह दिखाते हैं, जबकि बाद वाले sample-and-hold तरीके से पूरे frame time तक वही frame बनाए रखते हैं। उदाहरण के लिए, 60Hz पर यह 1/60 सेकंड तक रहता है। CRT का 60FPS, OLED के 120FPS से भी ज्यादा fluid लग सकता है
games में reprojection technique से बहुत सारे frames जोड़ने का तरीका भी है। engine में महंगे frames को बड़ी संख्या में render किए बिना भी असली camera movement का approximate रूप मिल सकता है। यह भी VR में पहले से इस्तेमाल हो रहा है, लेकिन अभी बहुत high frame rates तक नहीं। इस पर विस्तार से यह लेख अच्छा है:
https://blurbusters.com/frame-generation-essentials-interpol...
कहा जाता है कि reprojection से लगभग 1000FPS काफ़ी realistic है, इसलिए screen brightness घटाए बिना भी tracking blur की समस्या हल हो सकती है
इसे CRT/OLED के scan output, आम तौर पर rolling method, या LCD backlight strobing, अधिकतर full-frame method, से implement किया जा सकता है। लेकिन 24Hz पर हर frame को थोड़ी देर के लिए दिखाने से असहनीय flicker पैदा होता है, इसलिए film projectors हर film frame को 2–3 बार दिखाते थे। 50Hz पर यह मुश्किल से सहन करने लायक स्तर था, इसलिए कुछ European CRT TVs ने 50Hz video को 100Hz पर frame doubling किया, जिसके परिणामस्वरूप moving objects दो दिखाई देने लगते थे। सबसे smooth motion और न्यूनतम eye fatigue के लिए ideally 70–75Hz से ऊपर चाहिए, लेकिन तब 60FPS पर recorded video को judder या tearing के बिना दिखाना मुश्किल हो जाता है
यह उम्मीद कि यह visual media को ज़्यादा realistic महसूस कराएगा, इसके उलट games में यह video game को बहुत ज़्यादा edited film के सस्ते approximation जैसा दिखा देता है
बहुत तेज़ चलने वाली चीज़ों, बहुत पास से गुजरने वाली चीज़ों, या खासकर अपने point of view से अलग movements के लिए यह समझ आता है। लेकिन “character तेज़ी से घूमता है” जैसी स्थितियों में इसका बहुत ज़्यादा इस्तेमाल होता है
जब आप सिर या आंखें झटके से घुमाते हैं, तो आप धुंधली image नहीं देखते, बल्कि नई image देखते हैं, और दिमाग बीच का data फेंक देता है। आईने में एक आंख को देखते हुए दूसरी आंख पर focus shift करके देखिए, समझ आ जाएगा। क्या आंख या चेहरा धुंधला होता दिखता है?
Game में viewpoint move करते समय blur जोड़ने से बस नया view दिखने में देरी होती है। यह distract करता है और unreal लगता है
बेहतर test है अपनी उंगली या हाथ को बहुत तेज़ हिलाते हुए देखना। उंगली चलते समय motion blur दिखेगा। कुछ मामलों में afterimage की वजह से अलग-अलग “frames” भी दिखते हैं। उदाहरण के लिए, आधुनिक car tail lights देखें तो LED लगातार on नहीं रहती, बल्कि PWM से बहुत तेज़ blink करती है। इसलिए रात में tail lights देखते हुए आंखें हिलाएं तो धुंधली image नहीं, बल्कि dots की series दिखती है। यह तरकीब पता चल जाए तो धुंधला दिख रहा है या टूटे हुए dots दिख रहे हैं, इससे analog lighting और PWM में फर्क किया जा सकता है
लेकिन जब आप car में हों या game में हवा में उड़ रहे हों, तो glance करते समय image distort हो सकती है। उम्मीद यह होती है कि acceleration बढ़ने पर खिंचता हुआ blur आए, और ऐसा effect तेज़ scenes को कहीं ज़्यादा interesting बना सकता है। समस्या यह है कि motion blur लगभग हर जगह खराब तरीके से implement किया जाता है
तीन सबसे बड़े पाप हैं: objects को बहुत दूर तक blur करना, जिन चीज़ों को blur नहीं करना चाहिए उन्हें blur करना, और पूरी scene को blur करना। तीसरा अंत में दूसरे में ही आ जाता है, इसलिए असल में शायद दो ही पाप हों। सबसे जरूरी बात यह है कि motion blur subtle होना चाहिए। सही motion blur game को धुंधला नहीं बनाता, बल्कि उसे ज़्यादा realistic और smooth दिखाता है
अगर कोई object frames के बीच 50 pixels move करता है, तो blur की width 50 pixels से ज़्यादा नहीं होनी चाहिए। सच में अगर इसे और subtle रखना हो तो शायद करीब 25 pixels सही होगा। लेकिन पता नहीं क्यों racing games तेज़ चलने पर पूरी scene पर खूब radial blur लगा देते हैं, और निजी तौर पर मुझे लगता है कि इससे scene खराब हो जाती है
इसी तरह camera के relative जो objects move नहीं कर रहे, उन पर motion blur नहीं होना चाहिए। कई games यहीं गलती करते हैं। घूमते समय post-processing से scene को blur कर देते हैं। अगर scene पूरी तरह static हो तो यह ठीक है, और computation cost के लिहाज़ से भी बहुत efficient तरीका है। लेकिन अगर आप किसी object को track करते हुए rotate कर रहे हैं, तो tracked object धुंधला नहीं होना चाहिए। Racing game में अगर बगल वाली car मेरी ही speed से चल रही है, तो वह car blur नहीं होनी चाहिए
सही motion blur पाने का पक्का तरीका है कई full frames को लगातार render करके उन्हें blend करना, लेकिन अच्छा दिखाने के लिए बहुत सारे samples चाहिए। वरना vertical line जैसी कोई चीज़ screen के आर-पार उड़ते समय smooth blur की जगह vertical bands की series जैसी दिखेगी
शायद सबसे अच्छा hybrid approach होगा। Scene के हर object को अलग render करें, और camera के relative movement direction के आधार पर per-object post-processing blur apply करें। हालांकि Z-order handling एक बड़ी चुनौती हो सकती है
जब कभी 120FPS पर game खेलने का मौका मिला, हालांकि projector दुर्भाग्य से 60Hz पर locked था, तब मुझे motion blur के बिना खेलना ज़्यादा पसंद आया
अच्छा overview [1] में है
दिलचस्प बात यह है कि shutter efficiency modeling पर classic paper [2] के 2005 में आने से पहले, VFX production में इस्तेमाल होने वाले सभी renderers box shutter इस्तेमाल करते थे। यानी shutter तुरंत खुलता, तय समय तक खुला रहता, और तुरंत बंद हो जाता था
“Jurassic Park” या “The Mask” जैसी films में extreme motion blur scenes देखें, तो वह box shutter इस्तेमाल करने वाला PhotoRealistic RenderMan है
[2] की parameterization को production में 1:1 पहली बार उसी साल [3] में implement किया गया था जिस साल paper आया, और आज तक बदला नहीं है। इसका पहला इस्तेमाल “Charlotte's Web” में हुआ था, और यह Rising Sun Pictures द्वारा [3] का इस्तेमाल करके बनाए गए spider characters पर ही apply हुआ था
Pixar ने भी कुछ साल बाद इसे जोड़ा, लेकिन [4] में इसे थोड़ा ज़्यादा push कर दिया। आजकल ज़्यादातर offline renderers में यह feature होता है और इसे shutter curve कहते हैं
[1] O. Navarro et al.: Motion Blur Rendering: State of the Art (https://citeseerx.ist.psu.edu/doc_view/pid/fc23fb525cafa8fe6...)
[2] Stephenson, Ian: Improving Motion Blur: Shutter Efficiency and Temporal Sampling (https://staffprofiles.bournemouth.ac.uk/display/journal-arti...)
[3] https://www.3delight.com/, खासकर https://nsi.readthedocs.io/en/latest/nodes.html देखें
[4] https://renderman.pixar.com/resources/RenderMan_20/cameramod...
डेमो ऐसा लगता है मानो इसकी गणना sRGB space में की गई हो। यानी यह nonlinear brightness values इस्तेमाल कर रहा है, और blur के अप्राकृतिक लगने की ज़्यादातर वजह शायद वहीं से आती है
किसी physical phenomenon को simulate करना हो तो linear brightness values में process करके सिर्फ अंत में sRGB में convert करना चाहिए
अगर human visual perception के nonlinear effects इसे पूरी तरह offset कर देते हों तो बात अलग हो सकती है, लेकिन ऐसा है तो कम-से-कम इसका ज़िक्र होना चाहिए
दोबारा जाँचूँगा और सही हुआ तो interactive diagrams और text update करूँगा। मुख्य “torusphere” shader में motion blur realistic नहीं है और हाथ से adjust किया गया है, इसलिए शायद वह ठीक रहेगा, लेकिन शुरुआती कुछ interactive diagrams theory को सीधे लागू करते हैं, इसलिए यह टिप्पणी उन पर लागू होती है। फिर भी मुझे लगता है कि इससे लेख का core idea कुल मिलाकर invalid नहीं होता
torus demo वाकई शानदार है। high frame rate blur perception को कैसे बदलता है, यह दिलचस्प है
मैं 240Hz display इस्तेमाल कर रहा हूँ, और Figure 5 में लगभग 12rad/s तक अलग-अलग circles दिखाई नहीं देते। 40rad/s पर भी चलते समय traditional shutter और sine shutter options के बीच फर्क महसूस नहीं होता
mouse movement की smoothness और कम latency भर से ही मैं 240Hz की जोरदार सिफ़ारिश करूँगा। 60Hz mouse pointer पर वापस जाना सच में बहुत, बहुत मुश्किल है
कुछ लोग सच में इसकी परवाह नहीं करते। input latency या terminal emulator holy wars जैसी बहसें भी मुझे समझ नहीं आतीं। framebuffer console में काम करने और 50ms extra latency वाले ssh पर काम करने के बीच मुझे फर्क महसूस नहीं होता
30FPS और 60FPS games का फर्क पहचान सकता हूँ, लेकिन सिर्फ जब ध्यान से देखूँ। अगर frame rate ऊपर-नीचे न होकर stable रहे तो मुझे ज्यादा फर्क नहीं पड़ता
हालांकि अधिक smooth transitions वाला interface ज्यादा stable महसूस होता है, और मुझे हैरानी है कि क्या higher refresh rate समय के साथ mental state पर असर डाल सकता है
अगर torus और पीछे वाला sphere motion blur से बने हैं, तो क्या उन्हें कुछ हद तक transparent नहीं होना चाहिए? किसी क्षण वे फिर opaque हो जाते हैं जैसा दिखता है, इसलिए अजीब लगता है
इसलिए title भी motion blur all the way down है
लेकिन moving object से आने वाली light stationary object की तुलना में कम होनी चाहिए। इसलिए distance बढ़ने पर object धीरे-धीरे और dark होना चाहिए
यह film camera को simulate करने की कोशिश से हटकर human visual system को simulate करने की कोशिश है। यह उपयोगी दिशा है
पुरानी technology की नकल करने से हटकर reality के एक कदम और करीब जाना है। shutter-style motion blur भी sepia-tone prints, 16FPS black-and-white films, और mechanical shutter की वजह से बनने वाले elliptical wheels की तरह गायब हो सकता है
reality को reproduce करना लक्ष्य नहीं है। क्योंकि उसे हासिल नहीं किया जा सकता
ambient.garden अभी front page पर आया, शायद इसलिए यह लेख भी ऊपर आया है। दोबारा पढ़ने पर लगा कि असल में यह दो लेख होने चाहिए थे
शुरुआती हिस्सा मुझे अब भी पसंद है। motion blur क्या है और theory में क्या होना चाहिए, इसे ठीक से explore करता है। बाद वाला हिस्सा motion blur-based किसी खास “torusphere” animation के लिए shader कैसे काम करता है, इसकी थोड़ी बिखरी हुई ultra-compressed explanation है। वह हिस्सा, कम-से-कम मेरे लिए, मुख्यतः इसलिए उपयोगी है कि code इस समय पूरी तरह समझ से बाहर न हो जाए। पीछे मुड़कर देखूँ तो दोनों हिस्सों के बीच transition कुछ ऐसा लगता है जैसे जमी हुई झील में छलांग लगाना। माफ़ी
अच्छा हुआ कि यह सिर्फ अभी पीए गए एक glass wine की वजह से नहीं था
मैंने 4D extrusion के projection function के रूप में motion blur से कुछ बार खेला है, लेकिन actual context यानी video और textures में यह caching वाली hardware sampling की तुलना में impractical हो जाता है। फिर भी यह लेख देखकर मन होता है कि “बस एक बार और कर के देखूँ”
real-time comparison demo कमाल का है। उस point तक follow करते हुए दिमाग से तो लग रहा था कि “समझ गया”, लेकिन जब motion blur on/off खुद toggle कर सका तो फर्क सच में बहुत साफ़ हो गया
motion blur all the way down देखने के बाद न जाने क्यों string theory, atoms, और universe कैसे बना—इन सबके बारे में सोचने लगा
बेशक, जितना गहराई में जाते हैं, चीजें उतनी ही अजीब होती जाती हैं