Digital Art Zone

 
   
2 of 4
2
Was there ever a non-beta Shader Mixer for DS3A? [Reflection problems resolved]
Posted: 17 September 2012 02:51 PM   [ Ignore ]   [ # 16 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  17765
Joined  2003-10-09

UV Set and smoothing are universal surface settings, as far as I know they come before the actual shader applied.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 17 September 2012 10:38 PM   [ Ignore ]   [ # 17 ]
Active Member
Avatar
RankRank
Total Posts:  679
Joined  2007-09-01

Thanks Rob/Richard for the latest answers - I’m running out of questions here! But I’ll be back - just need to play a bit more to find some new questions.

I’m still cherry-picking the Shader Mixer links from Pen’s thread that relate to Material shaders (Camera/Light shaders are with Shader Builder on my ‘for later’ list). There’s a lot of helpful stuff there. The older stuff is obviously written about the early DS3A Shader Mixer Beta, but it’s easy enough to apply it to the DS4.5 version.

And I’m beginning to like DS4.5 too…

 Signature 

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

Profile
 
 
Posted: 23 September 2012 09:09 AM   [ Ignore ]   [ # 18 ]
Active Member
Avatar
RankRank
Total Posts:  679
Joined  2007-09-01
rbtwhiz - 17 September 2012 12:14 AM

...By default, the group a property is in (i.e. its path) is determined by the title of the brick the property belongs to. Unless you specifically customize individual property paths, you can change the group a property is in by changing the title of the brick (option menu, in the top right corner of the brick)...

Somebody please tell me I’m not going crazy. This simply doesn’t work for me (most of the time*) !

I can change the brick title no problem, but the changed title is not reflected in Shader Mixer’s ‘Properties’ tab, nor DS4.5s ‘Surfaces’ tab, which both use the brick’s original name. I’ve got it reproducible (more-or-less*) with this minimal sequence, but don’t think I should file a bug report unless somebody else can reproduce it too…

1) Open DS4.5, Create > Primitive > Sphere, select the sphere, and select it’s ‘Default’ material on the ‘Surfaces’ tab.
2) Window > Panes > Shader Mixer, then File > New Shader > Material > Accept
3) Insert > Bricks > Functions > Textures > ImageMap
4) Change Title, rename it and Accept.
5) Connect Image Color O/P to Diffuse Color I/P of DS Default Material and hit ‘Apply’

After step (4) the new brick ‘Image Map (3)’ has been renamed ‘Stencil’ as expected, but it’s still ‘Image Map (3)’ in Shader Mixer’s ‘Properties’ tab.
After step (5) the sphere’s default material on the ‘Surfaces’ tab consists of these groups:
UV Maps, Smoothing, Diffuse, Specular, Ambient, Opacity, Image Map (3)


*N.B. I was about to post this a couple of hours ago, and ran through the procedure one last time just to check - the darn thing worked properly! So I thought it must be finger trouble. All seemed fine for an hour or so, then it started playing up again. I’ve just run through th e above sequence and the problem definitely occurred this time.

 

 Signature 

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

