Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by 3run. 09/19/19 09:42
Any chance of PBR materials with A8?
by Quad. 09/18/19 18:00
Sierra Chart Plugin
by AndrewAMD. 09/18/19 14:03
3d model editor
by karmacomposer. 09/18/19 13:18
Can MED export to FBX?
by karmacomposer. 09/18/19 13:07
I cannot get the A8 game engine to show anything
by karmacomposer. 09/18/19 12:38
Script, Start Trading Immediately
by jcl. 09/18/19 08:38
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
12 registered members (Ayumi, 3run, AndrewAMD, Quad, saulius, 20BN, kvm, MatPed, 3 invisible), 613 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Dark_Light, oxygenjoe, web20tpo, tarekhazem, Juanjo
18290 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,246
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,246
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: 686
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 686
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,246
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,246
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: 686
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 686
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: 686
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 686
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: 686
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 686
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