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
   
 
Mograph Shader Problem with Alpha Channel
Posted: 03 March 2021 03:03 PM   [ Ignore ]  
Total Posts:  4
Joined  2012-05-30

Hello
For an animation I use the mograph color shader in combination with the alpha channel, a simple effector and a linear field to reveal some boxes within a clone.
Now I had to add some random color tones to the material I use on the boxes.
I took the mograph color shader and added the random-effector.

The problem is, that the alpha appears on the random tones as well.
So is there a way, to tell the random effector just to effect the color and mask out the alpha?

Does anybody understand the case and know a workaround?
For better understanding I put two models in the attachment.
If you check the Alpha-Channel in the material in model 02 you see the unwanted effect

Thanks for any help!

Cheers Christian

File Attachments
MographShader-Problem.zip  (File Size: 140KB - Downloads: 151)
Profile
 
 
Posted: 03 March 2021 08:05 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Christian,

The MoGraph Color Shader uses in Color-mode the information that each clone has received. Which results from anything that was delivered to the clones.
This information is an RGB value, not an RGBA. What you use in the alpha channel is RGB. There is no way to have two different pieces of information.

Since your needed alpha information is a Linear Field, why not use a gradient in the alpha. If that is required to be animated in X, Y, Z, you can often use the 3D versions of the gradients or mix gradients. Via Xpresso, you can use two Null objects to define the start and endpoint of that 3D gradient. This is different, as the clones will be affected by the gradient, moving slowly over their surfaces. It looks like fog on the floor.

A little bit tricky, but anyway, relatively easy to do is split the color in red and green and use one color for the alpha and one for the random colors. Since Cinema 4D is working in float values internally, this will not really limit the outcome.

Please have a look at the example below.
https://www.amazon.com/clouddrive/share/Jo8cx6X3S4wkSEMCBVfdpQwCfLiP6mnRz4X5LfWocc1

Let me know if you have any questions; I’m happy to look into it.

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: 04 March 2021 08:24 AM   [ Ignore ]   [ # 2 ]  
Total Posts:  4
Joined  2012-05-30

Hello Dr. Sassi,

that looks definitely like the way I can use!
I’ll integrate your dummy setting in my project and see how it turns out.

I understand the combination of RGB-fields not complete yet, but get a clue.
Thanks for your kind and quik help! I’ll inverstigate the topic more - seems to be very useful.

I had a workaround in mind to put three or four ojects in the cloner with different materials and to mix these with a random effector.
Thought I could avoid the shader therefore.
But yours is definitely smarter! smile Thanks again.

Greetings Christian

Profile
 
 
Posted: 04 March 2021 05:54 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Christian.

Please let me know if there is any question about this. I’m happy to look into it.

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: 19 March 2021 09:49 AM   [ Ignore ]   [ # 4 ]  
Total Posts:  4
Joined  2012-05-30

The Project is finalized! Thanks for your help one more time smile !

One more topic appeared because the client asked for an additional design.
But I already solved the case with a quick workaround. I’m just asking myself.

In order to achieve a scattered structure of the boxes I worked with an polygon object in the cloner.
However this coused a flickering / jumping in the colours when I lifted up the boxes with the position effector.
Probably this is caused by the positions of the polygons which are connected to the material colorizer steps.

Due to deadline- and budget-reasons I worked out a quik workaround and just changed the material for a few frames so that the effect won’t be recognized.
But I wonder if there is a way to avoid the flickering more sustainable by another technique?

I had two cases (shown in the JPG):
1) Build up the entire warehouse and …
2) Vertical moves of selected piles.

The second case I could have probably solved as well by just moving up the polygon-object for the cloner-structure
For the first case I had no solution in mind.

If you have a quick answer, I would love to know it, in case I’ve to work for a similar project.
But please don’t put much effort in the matter, if it is a more complex elaboration.

Thanks for your thoughts.


PS: Can’t attach the JPG
Can be found here: https://www.dropbox.com/s/wn6kvjz5hxunol2/Cineversity_Clones-Colours.jpg?dl=0

Profile
 
 
Posted: 19 March 2021 03:40 PM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Christian,

Please render a preview with the file below.
https://www.amazon.com/clouddrive/share/n3OIK0xCxBoK5ogqowzXPk9lo43LnhJizhdnL8gmkI4

Thanks for your efforts with the images. There is very little use of images, as they do not show me the setup nor all parameters. I can’t really tell what is going on. Sorry. (BTW.: Images have a size limitation here 800w*600h.) Please always your current scene file or preferably a reduced file that shows the problem.

Guessing is a method that should be avoided to not waste time.

However, there are two of those that I could toss into the mix: was the color set up in the right way? When working with a single channel, often it is not realized that white is Red, Green, and Blue. A single color gradient set up green to white will not work; Green to black will.

Another option to set up a problematic scene is when the noise/random part is based on spatially related values, and the position change of the clones is done BEFORE it receives the color. Then the Clones slide through the noise. Flickering is the result, which is sometimes wanted, of course.

I’m happy to look into any questions, of course. Just let me know.

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: 24 March 2021 04:10 PM   [ Ignore ]   [ # 6 ]  
Total Posts:  4
Joined  2012-05-30

Thanks for your detailed answer.

Of course, project files make much more sense than pictures. Sorry for that.
I’ve reduced the project files to the essential elements.

You mentioned the order of the effects.
As far as I understand the structure in your file the order of the effectors doesn’t matter.
Both sequences (Alpha / Position oder Pos / Alpha) work the same way.

I use a similar structure but changing the order destroys the function.
It only works with the position effector first.
Can’t find the difference by now.

You find everything in the .c4d models.
If you have any questions let me know.

Unfortunately the second attachment will not work, although it fits the requierements.
I used the dropbox again:
https://www.dropbox.com/s/tnjkt8savtplqui/Sequenz_01_Aufbau.zip?dl=0

File Attachments
Sequenz_02_Piles.zip  (File Size: 199KB - Downloads: 148)
Profile
 
 
Posted: 24 March 2021 04:49 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi mCotten,

Thanks for the files. Very much appreciated.

The position (green) needs to be first; otherwise, the alpha (red) is already given.

Besides, if the linear (red) is set only to color (Color-Remap) instead of the gradient, you need to adjust the Cloner.
Inside the Cloner> Transform> Color: black. The cloner-white will otherwise introduce information that you don’t want.

With this, is your setup working now in the way you like?

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