Random Video Texture start frame
Posted: 09 June 2021 10:35 AM   [ Ignore ]  
Total Posts:  3
Joined  2020-03-15

Hello all,

I have an issue I’m wondering if there is an easy solution for. I have around 20 videos mapped to planes that I have dropped into a cloner and duplicated and distributed into 3d space. I have the videos set to loop but what I would like to do is have each instance of the video textures start at a random frame at frame 0 but also still loop so that no repeated clones video is the same. Make sense?

Thank you,
Dan

Profile
 
 
Posted: 09 June 2021 12:58 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
Total Posts:  10425
Joined  2011-03-03

Hi Dan,

Video in the material can’t be affected with MoGraph. What can be directed are images based on brightness-values of the clones via the Multi-Shader.

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

The key is to have a cycle of gray values for each clone that represents the clip’s running time and move the cycles for each randomly.
mod((t/4+(rnd(id;1)));1)
For a four-second clip with a matching fps, this would be it.

If all 20 clips are added into one clip, then saved as an image sequence, this would be an option, but it would not cycle a single clip per screen, of course. Since I have not a lot of data about the project, clip length all equal, etc. I can’t say more.

Besides that, the Animation parameter Range start/end and loop will allow for a manual setting, but that is typically not wanted.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 09 June 2021 01:36 PM   [ Ignore ]   [ # 2 ]  
Total Posts:  3
Joined  2020-03-15

Thank you DR.Sassi

I see what you’re getting with this solution. And thank you. I guess I can transcode each video to an image sequence and go this route… Which is better than what I thought I might have to do which is export a bunch of different video at different starts points and bring those back into cinema.

Thank you again!

Profile
 
 
Posted: 09 June 2021 01:47 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
Total Posts:  10425
Joined  2011-03-03

You’re very welcome, Dan.

Thanks for taking the time.

There are specific criteria that require the video to stay inside of Cinema 4D, e.g., reflections or even GI.

If that is not a requirement, perhaps working with placeholders and using After Effects to comp the videos into it would be an alternative.

My best wishes for your project

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 13 June 2021 01:09 PM   [ Ignore ]   [ # 4 ]  
Total Posts:  3
Joined  2020-03-15

NOTE:::::: I should have mentioned I am using redshift to render!

To anyone who is using Redshift and try’s this method, it will not work right off the bat! Dr. Sassi’s method relies on the cloned objects to have a brightness value. So you need to tell Redshift (via the Color User Data node and set it to “MoGraph: color” under the attribute name) to generate a greyscale value for the clones. you will also need to use the Redshift specific MultiShader and set the Range to Scalar 0.0 to 1.0.

I was having the damndest time trying to figure out why clones weren’t playing the image sequence when I went to render but i figured it out! wink

Profile
 
 
Posted: 13 June 2021 01:32 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
Total Posts:  10425
Joined  2011-03-03

Hi Dan,

Thanks for the update.

Yes, that happens often; missing information leads to limited results.
This is correct; you need the User-Data Node to gain access to this data.

I typically ask for a scene file. I should have insisted on one. That would have cleared it.
(It is not rare that I have to ask three or four times for a project file before I get one, if at all: but there is no replacement for it).

https://docs.redshift3d.com/display/RSDOCS/Cinema+4D+MoGraph#Cinema4DMoGraph-RSMGColor

I’m glad you got this working anyway. I would love to see your set up.

All the best

Image Attachments
Image 6-13-21 at 2.28 PM.jpg
 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile