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
   
 
Read Color of Video Texture using XPresso (is it possible?)
Posted: 15 September 2020 08:15 AM   [ Ignore ]  
Total Posts:  5
Joined  2020-08-19

Hi!

I would like to know how I can make C4D read the color of the video file I imported through a Material Object’s Luminance Texture (basically a “Video” shader, not sure the right terminology of this is).

What I basically have is a video file (1920 x 1080 p; 24 fps) that only cycles between 3 colors (red, blue, black) every few frames. I would like c4d to read it, and I would then use the Compare node to create a Boole output, which would then be connected to a Pose Morph Node’s Pose.0 Enable (so basically, I want C4D to read the colors in the video to animate my Pose Morph Tag’s poses, is it possible?)

(Also, while we are on this topic, if this method is doable, is it possible to record the keyframes of when the Pose Morph Tag’s Pose.0 Enable is triggered while it is being animated by the video file?)

I am new at this. I apologize for sounding newbie, I really want to learn this software.
I would really appreciate the help on this one, thank you so much!

(P.S. It does not have to be XPresso, I just want a way for C4D to read the color present in a Video File to animate my Pose Morph Tag’s Pose.0 Enable)

Profile
 
 
Posted: 15 September 2020 04:47 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Fowdy,

Please have a look at the file:
https://www.amazon.com/clouddrive/share/LPNWJYuH8HmQUFw4A1oAVmzmmQHX8awwvsbzOMtWSwI

The idea was to place the video into the Shader Effector (Color is on, Alpha is off), which influences one “clone” with color.

This can then be read out via the Data node. I have set up two ways. To top row in the XPresso uses the HUE to adjust the Pose Morph. I used a Rande Mapper, as the lowest value was 0.33, to get the full range for the Pose Morph.

I know you liked to have Boole values.

