0 registered members (),
1,089
guests, and 10
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Specular Shader
[Re: Dooley]
#477174
05/27/19 14:46
05/27/19 14:46
|
Joined: Jun 2007
Posts: 1,337 Hiporope and its pain
txesmi
Serious User
|
Serious User
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
|
@Dooley Sorry, I didn't remember 'technique' is an A8 feature. Here you go a version with each shader in a different file. key_1 -> load 3dgs standard shaders + 'specBumpTrans' key_2 -> load my shaders
|
|
|
Re: Specular Shader
[Re: Dooley]
#477284
06/12/19 19:47
06/12/19 19:47
|
Joined: Jan 2006
Posts: 168 Germany, Hannover
DexLoomer
Member
|
Member
Joined: Jan 2006
Posts: 168
Germany, Hannover
|
Hi Guys, In the last few days I have thought again about the comment of 'Dooley': @DexLoomer I am curious why you are using this shader instead of the standard mtl_specBump shader. On solid objects like boxes, it does not really serve its purpose.
So, the mtl_specBump does include a specular map, but it is in the alpha channel of the color map.
I asked for a code from 'txesmi' for a shader combination of NomalMap and SpecularMap, because for me the 3DGS standard mtl_secBump shader does not show the SpecularMap. To test this again, I created a file with normalMap and specularMap (..and put it online as a link) with the same result: LinkNormalMap works, but no SpecularMap is visible! Maybe someone can tell me why the SpecularMap is not displayed?
A8-Com-v 8.47.1
|
|
|
Re: Specular Shader
[Re: DexLoomer]
#477300
06/14/19 06:14
06/14/19 06:14
|
Joined: May 2005
Posts: 868 Chicago, IL
Dooley
OP
User
|
OP
User
Joined: May 2005
Posts: 868
Chicago, IL
|
I have checked it out. It actually is working, but maybe it's not noticeable with all those different colored lights. Here I took out the dynamic lights, and the base tile (which was not compiling properly for me) so it is just the sun and the box. You can see the shiny area on the edge of the box, but the triangular areas are not shiny. You can also see the word "test" as it appears in the alpha channel of the image. So you do have it set up correctly. But I think either it can't handle the number of lights you are using, or maybe the specular material is set up differently in yours. The mtl_specBump is in the mtlFX.c file, and mine looks like this:
MATERIAL* mtl_specBump =
{
effect = "specBump.fx";
specular_blue = 255;
specular_green = 255;
specular_red = 255;
power = 10;
flags = PASS_SOLID;
}
I might have changed mine, but it should be similar to this anyway.
Last edited by Dooley; 06/14/19 06:15.
|
|
|
Re: Specular Shader
[Re: Dooley]
#477309
06/14/19 18:05
06/14/19 18:05
|
Joined: Jan 2006
Posts: 168 Germany, Hannover
DexLoomer
Member
|
Member
Joined: Jan 2006
Posts: 168
Germany, Hannover
|
Hi Dooley, thanks for the answer. But unfortunately it is different with me. I have as you have written cleared the dynamic lights. In addition, the bottom plate deleted. In the mtlFX.c the values are used as in your example. And yet, the box is apparently rendered without ScularMap: I have also made various settings with the sun values. But all with the same result.
A8-Com-v 8.47.1
|
|
|
Re: Specular Shader
[Re: Dooley]
#477314
06/14/19 20:33
06/14/19 20:33
|
Joined: May 2005
Posts: 868 Chicago, IL
Dooley
OP
User
|
OP
User
Joined: May 2005
Posts: 868
Chicago, IL
|
No, I can see the specular happening there. It's not very obvious, but it is definitely shinier than the triangular sections in the middle.
Okay, I forgot to mention - I changed the sun color to 255,255,255 Also, you may want to increase the "power" of your mtl_specBump material. You can modify it in mtlFX.c, or create a new material, like the one I posted in your own script. Just make sure to assign the new material to that object in WED.
The manual mentions that power can be set between 1 and 10, but I think it can go up to 100 and it gives more shininess as you go higher.
|
|
|
Re: Specular Shader
[Re: Dooley]
#477317
06/14/19 21:50
06/14/19 21:50
|
Joined: Jan 2006
Posts: 168 Germany, Hannover
DexLoomer
Member
|
Member
Joined: Jan 2006
Posts: 168
Germany, Hannover
|
Ok, that's right! I have now also made the NormalMap monochrome and the SpecularMap is visible. However, this is much weaker than on your last screenshot. Although I set all the values you said high. I have no clue whats the cause of this..
A8-Com-v 8.47.1
|
|
|
|