Shader problems

EDIT: Problem one and two are solved. Remaining is problem three. Just in case you get scared by all the text :wink:

So I was trying to apply the parallax mapping shader onto my little project. However it didn’t turn out well at all. After activating the script most of the areas at the edge that were not included in any shader went dark (if you got close to them they you could discern some textures).

Another problem I had was that the shader seemed to work as it wished. If you look at this screenshot:

  1. It decided to turn the walls red for no apparent reason while leaving parts of the wall that are sticking out to be correctly colored (thought not correctly shaded/colored but that could be due to normal map problems). Both the wall and the parts sticking out are part of the same mesh so they shouldn’t be differently colored. They were different objects joined together once upon a time though but they share the same textures and UV mappings basically.

  2. the pillars in the middle seem to be affected by the shader randomly. It will always correctly shade one of the pillars while leaving the others in a weird shade. However which one gets correctly shaded seems to be random and I don’t know why.

  3. I already mentioned this, but all areas without a shader goes dark but still has a texture (you can discern it).

The only part without a shader that still works correctly is the lower area and I can’t figure out why. It was created first though. So it would seem as if the engine goes through them first and shades them using the default method and then the bumpmap shader changes something that affects the rest of the geometry without them being included into the shader?

However I use the “WrapedTexture” shader too and it hasn’t caused me any problems.

Right, so I figured out the red walls doesn’t have anything to do with the actual shader since it turned red with this per pixel shader too. After looking around in the shader I figured it was the vertex color since when I turned it off in the shader it rendered as it should. However I don’t seem to be able to change the vertex color of the walls with the UV face select. They show up as white and changing it to wihte doesn’t help.

I don’t really need vertex color though since all my stuff is textured anyway but it would be nice to know how to fix it.

So problem 2 and 3 remain.

it’s easier to help if you post a blend file

Sadly I don’t think I can do that. It’s schoolwork and the last thing I want to do is to have to prove that I am… well… the same person as the one posting on the forums.

An update though:

  1. SOLVED. Apparently the walls had two materials. One with a red color and another with a white. So that mystery is now solved.

  2. SOLVED. The problem with the pillars was cause they were LINKED objects. I fixed it by unlinking them (U button).

  3. This problem is parallax shader specific though and I haven’t been able to solve it yet. Basically it seems like any object that gets drawn after the shader objects have been drawn will not be shaded correctly.

The parallax shader in question is found here:

It’s filed as “parallaxbumpmap_07.blend”.

Also I’ve been trying to type this out with as much details as possible in case someone bumps into similar problems in the future :slight_smile:

This is how it looks right now with a per pixel shader applied to the walls at the edge if anyone’s interested :stuck_out_tongue: