Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Dico), 16,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to use normal map shader with meshes? #270376
06/07/09 23:38
06/07/09 23:38
Joined: Dec 2005
Posts: 27
Oklahoma, USA
LukasPanic Offline OP
Newbie
LukasPanic  Offline OP
Newbie

Joined: Dec 2005
Posts: 27
Oklahoma, USA
There is a lot of information out there about shaders and especially about applying shaders to level blocks, like in the manual. However I have trouble finding a step by step guide in plain english on how to apply a normal map shader to a mesh in MED.

Can anyone give me a little help in newbie english please?

Much appreciated!


I am a german living in the US so you got the choice to talk to me in english or german. No latin please :P
Re: How to use normal map shader with meshes? [Re: LukasPanic] #270795
06/10/09 03:17
06/10/09 03:17
Joined: Dec 2005
Posts: 27
Oklahoma, USA
LukasPanic Offline OP
Newbie
LukasPanic  Offline OP
Newbie

Joined: Dec 2005
Posts: 27
Oklahoma, USA
I found a tutorial on the wiki which left me with more questions than answers and an error message from the engine. Any other tutorials?


I am a german living in the US so you got the choice to talk to me in english or german. No latin please :P
Re: How to use normal map shader with meshes? [Re: LukasPanic] #270823
06/10/09 07:39
06/10/09 07:39
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
okay, actually it's easier then applying shaders to level blocks...

first thing, you do not do it in MED.

i assume you are usingl lite-c.

there are options, either you find shaders from wiki/forum/au/aum or use included shaders.

to use shaders you find:
copy/download shader code and save it as a .fx file
then define a material:

MATERIAL* my_new_material = {
effect="my_shader_file.fx";
}

in action of your entity say it is

action my_action(){
my.material = my_new_material; // add this line, with the name of your material
}

and you are ready to go. (though some advanced shader may need some inital setup or skills to be set)

---------------------------------------------------
for using the shaders that ships with the engine:

include mtlfx.c in your code

#include <mtlFx.c>

after adding that line, if you open WED and try to add an action to an entity you will see there are lots of actions starting with fx_ , they are predefined actions for shader, if your entites are static and wont need any further action, use these. but if you need an action that you wrote to be attached to entity and want use shader at same time,
just call the shader action in your entites action:

action my_ents_action(){
fx_shader_name();
//rest of your action goes here
}

you can find shader names in mtlfx.c or in manual or you can check them from wed.


3333333333
Re: How to use normal map shader with meshes? [Re: Quad] #270873
06/10/09 11:04
06/10/09 11:04
Joined: May 2009
Posts: 258
Chicago
J
Jaeger Offline
Member
Jaeger  Offline
Member
J

Joined: May 2009
Posts: 258
Chicago
This can teach you how to actually make custom normal maps to go with your models. It's not as hard as you think. You just need Photoshop, and to download the NVidia normal map converter plug-in, and the link to get it is provided. It's free btw. smile You'll love it. I do!

http://www.moddb.com/tutorials/building-essential-texture-maps-for-material-shaders-using-photoshop

Re: How to use normal map shader with meshes? [Re: Jaeger] #271196
06/11/09 18:00
06/11/09 18:00
Joined: Dec 2005
Posts: 27
Oklahoma, USA
LukasPanic Offline OP
Newbie
LukasPanic  Offline OP
Newbie

Joined: Dec 2005
Posts: 27
Oklahoma, USA
Thanks, that helps. I played around with shaders for level blocks and that works. It seems like it is not too much different for entities. I will try it tonight.

I installed the nvidia tools for photoshop, makes creating normal maps a breeze.

Thanks for the link Jaeger, looks like good in depth information, I'll check it out more tonight when I'm home.


I am a german living in the US so you got the choice to talk to me in english or german. No latin please :P

Moderated by  Blink, Hummel, Superku 

Gamestudio download | 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