So in the second row of the Xpresso editor, you find the single R, G, or B color readout. Which is a kind of trick first, as the values a super precise.
Which means a lot of digits after the period. IT is nearly impossible to compare them, to get a match. Since I have a REC 709 icc color profile on the clip (Which is broadcast standard for HD, I typically see people using just sRGB, which is not correct, but it would have different numbers for in the clip for R, G, and B.

So, I just multiplied the color data by hundred and truncated everything that was then after the period. I got a clean Integer then, and that is easy to compare, without the precision of around a dozen digits after the period. So, slight variations in the color, based on compression of different BT_REC709.icc profiles will not disable the setup.

I have placed only result nodes on this solution.

I’m not aware of any way natively to set keyframes for a Tag. IF you check the WIKI here on Cineversity, the complexity of setting keyframes via Python is explained. However, this would be a question for the Maxon Developer Forum then.

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
 
 
Posted: 15 September 2020 09:53 PM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.:

This kind of setup needs typically a (is bigger as & is smaller as) readout. This can be done by combining some nodes for each Color channel or value. Either way, it was not really where I wanted it to go. A simple range identifier is done with the RangeMapper. Since Boole was the target here:

Example
https://www.amazon.com/clouddrive/share/nzyHMtNMKkvxo7H3HohLicXBDzaJaCXXWfAklEy1CG8

 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: 15 September 2020 11:25 PM   [ Ignore ]   [ # 3 ]  
Total Posts:  5
Joined  2020-08-19

Oh my god! Thank you so much! this is exactly what I want to do! I’ll try to explore or experiment on it later since some of the concepts here are new to me, but thank you so much!

Also, I have taken a look at the previous posts here, and all of them have been answered by you. If it is fine with you, may I ask some learning advice? Like, is there a way to efficiently learn C4D? I have watched a bunch of C4D courses from Lynda, Udemy, SkillShare, and Cineversity, but if there is some other method to learn more stuff, I would really like to know it. You are like a C4D veteran, so I figured you are like the best guy to ask this.

Again, thank you so much!

Profile
 
 
Posted: 16 September 2020 12:50 AM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Fowdy; thanks a lot for your kind feedback.

To pull from a good source is critical, as you do. Be aware that some material might not be well researched on the web, which could give you some grief.

If one thing is sure, in terms of learning Cinema 4D, it is for everyone a little bit different.

The next point is that since it can be used for so many different areas, it is difficult to give any general advice.

With that being said, the best way is to understand where you are right now. Which is often the most significant obstacle. More about that later.

Let me explain. A few years ago, I did a survey from posts (direct questions) and the tutorial requests over the same period (two years). It took me two weeks, but the result was clear, what was asked for the immediate needs was not what was in the tutorial requests.

Another observation (I help people for 16 years in this regard, while using it for a quarter century, so I feel comfortable saying it): There is a particular idea to do cool stuff, and post it on YouTube, Vimeo, Pinterest, etc. Often question come from that motivation (nothing wrong with that!!!). I absolutely understand the idea of creating something to be proud of.

However, there are three states where one can be. If you jump too quickly to level three, there might be a point where a certain burn-out effect arrives.

The first, learning all the single tools, one by one. Using them as instructed.
The second part is to combine more and more of these essential tools, functions, etc.
Third, ignore what belongs together and combine widely, fail with that from time to time, but get something absolutely new based on that.

Let’s say we have 1,500 single essential items to learn (level one). We combine them with another item, results in TWO million+ combinations. (theoretically), more or less.
Third, we mess around with everything and get an option for infinite solutions; hence, something new shows up every day somewhere.

Which means there is a lot to discover. Do you need to learn all of that first (level one), then move on and then three? Nope. You can do whatever you want.

However, the more you are familiar with all the little basic tools (level one), the less they will be in the way when you combine wildly.
Even better, the more you know about all these basic things, the faster you have a library at your fingertip. This allows you to remember that you could combine this and that, and all of a sudden, there is that magical point where all works together, and you get something no one else has done before.

I hope that will motivate you to stick around, exploring the little and simple things. It is the base for that magic, not the copy of some tricks some shares. (also here, nothing wrong with that either!!!) Have fun and kick the rules out of the window; this is your time - and it should be fun.

So, what to have an eye on? Understand that it is all about information flow. What do you produce in terms of information that can be used elsewhere?

When you see something in a tool interface (Attribute Manager), you can check if you know all the parts in it. Remember: basic stuff is all there is to it. Complex things are built with simple things. The information flow might get tricky. But you will understand it better, what happens when you have muscle memory with the basics. (Broken record hereā€¦: sure!)

In a nutshell, stay curious, stay motivated, and if something makes no sense, will not work, drive you nuts, please ask, whatever it is (Cinema 4D based)

If you have a problem, others will have too. My philosophy is, a problem comes back until it is solved. Hence my many suggestions even to a single post. There is often more than one way to do things. It is good to be not limited.

Thanks for reading my long text. Since I don’t know what direction you like to got, I have kept it in a general way.

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: 16 September 2020 01:47 AM   [ Ignore ]   [ # 5 ]  
Total Posts:  5
Joined  2020-08-19

Thank you for the reply. This is actually very informative. I sometimes find myself stuck with the first point (using tools as instructed). But, I am slowly trying to combine some tools from different “genres” (i.e. using Sculpt Brushes for basic box modeling, not sure if a good example). I will keep this in mind as I learn more stuff. Again, thank you for the help!

Profile
 
 
Posted: 16 September 2020 02:05 AM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks for reading through it, Fowdy, very kind of you.

Yes, in the sculpture tool is Unsubdivide, for example works not with every mesh, but good enough to be explored. (Sadly, kind of a secret, I guess.) I agree, explore everything. In the ‘90s, I used the Customize Commands to be sure to have checked out all tools. It was my to-do list. The most unexpected places have the most amazing tools.

Being fluent in combining things will pay off. Not learning new parts of the application because of the “deadline” will not. We all can make time for what we love. It is our decision to be the best version of ourselves.

Over the years, I have seen many people starting,  growing, and some are even legendary already. It is possible. It takes motivation and endurance, sure. But the rewards to be fluent with your tools and the combinations found is wonderful; that is the magic that gives me goosebumps.

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