Profile
 
 
Posted: 23 September 2012 09:11 AM   [ Ignore ]   [ # 19 ]
Active Member
Avatar
RankRank
Total Posts:  679
Joined  2007-09-01

Just repeated the sequence - same problem. About to reboot and try again from a clean start…

Rebooting didn’t help - same problem.

For info: DS 4.5.0.114 Pro (64 bit version) - checked the change log and it doesn’t appear to be a known bug that’s fixed in a later release. Can’t find a list of known unfixed bugs anywhere.


Edit (29 Sep ‘12): Still got this problem. However, since the ‘path’ for a parameter can be edited (by double-clicking on the parameter name as Rob explained) that allows me to get round the issue. Not a solution, but a workaround.

I’ve started a new thread Simple Material Mixing With DS4.5 Shader Mixer - Advice Please? thread over in the DAZ Studio Discussion forum focussed on my first Shader Mixer project.

Big thanks to Pen, Richard and Rob for the help getting starting with this.

 Signature 

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

Profile
 
 
Posted: 06 January 2015 04:07 AM   [ Ignore ]   [ # 20 ]
Active Member
Avatar
RankRank
Total Posts:  679
Joined  2007-09-01

I’ve just come across a raytraced reflection problem with my old ShaderMixer shader that came out of this thread.  I recalled a comment from Rob about reflections not working and tracked it down to post 10 on this current thread, and that’s why I’m posting back here.

Prompted by a query at post #3 of “Simple Dual Material Shader (DS3Free to DS4Pro) [Beta]” I did a few quick tests staring at post #21 of “S.E. Asian Shields (‘Smart+’ Props for Poser and DAZ Studio) [DS Shader Uploaded]” (post #23 is the first new test, but post #21 puts it into context).

The tests I just did today were using DS 4.6.1.17 Pro (64 bit). I’d have thought the bug Rob mentioned would’ve been cleared up long ago, so I’m assuming that this is a different issue. I think I really need to do a simplified ‘reflections only’ version of my ShaderMixer shader to pinpoint exactly where the problem is (and it may well be something stupid I did in the shader!).

But if anybody has any comments/observations/suggestions while I’m digging about under the hood and ripping out the bits I don’t need…  :D

 Signature 

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

Profile
 
 
Posted: 07 January 2015 03:55 AM   [ Ignore ]   [ # 21 ]
Active Member
Avatar
RankRank
Total Posts:  679
Joined  2007-09-01

Okay, here’s the stripped-down ShaderMixer network only ddriving the Reflection Color, and a few simple reflection tests.  (N.B. tests done in DS4.6.1.17 Pro 64bit)

The reults are distinctly different from similar tests with a basic DS material (post 23 and 24 of mty “S.E.Asian Shields” thread), where the reflection (mapped or raytraced) still shows up clearly with a black diffuse colour.

I made a simple scene with this shader applied to a plane and a sphere, and I have three coloured rods to give something to reflect. I plugged a test grid into the reflection map.

Then I set both sphere and plane diffuse colours to white, and did test renders with the ‘Mapped Or Raytraced’ slider at 0(Mapped), 0.5 (50-50) and 1.0 (Raytraced). That’s the second image.

Then I set diffuse colour of plane and sphere to grey and repeated (third image)

And then I set diffuse color of plane and sphere to black and repeated (fourth image)

Out of interest I then tried making direct connections in the shader to cut all my intermediate bricks. First I connected the node marked MAPPED direct to the node marked REFLECTION, applied the shader to both sphere and plane, and did test renders with both sphere/plane diffuse colors to white, grey, and black in turn. The results were exactly the same as the ones I’d already got with ‘Mapped Or Raytraced’ set to 0.0.

I then connected TRACED to REFLECTION and repeated. The results were exactly the same as he ones I’d already got with ‘Mapped Or Raytraced’ set to 1.0.

So I conclude that it’s something in the way ShaderMixer is doing things that causes the reflections to vanish when the diffuse color is black.

(Edit: N.B. I included a sphere because a flat plane won’t show environment mapped reflections very well. I think the surface normal is used to look up a pixel value (azimuth/elevation) on the map, and since the normal ois exactly the same at every point on a plane it’ll be looking up exactly the same pixel on the map. I think. Edit 2: Scrap that first edit, it’s a load of rubbish! it’s nothing to do with normals, it’s the viewing/reflection angles of course. Post 24 of the S.E.Asian shields thread shows how it should look! )

Image Attachments
SimplifiedSMreflect.pngWhite.jpgGrey.jpgBlack.jpg
 Signature 

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

Profile
 
 
Posted: 07 January 2015 08:37 AM   [ Ignore ]   [ # 22 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  17765
Joined  2003-10-09

Given how the middle set behaves it looks as if the diffuse and reflection colour are being multiplied.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 07 January 2015 09:25 PM   [ Ignore ]   [ # 23 ]
Active Member
Avatar
RankRank
Total Posts:  679
Joined  2007-09-01
Richard Haseltine - 07 January 2015 08:37 AM

Given how the middle set behaves it looks as if the diffuse and reflection colour are being multiplied.

That would definitely fit the symptoms I’m seeing (N.B. tests done in DS4.6.1.17 Pro 64bit), so it looks as if we have a concise definition of one problem

ShaderMixer Reflection Problem 1: It looks as if the reflection color is being multiplied by the diffuse color, which means that reflections vanish for diffuse colours. (This applies to both mapped and ray-traced reflections)

 Signature 

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

Profile
 
 
Posted: 07 January 2015 09:33 PM   [ Ignore ]   [ # 24 ]
Active Member
Avatar
RankRank
Total Posts:  679
Joined  2007-09-01

But there’s also a completely separate problem with environment-mapped reflections (N.B. tests done in DS4.6.1.17 Pro 64bit)

First image is the SM shader - it doesn’t get much more simple than that.

Second image is a comparison of this shader applied to both plane and sphere (left) versus the same test grid applied as a reflection map to both plane and sphere via the default material you get when load the sphere/plane primitives (right).

Image Attachments
SM-mapped.pngcomparison.jpg
 Signature 

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

Profile
 
 
Posted: 07 January 2015 09:51 PM   [ Ignore ]   [ # 25 ]
Active Member
Avatar
RankRank
Total Posts:  679
Joined  2007-09-01

Could somebody please independently confirm these two problems - until I get independent verification I have to suspect that I’m doing something stupid !

If somebody else can confirm (ideally with the latest version of DS) then I’ll raise them as bug reports.

 Signature 

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

Profile
 
 
Posted: 09 January 2015 06:18 AM   [ Ignore ]   [ # 26 ]
Active Member
Avatar
RankRank
Total Posts:  957
Joined  2011-06-14

I confirm on what you observe.
When you apply a refl map on default material reflection, render you got one render (1). You send to shader mixer and send back to scene : you got another render (2). The types of renders are the one you saw.
If you reset shader via shader builder shortcut : you come back to the first render (1).
I’m astonished I have never seen this before.

Image Attachments
1.png2.png
 Signature 

During the year of abundance, the grass was so high that the cows had to jump to graze on.
kadix - V3Digitimes
My Store at DAZ : http://www.daz3d.com/v3digitimes
My Deviant Gallery : http://rankerx.deviantart.com/

Profile
 
 
Posted: 09 January 2015 08:10 AM   [ Ignore ]   [ # 27 ]
Active Member
Avatar
RankRank
Total Posts:  679
Joined  2007-09-01

Thanks, bug report posted on that one - details as below, reported against DS4.6 Pro 64bit/Windows 7 64bit. (Still waiting for somebody to confirm the separate black diffuse problem):

#184174 ShaderMixer Bug: Environment Mapped Reflections Don’t Work Properly

ShaderMixer Bug: Environment Mapped Reflections Don’t Work Properly

A ‘Reflection Map’ brick plugged into the ‘Reflection Color’ input of the ‘DS Default Material’ root brick does not behave as you would expect. I.e. it behaves very differently from a Reflection Map applied to a standard DS material.

Details in post 24 of “Was there ever a non-beta Shader Mixer for DS3A?” thread here:

  http://www.daz3d.com/forums/viewthread/7582/P15/#744045

Independent confirmation of the bug via a slightly different method in post 26 of the same thread here:

  http://www.daz3d.com/forums/viewthread/7582/P15/#744715

Kadix - 09 January 2015 06:18 AM

...I’m astonished I have never seen this before.

I’m not so surprised. I was looking into ShaderMixer reflections in some detail two years ago and never nailed it down - I just had a feeling that something wasn’t quite right, and left it at that. And it’s taken a fair bit of digging over the past few days to get to the bottom of it ! (You have to be a bit crazy to dig this deep… LOL )

 Signature 

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

Profile
 
 
Posted: 09 January 2015 10:42 AM   [ Ignore ]   [ # 28 ]
Member
Rank
Total Posts:  161
Joined  2012-09-03

...

Kadix - 09 January 2015 06:18 AM

...I’m astonished I have never seen this before.

I’m not so surprised. I was looking into ShaderMixer reflections in some detail two years ago and never nailed it down - I just had a feeling that something wasn’t quite right, and left it at that. And it’s taken a fair bit of digging over the past few days to get to the bottom of it ! (You have to be a bit crazy to dig this deep… LOL )

Well, there is only an environment map plugged into the reflection color. There is no reflection happening at all (just giving the environment map the title “Reflection Map” like DS4.6 appearently does is not enough). This is basically a static texture on the surface. It should include a reflections somewhere something like this:

Image Attachments
reflect.png
Profile
 
 
Posted: 09 January 2015 10:53 AM   [ Ignore ]   [ # 29 ]
Active Member
Avatar
RankRank
Total Posts:  957
Joined  2011-06-14

Once again I’m astonished…. (astonishment day for me).
Indeed when you have a look at the shader builder function dzenvironment, there is inside the code line :
vector vecR = normalize( vtransform( “world”, %2% ) );
This means that the space change is normally already taken into account.
I was sure that this function was called in environment map in shader mixer, which makes the difference regarding the general 2D UV maps. Furthermore regarding the pattern of the reflection out of shader mixer using this simple brick, it seems to be coherent regarding what we could expect. I set up already materials without connecting the normal node, and the image produced on a sphere was the image of the environment map (generally representing a 360 landscape or interior). And for me this was enough. But I’ll have a look at your brick network as soon as I find the time.

OK I edit, I took the time to have a look.
I set on a sphere a reflection, either adding the change to world space, or not adding it in front of the environment map brick.
This map, I know it very well, I rendered it myself in another software, I know how it should behave. It is an interior environment rendered as environment map on a 360 degree using vue.
Normally, when I render from EXACTLY the TOP VIEW, I should see the roof and very partially the walls on the side, but in no way the floor (which can only be reflected on the bottom part of the sphere). So I made the two renders :
When I render (exactly from top view) with the world change connected, I see the floor on the sides, which is not physically correct since it is somehow below the “horizon line”, and I’m supposed to see only what is above. In now way I’m supposed to reflect what’s behind the sphere.
When I render with the world change disconnected, I see what I am supposed to see : the roof centered and on the sides a tiny part of the wall.

As a conclusion I really have the impression that the additional world change connected to environment map brick is not necessary.

Image Attachments
connectedFromAbove.pngDisconnectedFromAbove.png
 Signature 

During the year of abundance, the grass was so high that the cows had to jump to graze on.
kadix - V3Digitimes
My Store at DAZ : http://www.daz3d.com/v3digitimes
My Deviant Gallery : http://rankerx.deviantart.com/

Profile
 
 
Posted: 09 January 2015 11:16 AM   [ Ignore ]   [ # 30 ]
Active Member
Avatar
RankRank
Total Posts:  679
Joined  2007-09-01
millighost - 09 January 2015 10:42 AM

...

Kadix - 09 January 2015 06:18 AM

...I’m astonished I have never seen this before.

I’m not so surprised. I was looking into ShaderMixer reflections in some detail two years ago and never nailed it down - I just had a feeling that something wasn’t quite right, and left it at that. And it’s taken a fair bit of digging over the past few days to get to the bottom of it ! (You have to be a bit crazy to dig this deep… LOL )

Well, there is only an environment map plugged into the reflection color. There is no reflection happening at all (just giving the environment map the title “Reflection Map” like DS4.6 appearently does is not enough). This is basically a static texture on the surface. It should include a reflections somewhere something like this:

That would explain why the environment mapped reflections aren’t working. And I did say that…

3dcheapskate - 07 January 2015 09:51 PM

...until I get independent verification I have to suspect that I’m doing something stupid !...

...so it looks like I was right to include that get-out clause (at least for the environment mapped reflection part of it) ! In the original shader that this came from I manually renamed the environment map as ‘Reflection Map’. Clearly I forgot to (or wasn’t aware that I had to) add the brick that actually does the reflection !

However, I think the other problem, the black diffuse, is a genuine problem. Unless of course I’ve made a stupid mistake there too…

 Signature 

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

Profile
 
 
   
2 of 4
2