Digital Art Zone

 
     
Shader Builder Queries - One Problem, One Post
Posted: 20 April 2013 07:05 AM   [ Ignore ]
Active Member
Avatar
RankRank
Total Posts:  456
Joined  2007-09-01

Problem 1: How Do I Set Inputs To Predefined Values?

The attached DS4 screenshot from the DzAmbientLight shaderbuilder network shows a conditional block with two inputs set to predefined values, exp2 = 1 and falseexp = color(0,0,0).

The lower ‘equal’ block is one I added (New Block > Operations > Equal). I’m just trying to copy the upper block - doesn’t get much simpler than that, does it?

But there’s absolutely nothing I can find in the Macro Block Editor window of the original block with the constant values. I thought maybe initialization code, but the Global/Initialization Code tabs are empty.

I can’t directly edit the code in Shader Builder’s ‘Light Code’ window (I assume that’s generated when you save the network?)

Setting default values maybe? But the original ‘equal’ block has no default values set.

I’ve tried Shader Builder in DS3A and DS4.5Pro, exactly the same.

So how do I do it? Answer (post #3): right-click on the dot next to the input and select ‘Constant Value’from the pop-up list

Image Attachments
equal.jpg
 Signature 

Website: UnrealImperfect | Freebies: Renderosity, ShareCG | ‘Art’: DeviantArt | Blog: Blogger
(aka Pete Williams)

Profile
 
 
Posted: 21 April 2013 09:18 PM   [ Ignore ]   [ # 1 ]
Active Member
Avatar
RankRank
Total Posts:  456
Joined  2007-09-01

Problem 2: How Do I Set The Value Of A ‘User Variable’ Brick?

As if the first one wasn’t simple enough, I’m pulling my hair out now with an even simpler one! DS3A screamshot wink attached (exacly the same in DS4)

1) New Block > Variables > User Variable
2) Give it a name (nowhere on this dialogue to set the value)
3) Right click and hope there’s some way to set the value. No, nothing there…
4) So how do I actually set the darned value?
Answer (post #3): right-click on the dot next to the input and select ‘Constant Value’from the pop-up list

Image Attachments
Q2.png
 Signature 

Website: UnrealImperfect | Freebies: Renderosity, ShareCG | ‘Art’: DeviantArt | Blog: Blogger
(aka Pete Williams)

Profile
 
 
Posted: 22 April 2013 05:46 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13928
Joined  2003-10-09

I think you need to right-click on the [in] dot, then select teh first menu entry (Constant value) and enter your default there. But that’s just a quick poke, and may be wrong. That also seems to work on the Macro block, though it seems odd that it isn’t reflected in the Edit block dialogue.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 22 April 2013 10:40 AM   [ Ignore ]   [ # 3 ]
Active Member
Avatar
RankRank
Total Posts:  456
Joined  2007-09-01

Spot on Richard, works for both. I’d tried clicking, double-clicking, and right-clicking, but obviously I missed!

 Signature 

Website: UnrealImperfect | Freebies: Renderosity, ShareCG | ‘Art’: DeviantArt | Blog: Blogger
(aka Pete Williams)

Profile
 
 
Posted: 22 April 2013 09:50 PM   [ Ignore ]   [ # 4 ]
Active Member
Avatar
RankRank
Total Posts:  456
Joined  2007-09-01

Problem 3: How Can I Prevent ‘[WhateverParameter]’ Appearing On The End Users ‘Parameters’ Tab?

Most of the things that appear on the end users ‘Parameters’ tab after adding/applying a ShaderBuilder shader can be prevented from appearing on the end users ‘Parameters’ tab by either:
- Deleting them in the ‘Shader Builder: User Parameters’ pane (option is often greyed out)
- Setting them as ‘Hidden’ in the ‘Shader Builder: User Parameters’ pane (usually possible)

But some parameters that are clearly related to the shader don’t seem to appear anywhere in the network. For example, I’ve created a new light based on the DzPointLight that I never want shadows to be used with. So I don’t want anything about shadows to appear on the end user’s ‘Parameters’ tab. Attached image shows the network (left) and the ‘Parameters’ tab (right) after simply deleting blocks I didn’t want, adding a couple of new blocks, adding a couple of new user parameters, and rewiring a bit.

I can get rid of Shadow Strength/Softness/Bias/Samples/Width (and Falloff, which I don’t want either) using the methods above. But I’m still left with ‘Shadow Type’. I’ve already deleted all the blocks that dealt with shadows, so I assume that ‘Shadow Type’ is somehow internal to the ‘DzPointLight’ macro (renamed ‘DIY DzPointLight Edit’ in my network).

But is there any way to prevent the ‘Shadow Type’ appearing to the end user?

Image Attachments
UserParms.png
 Signature 

Website: UnrealImperfect | Freebies: Renderosity, ShareCG | ‘Art’: DeviantArt | Blog: Blogger
(aka Pete Williams)

Profile
 
 
Posted: 23 April 2013 08:01 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13928
Joined  2003-10-09

I’m not sure about lights, but there are certainly a few properties that belong to the surface and not the shader and so appear in the Surfaces pane even if there’s no valid shader applied - it may be that you are seeing an equivalent thing for lights.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile