Jump to content

Light flickering interval


Recommended Posts

I'm working on a scene, which has a flickering light.

I tried to make the light flickering, but can't find a way to do a proper timing with an interval.
The result I'm looking for is something like the lights on the wing of this drone (starts at 2:43):

Created already this (see attachments), based on this tutorial. But can't find a way to add an interval

Is there a any correct way to make the flickering with an interval?




Link to post

The vibration method will give random flickers - that drone seems to be a regular cycle of 3 flashes (or is is 2) with a gap. If that's what you want, try this file.


There's a modulo on frame count, that counts up to a value and repeats. Test the modulo out = 0 to trigger a monoflop timer. This outputs a 0-1 linear ramp that can be rangemapped to give 3 light pulses. The monoflop duration controls the length of the 3 flashes. You can change the RM spline to give different shape of light pulse.


If you actually want random flashes, I've got some other methods.



Link to post

Since the light flash is very short - 1 or 2 frames - maybe actually specifying which frames the light is on would be a better idea. It would be a bit difficult in XPresso, but easy in Python. Here I made a list of the 'on' frames, and test if the frame loop value is on the list


def main():
    global intensity
    frame = doc.GetTime().GetFrame(doc.GetFps())
    loop = frame % 30
    L = [0, 1, 6, 7, 12, 13]
    if loop in L:
        intensity = 2
        intensity = 0



I know people run a mile from coding, but sometimes it's simpler.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.


We are dedicated Cinema 4D Community of friendly and passionate artists, hobbyists and developers. Feel free to join us and share your knowledge, your art and anything that might help Community to grow. We are providing guidance, free plugins and files, feedback, sponsorships and various discounts for our Contributors. :cowboypistol:




  • Create New...

Copyright C4D Cafe © 2020 Powered by Invision Community