[ANSWERED] Image Flicker - 3D Particle Actor
-
Problem 1: The image is flickering (oscillating infrequently) when I feed a Shape Actor (unfilled circle) into 3D Particle actor.
I have also tried a Picture Player with a circle image (a ring, not filled circle) and I have the same problem.
Is this due to my OS or some limitation of the Isadora 3D Particle actor or something else? The problem happens on V3.08f11 and is more exagerated on V2.6.
I've tried changing Video Setting - Full Frame anti aliasing and also Vertical Trace with no improvement.
I believe it's related to the SIZE SHIFT in the 3D Particle Actor - the question: is the size change within the actor synced with the frame rate?Problem 2: How can I overcome the pixelation that happens when we use the Shape Actor?
Files: ConcentricCircles.zip
CYC: 270, FPS 30, LOAD: 2.3%
Isadora V 3.08f11Hardware Overview:
Mojave 10.14.6
Model Name: MacBook ProModel Identifier: MacBookPro15,1
Processor Name: Intel Core i9
Processor Speed: 2.3 GHz
Number of Processors: 1
Total Number of Cores: 8
L2 Cache (per Core): 256 KB
L3 Cache: 16 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB -
@aidan Image File :
-
Is this due to my OS or some limitation of the Isadora 3D Particle actor or something else? The problem happens on V3.08f11 and is more exagerated on V2.6.
The issue here is the very slight variation in when the screen is rendered. On macOS, we use a special, high performance callback called "CVDisplayLink" to render the stage at the moment that the screen needs to be refreshed. Assuming that the refresh rate of your monitor is 60 Hz, that means this callback should be called every 33.33333... mS if the "Display Refresh Lock" setting in the Preferences is set to "Scaled". (If you set it to "Full", the display link callback is called at the refresh rate of the display -- 60Hz in this example = 16.66666666... mS).
That's how it works in theory. In practice, I've measured the frequency of the callback and it can be 33.12 or 33.5235 or some other value that's very close to 33.333333.... but not exactly that. It will also sometimes skip a cycle entirely -- which may an even bigger glitch I saw a couple of times. The CVDisplayLink callback is Apple's suggested way to get the most accurate rendering cycle possible.
When playing video content you don't notice these minuscule differences in callback frequency. Unfortunately, your patch creates the worst case scenario. The tiniest discrepancy in the frequency will be seen as a noticeable change in the appearance of the particles you are rendering because it all relies on extremely fine timing because of the use of the size inputs.
I don't know what your ultimate goal is, but I have attached a different way to get the look I see in the patch using Feedback. That may or may not work for you.
Finally, your image was quite low res because the Shapes actor was using the default resolution specified in the Preferences > Video Image Processing > Default Resolution. On my computer that was set to 640 x 360. Maybe you have changed it on your setup, but I would strongly suggest that you explicitly set the resolution of the Shapes actor using the 'horz size' and 'vert size' inputs.
I hope that my patch my lead you in a direction that works for you. I don't think you're going to get satisfactory results with the Particles actor in this use case.
Best Wishes,
Mark -
I realize that this problem could be solved by measuring the time inside the 3D Particles actor using the highest resolution timer on the system, instead of relying on the time provided by the CVDisplayLink callback. That might solve the issue in the future.
@DusX or @Woland, please add a feature request that says: "Update 3D Particles and 3D Model Particles to Perform Time Measurements Using Low-Level System Timer"
Best Wishes,
Mark -
Many thanks for the concise and immediate response!
I will try your proposed soultions and approach, Mark.
Stay safe! Aidan
-
@mark said:
Update 3D Particles and 3D Model Particles to Perform Time Measurements Using Low-Level System Timer
Feature request has been entered.
-
@aidan said:
Many thanks for the concise and immediate response!I will try your proposed soultions and approach, Mark.Stay safe! Aidan
Dear Aidan,
I sort of couldn't let this go. I actually tried my feature request, but it didn't really improve anything. In the end, it comes down to the accuracy of the Pulse Generator, which will also vary very slightly for the same reasons listed above about the callback.
That said, I realized your patch has a flaw: you were only allocating 10 particles. Sometimes, this means they never reached the fade out time and simply disappeared... which might be part of the flicker you see. I've modified your patch to work a slightly different way: instead of using the size to make the circles get bigger, I used the 'z velocity' input. I also ensured that there are enough particles. You can vary how many circles you see by changing the 'hold time' input.
In addition to trying this patch, try setting the Isadora Preferences > Frame Rate/Tasks > Display Refresh Lock to 'Off' instead of "Scaled"
There's still some visible jitter. But I'm not seeing the flicker as much given the fixes I made to your patch.
Best Wishes,
Mark