Demystifying Cinema 4D Mograph Shaders

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

REPLY TO THREAD
 
Thread Tools Display Modes
  05 May 2018
Demystifying Cinema 4D Mograph Shaders




This is the first of three tutorials which cover the Mograph Shaders. I have had these tutorials recorded for a while and they were originally going to be part of a new training series for Mograph, but I decided to post them online for free instead. I have worked with many people and held a lot of training courses over the years and the Cinema 4D Mograph Shaders are often a mystery to a lot of users.

In this first example, I show you the basic principles behind the Mograph Color Shader, demonstrating how you can use this with regular non-mograph objects. I then expand upon this to explore the flexibility of this shader and how you can use it in any channel of your material to create variation in your renders with minimal effort whilst maintaining an optimal workflow.

Watch Part I here




In this second example, I expand upon the first tutorial about working with the Mograph Color Shader by demonstrating how you can use this to control the colour of lights in your scene, as well as materials.

Watch Part II here





In the third and final part of the series, I look at the Mograph Multishader & demonstrate how you can build a complete deck of playing cards, with each card unique and no duplicates, whilst using only one material.

This method is then taken even further as I show you how to isolate a specific card and make this the Ace of Spades (of course!).

Watch Part III here
__________________
LUXX
3D Animation and Motion Graphics
helloluxx
Professional MoGraph & VFX Training

@helloluxx
facebook

Last edited by TimC : 06 June 2018 at 06:29 AM. Reason: Added all three tutorials to first post in thread.
 
  05 May 2018
Nice timing.

I was just working w/mograph shader last night and welcome a review/primer. The only thing I wish had been covered in the tut is driving transparency. I suspect I'll figure that out w/a bit of exploration...derivative from what was explained.
__________________
C4D R19 Studio, MODO 902, VRAY, Octane, Cycles. PC/Mac.
 
  05 May 2018
Thanks for the feedback. I do mention using the color shader in the transparency channel at around 19mins 10secs. Using the color shader to drive the colour of the transparency, you could use a greyscale gradient rather than colour if you only want to drive the transparency level, white would be fully transparent -> black opaque, or did you mean something else?

Cheers
Tim
__________________
LUXX
3D Animation and Motion Graphics
helloluxx
Professional MoGraph & VFX Training

@helloluxx
facebook
 
  05 May 2018
Hey Tim. My use case is a bit more finessed as there will be effectors driving the animation of the opacity from fully opaque to completely transparent. I've done this kind of thing before but its been awhile. You've given me enough for me to find my way. thanks again.
__________________
C4D R19 Studio, MODO 902, VRAY, Octane, Cycles. PC/Mac.
 
  05 May 2018
If I may offer a suggestion. About halfway through, you have a problem with c4d applying linear colour workflow on your gradients which messes up how each lolly picks up a rainbow colour. You suggest there are two options, disable LWF in the project settings, or manually tweak the step effector's spline curve to try and fight against this change. Might I suggest option #3, fight fire with fire.

C4D is using a linear interpretation of the gradient's illumination, so as a simple solution, you can just manually whack it back into using a standard srgb 2.2 gamma curve. Enter the colorizer shader where your rainbow lives and you should see inside here is the mograph color shader. If you click the shader pulldown menu and select filter, this will place the color shader into the filter, effectively giving you a chance to change the greyscale gradient before it is fed into the colorizer. If you then open the filter shader and change the gamma from 1, to 2.2, this will perfectly bend the gradient back into shape..
__________________
Matthew O'Neill
www.3dfluff.com
 
  05 May 2018
Originally Posted by imashination: If I may offer a suggestion. About halfway through, you have a problem with c4d applying linear colour workflow on your gradients which messes up how each lolly picks up a rainbow colour. You suggest there are two options, disable LWF in the project settings, or manually tweak the step effector's spline curve to try and fight against this change. Might I suggest option #3, fight fire with fire.

C4D is using a linear interpretation of the gradient's illumination, so as a simple solution, you can just manually whack it back into using a standard srgb 2.2 gamma curve. Enter the colorizer shader where your rainbow lives and you should see inside here is the mograph color shader. If you click the shader pulldown menu and select filter, this will place the color shader into the filter, effectively giving you a chance to change the greyscale gradient before it is fed into the colorizer. If you then open the filter shader and change the gamma from 1, to 2.2, this will perfectly bend the gradient back into shape..
Hey Mash,

