Digital Art Zone

 
     
Fenric’s ERC
Posted: 26 October 2012 04:37 PM   [ Ignore ]
Active Member
Avatar
RankRank
Total Posts:  405
Joined  2008-08-29

At one time I had a PDF or two that explained how to actually do something with Fenric’s ERC—but I can’t find it and the forum search just found lots of hits in the commons so…

What I’m looking for is a pointer to PDF documentation or pointers on how to do what I want (or that I’m doing it wrong, or can’t be done, whatever).

At least, I think what I’m after can be done with ERC… what I want to do is add a slider—don’t really care where—that directly controls a value in a shader (actually, one slider that controls a value in multiple shaders). The description says you can drive any animatable parameter and the one I’m after controlling is in the shader room. One issue would be that the fenric menu is not available while in the shader room… But even outside of that I can’t make anything *happen* in the assembly room. To tie things together there has to be an interface *somewhere*.

 Signature 

Swamp Living Never Felt So Good

Profile
 
 
Posted: 27 October 2012 01:58 AM   [ Ignore ]   [ # 1 ]
Member
Rank
Total Posts:  30
Joined  2003-12-29

Hello Thoromyr,

I’ve set up a simple scene for the effect you are asking for:

I added a simple color shader, which has a value (0-100%) multiplied for the brightness.
This value (0-100%) is going to be controled by an ERC Slider from the object’s modifier panel.

I have added a simple vertex object sphere and added a Behaviours>Slider modifier.
By hitting the “Set” button i opened the window for the parameter to control by the slider.
I found the value (0-100%) under Shaders>“Shader name”>Shader>Color>Source 2>Value (Val) [re32],
selected it and hit “OK”.
I changed the minimum of the Slider to 0 and the maximum to 1.

The greyscale value of the shader (value (0-100%) ) is now controled by the slider.
unfortunately the result is only visible in render and not in the preview.

Here is the example scene
http://www.sharecg.com/v/65324/view/5/3D-Model/ERC-Slider-controls-shader

Image Attachments
ERC_Slider.jpg
Profile
 
 
Posted: 27 October 2012 02:12 AM   [ Ignore ]   [ # 2 ]
Active Member
RankRank
Total Posts:  433
Joined  2012-04-01

Faba has many excellent tutorials and examples about ERC here:
http://www.sharecg.com/pf/full_uploads.php?pf_user_name=fabaone

 Signature 

Everything about Carrara: http://www.carraracafe.com/

Profile
 
 
Posted: 27 October 2012 03:27 AM   [ Ignore ]   [ # 3 ]
Active Member
Avatar
RankRank
Total Posts:  405
Joined  2008-08-29

Faba: thanks for the specific information! I really appreciate it

3drendero: thanks for the link! Hopefully this time I won’t lose it

 Signature 

Swamp Living Never Felt So Good

Profile
 
 
Posted: 27 October 2012 04:24 AM   [ Ignore ]   [ # 4 ]
Active Member
Avatar
RankRank
Total Posts:  405
Joined  2008-08-29

What gave me some trouble following this was the double entry for Behaviors in the modifiers menu: I saw what I was looking for (Behaviors/Slider) easily enough in the picture, but in the app did not see it because I hit the first Behaviors entry. Something to get used to, but for the first time or so a point to brought up: ERC adds a second Behaviors menu with its options.

Thanks for the direct information, Faba, very helpful! Unfortunately it looks like the connections are only 1:1? I can’t select more than one parameter to drive. As far as I can tell this can only be done by adding the ERC to an object so that it is tied from the object being controlled to the controller (AFAICT that is what you did for your hand controller example).

Unfortunately, this isn’t possible in the case of shaders. There are many times I have encountered a situation where I have shaders that substantially differ, but have one or more parameters that I want to keep in sync. The Behaviors/Slider would be an excellent way of doing so if multi-select were possible to allow multiple targets.

Fenric (if you’re reading this…) If this is in fact a limitation of the ERC rather than a limitation of my understanding could the ERC be extended to allow it? I don’t care if I have to pay for an update to the extension, but the ability to drive multiple parameters simultaneously would be very helpful.

Of course, if it is an issue with my limited understanding I’d appreciate another pointer.

 Signature 

Swamp Living Never Felt So Good

Profile
 
 
Posted: 27 October 2012 05:47 AM   [ Ignore ]   [ # 5 ]
Member
Rank
Total Posts:  30
Joined  2003-12-29

Hello Thoromyr,

do you have a specific case?
There are so many different cases, its difficult to give a general advice without more information.

Profile
 
 
Posted: 27 October 2012 07:05 AM   [ Ignore ]   [ # 6 ]
Active Member
Avatar
RankRank
Total Posts:  405
Joined  2008-08-29
faba - 27 October 2012 05:47 AM

Hello Thoromyr,

do you have a specific case?
There are so many different cases, its difficult to give a general advice without more information.

Well, a trivial case would be controlling an alpha value in multiple shaders. That can be handled via reference shader, but the Carrara interface tries to prevent that by not allowing specifying a reference shader at the level. Cut and paste works, but the shader does not preview correctly. OTOH using ERC sets the value directly and the preview is correct.

Now, if you base the alpha channel on fake fresnel it gets more complicated. For example, one set of domains might use fake fresnel with a roll off of 33.33% and others at 50%. By mixing that with another setting (say Minimum with a value) there might be three controls: two for roll off and one for minimum. This can be satisfied by using two different reference shaders, but as noted the Carrara interface works against you and the more interrelated values shared between shaders and the more shaders involved the more awkward it is to use reference shaders. ERC provides an easier way to accomplish this—except for the apparent inability to have one slider control settings in multiple shaders.

That is more or less what I’m trying to do at present but managing shaders in general profits from this. For example, to have a slider that drives two values in a single shader, such as multiplying a color and an alpha value. Again, technically reference shaders can be used for this but the interface works against you—and most effects can be achieved multiple ways, eats a matter of ease and facility. Tim Paynes work with only the basic Carrara shaders is amazing, but it is easier to do things by using various add on, such as Fenric’s and Digital Carvers Guild.

I hope that clarifies things a bit.

 Signature 

Swamp Living Never Felt So Good

Profile
 
 
Posted: 27 October 2012 08:18 AM   [ Ignore ]   [ # 7 ]
Member
Rank
Total Posts:  30
Joined  2003-12-29

Hello Thoromyr,

I have set up a simple scene with both a reference shader and an ERC link to control the alpha of 3 shaders of an object
for comparison.

For me both setups do not update in the 3D view (both OGL and software), but as you mentioned the ERC shader updates at least
in the shaders tab and the shader room.

For the ERC link I have linked the alpha of the first shader to an ERC slider and the alphas of the other shader via a regular ERC modifier.
I have animated both with an oscillate tweener to make the change more visible

http://www.sharecg.com/v/65363/view/5/3D-Model/ERC-controlled-Alpha-Value

Image Attachments
ERC_Shader.jpgERC_Shader.gif
Profile
 
 
Posted: 28 October 2012 07:43 AM   [ Ignore ]   [ # 8 ]
Active Member
Avatar
RankRank
Total Posts:  405
Joined  2008-08-29

Thanks for taking the time to set up the scene and share. I appreciate it.

 Signature 

Swamp Living Never Felt So Good

Profile
 
 
Posted: 28 October 2012 09:20 AM   [ Ignore ]   [ # 9 ]
Member
Rank
Total Posts:  30
Joined  2003-12-29

You’re welcome. I am glad I was able to help out.
Feel free to ask if you have more questions.

Profile