Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (EternallyCurious, AndrewAMD, TipmyPip, Quad), 889 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 7 of 8 1 2 3 4 5 6 7 8
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: ] #118040
03/31/07 04:24
03/31/07 04:24
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
@Frank_G: A model 2 shader will work on a model 3 card... You don't need to change the code, it won't help.

@fear411: Simply include the <NM.wdl> in your project. Then apply the material to your models.

@All: Sorry, I forgot to add the static lighting code. I'll add it, fix the above mentioned problems, and maybe more.

I didn't use vecAmbient on purpose, because it wasn't working for me. I had included it (as a float4), but it always returned 1.0f in all slots.


I will update the code, and then send it to William, as he is currently my supervisor.


xXxGuitar511
- Programmer
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: xXxGuitar511] #118041
03/31/07 07:11
03/31/07 07:11
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline
Senior Expert
Machinery_Frank  Offline
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
xxGuitar:

You misunderstood me. The shader from this thread compiles on shader 3.0. But Matt's older version on 2.0 (and on 3.0 cards as well). Because of that I would like to have both of them in the WIKI.

So we could create some kind of fallback solutions.


Models, Textures and Games from Dexsoft
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: Machinery_Frank] #118042
03/31/07 09:43
03/31/07 09:43
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline
Senior Expert
Machinery_Frank  Offline
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Hi,

I rendered a texture for you to play around with normal-mapping shaders with and without specularity. You can add the spec-map into the alpha channel if you need it.

If you need parallax- or relief-mapping then you can even use the height map.

Download: http://www.dexsoft-games.com/freebies/textures/freecrate.zip

Preview:


This is a gift for you. Use it but please put a finished version of this shader into the WIKI as an alternative to the 2.0 shader from Matt (please do not remove this one).

Best regards,
Frank


Models, Textures and Games from Dexsoft
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: Machinery_Frank] #118043
03/31/07 13:18
03/31/07 13:18

A
Anonymous
Unregistered
Anonymous
Unregistered
A



ich bekomme immer fehler wenn ich das spiel starte.
ich nutze auch noch sylex und newton.

keyword unknown float4x4
und noch viele mehr

Re: [Supply] Matt's NormalMapping shader with 3 li [Re: xXxGuitar511] #118044
03/31/07 15:35
03/31/07 15:35
Joined: Apr 2004
Posts: 83
DWilki Offline
Junior Member
DWilki  Offline
Junior Member

Joined: Apr 2004
Posts: 83
Very nice shader. I've applied this to models and it looks great.

A question. I am trying to apply this to a mesh to be used as world geometry. I have seen this problem before and I think its a UV mapping issue with the mesh I am using. I can remember how I fixed this problem once before.





Anyone have any suggestions as to what I am doing wrong with the mesh?

Last edited by DWilki; 03/31/07 15:38.
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: DWilki] #118045
03/31/07 15:56
03/31/07 15:56

A
Anonymous
Unregistered
Anonymous
Unregistered
A



how i apply the shader to a model?

Re: [Supply] Matt's NormalMapping shader with 3 li [Re: ] #118046
03/31/07 16:06
03/31/07 16:06
Joined: Apr 2004
Posts: 83
DWilki Offline
Junior Member
DWilki  Offline
Junior Member

Joined: Apr 2004
Posts: 83
Quote:

how i apply the shader to a model?




Paste this code into a script and follow the directions.

***********************************************************


//Copy the shader code into notepad and save the file as NM.fx in the root directory of your project
string fxNM3Light = "NM.fx";

//Assign this action to a mesh (box or sphere). Set the mesh to "cast" in properties and make sure the light is close to your model
action DynamicLight
{
my.red = 187;
my.green = 148;
my.blue = 11;
my.lightrange =600;
my.light = ON;
}


//Assign this material to the model you want normal map/specular effect by adding the material in the properties dialogue
//Make sure your model has a diffuse texture in skin1 and a normal map texture in skin 2.
//If you want more control of the specular, add a specular map to the alpha channel of the normalmap
material mat_nm3lights
{
flags = tangent;
effect = fxNM3Light;
}


starter LoadFX_startup()
{
effect_load(mat_nm3lights, fxNM3Light);
}

**********************************************************

Last edited by DWilki; 03/31/07 16:09.
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: DWilki] #118047
03/31/07 16:16
03/31/07 16:16

A
Anonymous
Unregistered
Anonymous
Unregistered
A



where can i look if the skins are right?

Re: [Supply] Matt's NormalMapping shader with 3 li [Re: ] #118048
03/31/07 16:34
03/31/07 16:34
Joined: Apr 2004
Posts: 83
DWilki Offline
Junior Member
DWilki  Offline
Junior Member

Joined: Apr 2004
Posts: 83
Quote:

where can i look if the skins are right?




Open your model in med, then go to "Edit" and select "Manage skins".

Re: [Supply] Matt's NormalMapping shader with 3 li [Re: DWilki] #118049
03/31/07 16:36
03/31/07 16:36

A
Anonymous
Unregistered
Anonymous
Unregistered
A



@DWilki can you post an example model,please?

Page 7 of 8 1 2 3 4 5 6 7 8

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