You're absolutely right that would be a more elegant solution, I often use gamma correction to solve this problem. It is a right royal pain in the butt when you need to add correction all through your materials to fix this.

I wish Maxon would simply give us a checkbox in all shaders so we can decide if it should be calculated in linear space or not. Even more so with things like colour channel vs bump where the same gradient is treated differently, we should be able to make these choices rather than them being hard coded.

Cheers
Tim
__________________
LUXX
3D Animation and Motion Graphics
helloluxx
Professional MoGraph & VFX Training

@helloluxx
facebook
 
  05 May 2018
Thanks much Tim!

Over the years I've gotten the shaders to do things I needed in a pinch--only to dissapear into the abyss which is my brain when I need to figure out the solution again later. Some aspects of mograph are a bit tucked away and not always obvious to work out.

Really appeciate you having shared this.
 
  05 May 2018
Originally Posted by JoelDubin: Thanks much Tim!

Over the years I've gotten the shaders to do things I needed in a pinch--only to dissapear into the abyss which is my brain when I need to figure out the solution again later. Some aspects of mograph are a bit tucked away and not always obvious to work out.

Really appeciate you having shared this.

You're pretty much a master and always willing to keep learning, thank you Joel.
__________________
LUXX
3D Animation and Motion Graphics
helloluxx
Professional MoGraph & VFX Training

@helloluxx
facebook
 
  05 May 2018
Surely the question is 'why was it mystified in the first place?'

My method for colorizing specific clones - make the cloner editable, write some Python.
 
  05 May 2018
Originally Posted by jed1949: Surely the question is 'why was it mystified in the first place?'

My method for colorizing specific clones - make the cloner editable, write some Python.

I actually think that it's not that confusing once you understand what's going on. Making the cloner editable is an odd choice as you lose the procedural nature of mograph, you could probably write your code in a python effector and leave the cloner setup as it is.

Using python might work for you, but the average user is not python savvy, and it's much easier to use the prebuild effectors and they'll be executed faster than python too.
__________________
LUXX
3D Animation and Motion Graphics
helloluxx
Professional MoGraph & VFX Training

@helloluxx
facebook
 
  05 May 2018
Tim - there should be no need for you to make a video demystifying color shaders. It should just work.

I watched the clip, but gave up at the bit about the color shader hidden in some sub-menu that tells some other color what color to send to something else. Why is something so simple set up like this ?
 
  05 May 2018
All you're doing is assigning a colour to an object, then telling a material where you would like that colour to be used (as transparency, reflection, luminance etc.) I don't see that it is difficult to do, it's just one of those things where if nobody shows you it is possible then you can easily not realise that it can be done. Much like the mograph weighting system, it is easy to do, it just isn't immediately obvious what it is for.

Think of it like the rear window heater button in a car. When you press it, it isn't immediately obvious what happened. But it is still very simple to use once someone explains it.
__________________
Matthew O'Neill
www.3dfluff.com

Last edited by imashination : 05 May 2018 at 04:14 PM.
 
  05 May 2018
Precisely. C4D is justly praised to be easy to use but there are some stuff that does not make sense.
 
  05 May 2018
jed1949, it is what it is.
You can stomp your foot in protest or take what Tim's gone out of his way to offer you and use it to get the job done.

Not every bit of software is going to be clear, easy to learn or even logical. Half the battle to be successful in this industry is to learn how to problem solve in the moment--whether you are up against complicated workflows or even buggy software to get through the day.
 
  05 May 2018
I didn't mean to start a war - my 1st comment was a bit tongue-in-cheek. It's a kind of running gag I have with my peers - here's my latest project, it's a ton of code, there's probably an effector that does all this but I just don't understand all that stuff. It's quicker to learn Python than to wade through Mograph etc.

I've been working on a procedural LED message board recently (you can enter your own message). I tried doing it with Mograph, but ended up using Python.

https://www.dropbox.com/s/6io5jikb1...lapham.zip?dl=1
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:31 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.