Shader Builder Queries - One Problem, One Post

3dcheapskate3dcheapskate Posts: 2,719

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

equal.jpg
650 x 582 - 84K
Post edited by 3dcheapskate on

Comments

  • 3dcheapskate3dcheapskate Posts: 2,719
    edited April 2013

    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 ;-) 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

    Q2.png
    547 x 559 - 50K
    Post edited by 3dcheapskate on
  • Richard HaseltineRichard Haseltine Posts: 100,905
    edited April 2013

    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.

    Post edited by Richard Haseltine on
  • 3dcheapskate3dcheapskate Posts: 2,719
    edited December 1969

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

  • 3dcheapskate3dcheapskate Posts: 2,719
    edited April 2013

    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?

    UserParms.png
    978 x 744 - 87K
    Post edited by 3dcheapskate on
  • Richard HaseltineRichard Haseltine Posts: 100,905
    edited December 1969

    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.

Sign In or Register to comment.