Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, VoroneTZ), 831 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
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 Offline
Serious User
txesmi  Offline
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: txesmi] #477175
05/27/19 16:14
05/27/19 16:14
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
@txesmi You are a nice and helpful person. I did not expect you to actually write the shader I was imagining, but you did it anyway. I really do appreciate that.

Please let me know if I can return the favor some time.

Re: Specular Shader [Re: Dooley] #477176
05/27/19 16:35
05/27/19 16:35
Joined: Jan 2006
Posts: 168
Germany, Hannover
DexLoomer Offline
Member
DexLoomer  Offline
Member

Joined: Jan 2006
Posts: 168
Germany, Hannover
Hi txesmi, i can only join Dooley with my thanks. Maybe you need a return.


A8-Com-v 8.47.1
Re: Specular Shader [Re: DexLoomer] #477179
05/27/19 19:56
05/27/19 19:56
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
You are welcome. Don't worry.

Re: Specular Shader [Re: Dooley] #477284
06/12/19 19:47
06/12/19 19:47
Joined: Jan 2006
Posts: 168
Germany, Hannover
DexLoomer Offline
Member
DexLoomer  Offline
Member

Joined: Jan 2006
Posts: 168
Germany, Hannover
Hi Guys,
In the last few days I have thought again about the comment of 'Dooley':

Quote
@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:

[Linked Image]

Link

NormalMap 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 Offline OP
User
Dooley  Offline 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.

[Linked Image]

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:

Code
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 Offline
Member
DexLoomer  Offline
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:

[Linked Image]

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 Offline OP
User
Dooley  Offline 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 Offline
Member
DexLoomer  Offline
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
Re: Specular Shader [Re: Dooley] #477319
06/14/19 23:51
06/14/19 23:51
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
I'm using A7 engine, maybe the material works differently in A8?

Page 3 of 4 1 2 3 4

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1