A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Xpresso + RS light flicker effect
Posted: 15 January 2022 11:16 PM   [ Ignore ]  
Total Posts:  22
Joined  2022-01-14

Hi there all,
a little Xpresso question for you…
I’m a total xpresso noob, please bear with me…

I have a cylinder turned into a tube light, using a RS meshlight.
In Xpresso I have a noise node controlling the light’s intensity, so it flickers nicely.
However, the flicker is constant, and I’d like it to happen only once in a while.

For example, I’d like to tell the noise node to only do it’s thing every few seconds at random intervals, say between a 5 to 10 second range.
Does that make sense? I’m unsure if, and if yes how this could be achieved through Xpresso.

File attached,
any pointers greatly appreciated, thanks!

File Attachments
Light flicker.c4d.zip  (File Size: 30KB - Downloads: 84)
Profile
 
 
Posted: 16 January 2022 12:04 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi joep,

Please have a look here:
https://www.amazon.com/clouddrive/share/GBt9ByRWb38Rgc13GTCvQA01UYoJvDmqJsseMX2GQzv

Is this working for you?

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 16 January 2022 03:30 AM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.: Perhaps this is a better fit

https://www.amazon.com/clouddrive/share/OknYcpa6zLPAVY4L3Evp1QnolsIwB4nA82vqgJsxETR

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 16 January 2022 03:35 AM   [ Ignore ]   [ # 3 ]  
Total Posts:  22
Joined  2022-01-14

EDIT
I saw you second reply only after posting, its giving me some other ideas to play with, thanks!
———————————————————

Hi Dr Sassi,
thanks again for your time and suggested solution!

The goal is for the light to stay lit at a constant value (no flicker just lit), and only flicker for brief durations of time.
(Instead of it to actually switch off at times, which it does with your suggestion)

I’m playing around with the compare node and others, but so far failing to find the logic I’m after.

What I think I need to figure out is how to tell it to switch the noise node on and off at random moments in time.
I figured I could somehow tell it to activate it between certain frames. Say between frame 15 and 30 activate noise node, and again between frame 90 and 110 etc etc
But I’d like this to happen multiple times over say 300 frames, and at this point it seems easier to simply animate the “enable” tickbox a few times during the animation. Maybe I’m making this much more complicated than necessary..

I’ll tinker on for a bit more,
J

Profile
 
 
Posted: 16 January 2022 03:40 AM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi J,


That is pretty much this:
https://www.amazon.com/clouddrive/share/BGJiMrg0K4rwf0ya128D6y3275lbUztJ1qkyE9B1pTr

Enjoy your weekend

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 16 January 2022 03:42 AM   [ Ignore ]   [ # 5 ]  
Total Posts:  22
Joined  2022-01-14

Yes indeed! Now let me see figure out whats actually happening and make it work with my RS setup,
thanks again & have a great weekend too!
J

Profile
 
 
Posted: 16 January 2022 05:13 AM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks a lot, J!

I can guide you through the setup if you like. Just let me know.

Often, I assume that artists like to explore and make it their own, but my offer stands to explain its idea.

I reduced it to just Xpresso, except for a standard light so that everyone can use it.

Since your’s was a fluorescent tube, I thought to have the lower light levels more greenish (or orange for an incandescent bulb), and if complete, it is entirely white. I have no idea if that would fit your project, but I’m happy to share if so.

My best wishes for your project

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 16 January 2022 03:14 PM   [ Ignore ]   [ # 7 ]  
Total Posts:  22
Joined  2022-01-14

Thanks for your help Dr Sassi!
Yes, good move to simplify it for everyone without RS.


I’d love to understand better whats happening, it would likely help me to gain more control over the effect.
And adjusting the colour depending on intensity sounds like a great detail to add.
I’m really enjoying slowly learning some Xpresso, but have to admit it hurts my brain a little bit wink

I’ve attached my current setup (using a RS light again though) where I changed the Compare (1.99) + Condition (2) parameters to extend the “pause” between solid light and flicker.
I’m not entirely sure how this works, and I’d love to understand how to add a way to input the amount of time (frames?) the light should stay “solid”. Does that make sense?

Also detail, I noticed you’re using a null to add the xpresso to.
Is it purely to keep things organized, or does it have another function?

Thanks!
J

File Attachments
Light flicker 00.zip  (File Size: 69KB - Downloads: 76)
Profile
 
 
Posted: 16 January 2022 06:16 PM   [ Ignore ]   [ # 8 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi J,

Yes, the XPresso is on a Null to keep it movable. The Object manager position defines part of the priorities. Besides, Xpresso can have absolute and relative positions, making it easier to exchange objects later on. But placing it on an object is fine as well.

Think of the Noise node like the Landscape object. It is pretty much a noise-based displacement. When you change slowly, the scale is similar to the virtual noise node results are visible.

This landscape has a reporter sitting there and reporting every frame the current elevation of this specific location. That is the output of the noise node.

The random (noise) results will provide a number that the Altitude value (Amplitude) limits. In short, the light constantly flickers as it changes between 0 and 1.

With the Compare, we ask now, is it bigger or smaller? Yes or no (1 or 0) is the answer. Light goes full on or off.

We could also use this 1 or 0 to feed in each time something different; we use the Condition node.

So if there result is 0, then the first input of the Condition is used. If it is 1, then the second input.

You wanted to have it primarily on, with flickering interruptions. So, input one is set to 100% (or 1).

When the flickering should happen, we use input two of the Condition, and there we feed another noise with a different Seed and other settings in. (so we can adjust this independently).

With Color, we split the flickering and adjust its value in Red, Green, and Blue values (XYZ, via a Range-Mapper. This allows us to increase the value for Green, for example, a little bit earlier. Or, for a light bulb, the orange tone will stay longer than the cold parts of the light.

Here are the color examples
https://www.amazon.com/clouddrive/share/WO70x8EH3qVC9oAVkErGdm9b7KhLx5DFOJ99fMWrYc8

In your example the Amplitude is 3.5 and the “switch between 1 and 0 happens at 1.99. I use sometimes larger numbers to make it clear, or to get for the 100% more hits.

The input2 parameter of the Condition is set to 2, which delivers a value for the light of 200%. At the same time, the flickering for the light itself is between 0-350% in your example.
Note that the values to trigger the Condition are independent of the values you feed into it.

Enjoy your long weekend (if you are in the US.)

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 17 January 2022 05:24 AM   [ Ignore ]   [ # 9 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.: I assume we are visually oriented here; why not show that Noise curve result?

Example:
https://www.amazon.com/clouddrive/share/55rE272qAbDGkqiwTK2nNgrUE9TqxpzoqLsmquPSckz

Change the parameter while the scene is “playing”.

Enjoy

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 17 January 2022 03:30 PM   [ Ignore ]   [ # 10 ]  
Total Posts:  22
Joined  2022-01-14

P.S.: I assume we are visually oriented here; why not show that Noise curve result?

Now you’re just showing off ;P
Just kidding, your assumptions are correct, a visual representation is super helpful, amazing, thanks!

Thanks again for such elaborate explanation!
Somehow this is very challenging for me I(like the “logic” of math or coding),
but you’re definitely helping me understand, slowly but surely smile


Finally go it to flicker at an interval to my liking, and have a better understanding why what happens and what to tinker with to fine-tune it if needed.
The additional colour shift is great and I’ll dissect it when I have a moment, for the moment the simple flicker will suffice (to get the basic concept down, this detail can come later).


Thanks again Dr!
J

Profile
 
 
Posted: 17 January 2022 05:58 PM   [ Ignore ]   [ # 11 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, joep.

Yes, “showing off” is what I do here, hehe, as the old director’s philosophy is: show don’t tell.

Seriously, that is pretty much expected (… feeling overwhelmed?), and it might take a while. Understanding “other people’s” XPresso is often more complicated than creating your own.

My tip, I have a structure in mine. I start with what I have on the left, then process it in the middle area, while the right side of the “node tree” is always the result.

Then I go down and start the next thing. Left, middle, right. This helps me to “read” my stuff even a few years later.

I stay (if possible) away from a pile of nodes all over the place. That is not fun.

Anyway, one node at a time! Try to visualize what you are doing, like with my “show-off” wink, as that might help seeing relations in the file.

Enjoy

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 17 January 2022 06:21 PM   [ Ignore ]   [ # 12 ]  
Total Posts:  22
Joined  2022-01-14

Thanks for the reassurance Dr Sassi!
And that’s a good tip to keep that left-to-right structure in mind, helps a lot to keep an overview.

One day I’ll be showing off too wink
J

Profile
 
 
Posted: 17 January 2022 06:24 PM   [ Ignore ]   [ # 13 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi J.,

Thanks for the kind reply, and yes, I hope you have fun “showing off”.  grin
There is nothing more rewarding than having an idea and making it work.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile