View Full Version : Layers
Zafar Iqbal
05-06-2008, 11:06 AM
Just when I thought I was starting to get a hang of Render Tree, it turns 180 on me.
I have a branch that was originally connected directly into phong diffuse and ambient input. I then moved them into a layer, but the render looks different - actually, my branch isn't coming through at all.
I'm not using the mask connection and have tried alpha, invert, different blending modes etc - if I disconnect the branch, then there is a tonal difference (not even the right tone though), but none of the textures are showing up.
What am I missing here?
jamal
05-06-2008, 12:00 PM
Hi Zafar,
It's hard to say without seeing your render tree/Texture Layer Editor, but you should check that the new layer is added to the diffuse and ambient ports of the Phong, and that the layer weight is set to 1.00.
Also, if your texture has an alpha channel that wasn't used in the render-tree-only setup, make sure to set the Ignore Alpha option ion the TLE.
Hope that helps,
J
Zafar Iqbal
05-06-2008, 01:50 PM
I can attach some screenies tomorrow - anything in particular I should get the grabs of?
The branch that originally was feeding the diffuse and ambient channels, produces texture and color variations - I verified that by plugging the branch directly into the material node.
I connected the branch to both ambient and diffuse layers, using the layers color input.
I tried with and without alpha - using alpha produces black renders.
The layer wasn't muted - I prolly went through a lot of the things in layers/material ppg, but still not thing - I either get black material (only when using alpha), or I get something that doesn't contain texture, but is affected a lot by my base diffuse/ambient color - no matter how drastically I change the colors from anywhere in the branch, the test renders don't show any difference - not the slightest.
I have other layers, none feeding the diffuse and ambient though, and I've tried with and without (muting them) - the other layers works fine - just not this one that doesn't :|
I've moved the layer up and down the layer stack - nothing.
Edit: Weight was at 1.0, but tried with other values as well as different blending modes - I kept it at Over and weight at 1.0 most of the time.
jamal
05-06-2008, 02:09 PM
Grabs of the render tree, the TLE, and maybe the object that you're texturing would be helpful. Since the problem is happening when you plug the branch into a layer, you could maybe send a comparison of the branch in a layer vs. plugged directly into ambient & diffuse.
J
Zafar Iqbal
05-07-2008, 09:08 AM
I sent a simplified scene to Jamal - I tried resolving the problem myself today, but ended by giving up. Anyone who might be interested in having a look can grab the file from here: http://www.megaupload.com/?d=ZI9PJMAD
I then moved on to another material and after a while got stuck again - I think the problem is related:
I'm feeding a layer mask channel with a branch consisting of two procedurals, where I have one 3D Clouds feeding the frequency multiplier input of another 3D Cloud texture. When connecting to the mask, I got unexpected results - I get complimentary "shading" (the complimentary color appears where it should be dark/no color). This got me thinking, and I started looking for a "normalizer" node.
I ended up with Color Smooth Shader, which seems to be doing what I'm looking for - question:
Is my finding correct?
I'm certain that it is the 3D Cloud node driving the frequency multiplier being the cause - but why? and is there a simple and fast way to very whether an output is "compatible"?
jamal
05-07-2008, 02:57 PM
Hi Zafar,
Looking at your scene, the old render tree is using the better approach, IMO, since you're creating a base layer that has your mixed colors already. Here are a couple of things you can try:
Turn the spotlight intensity way down. You're using Final Gathering and your environment sphere is acting like a huge light-bouncing object. Part of the reason you're not seeing color variation is that the bright lighting is washing out the detail. For FG to work, you need a light in the scene, but it can have practically no intensity if you want purely FG lighting.
Get rid of the environment sphere altogether. Instead use an environment shader at the pass level. You can drive it using the same texture you had mapped to your sphere, and even have the texture show up in the background. The environment map uses Final Gathering to create image-based lighting.
Don't do your bump mapping on the Phong shader. Instead, use a bump map generator shader, and plug that into the Bump Map port on the material node. You can use the the second fractal shader as an input for the bumpmap generator, and then use your mixer shader to mix sandy colors. This will give you a better bump map, since the input will be grayscale.Let me know if any of that helps.
J
Zafar Iqbal
05-08-2008, 02:41 AM
Thanks for your reply, Jamal - I'm on my way to work so a simple question for now: Why mixers and not layers? I was actually afraid you would say that, but my current impression is that mixers seems to be more awkward and time consuming to work with, compared to layers.
Bump mapping is.. confusing - I keep forgetting the approaches, but why even use the shader input then? I noticed yesterday that my bump would show up when connecting to the material, but it didn't make sense to me why it would work with the material, and not while being plugged into the phong shader.
Zafar Iqbal
05-08-2008, 01:02 PM
Even though the lighting is harsh, my materials should still look the same but they don't.
Plugging the mixers directly into the Material node shows that both materials look exactly the same. But using base input vs. layer isn't.
If I create a brand new set of materials and go with just a simple color change - one done the traditional way, and then same color on the other material, but as a layer - set to 1.0 weighting of cause, produces exact renders - as I would expect them to. So why not with the material branch I created?
This whole layer thing started when I wanted to alter my bump mapping - I need to have it go from bump map to no bump map, depending on a gray scale image. I've been feeding a mixer with the branch producing the bump map, while leaving the other input alone (thinking that a RGB value would procude a flat bump map), and then using the image for the weight - but that produces flat shading on the areas where no bump map should occur. It seems that the RBG value in the mixer is ignored - however, if I feed that input, for instance a copy of the same branch, and turn down the bump effect to 0, or turn off bump mapping all together, then it works - huh?!
The Render Tree may very well be flexible, but the learning curve is darn steep... imho.
jamal
05-08-2008, 03:43 PM
Hi Zafar,
The mixer you're using in your materials has the Alpha value for each color set to 0. The material where the mixer connects directly to the Phong is not taking the Alpha into account. The material where the mixer drives the layer is, so the entire branch is not showing up.
To get the new material to look like the old, either set the Alpha of the mixer colors to 1 or set the layer to ignore alpha.
For a solid introduction to bump mapping, try Kim Aldis's video here:
http://kim-aldis.co.uk/drupal-6.1/node/36
J
Zafar Iqbal
05-09-2008, 11:26 AM
Right.. I got it all working now - haven't noticed any other place outside layers, where color alphas have any effect (not that I have been too much around) - so didn't think much about that :o
The bump masking was being ignored (not fully, as it does mix) because I had to apply bump map in a way I would think of as being the wrong method. Introducing a 2colormixer for bump mapping, means 3 additional converters, and I was thinking all along that if it can be connected directly, then it must be the most clean and proper approach... but.. wrong again :|
Thanks for your help, Jamal.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.