Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,395 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Cubemap aligned with model's angle #68526
03/28/06 17:24
03/28/06 17:24
Joined: Apr 2005
Posts: 64
Italy - Rome
_
_Tommo_ Offline OP
Junior Member
_Tommo_  Offline OP
Junior Member
_

Joined: Apr 2005
Posts: 64
Italy - Rome
Hi,
I modified the toonshader from the wiki to apply another texture in mtlSkin3 on my model... i use this to "print" bullet holes on my players in a position independent from model's texcoords.
But i still have a problem: i know very little about matrices, but i need to rotate my cubemap to align it with the model's angle...
I tried with matWorld: then the texture is independent from texcoods, but it's aligned to the world !

I know i asked this already 2 times, but i didn't get a reply... i hope that this time i explained well my problem.
Any reply will be appreciated.

Re: Cubemap aligned with model's angle [Re: _Tommo_] #68527
03/29/06 01:02
03/29/06 01:02
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
If I got you right, matWorldInv is what you search. Thus try to transform your 3d(!) cubemap-coordinates by matWorldInv - that should do the tick.

Re: Cubemap aligned with model's angle [Re: Alexander Esslinger] #68528
03/29/06 18:34
03/29/06 18:34
Joined: Apr 2005
Posts: 64
Italy - Rome
_
_Tommo_ Offline OP
Junior Member
_Tommo_  Offline OP
Junior Member
_

Joined: Apr 2005
Posts: 64
Italy - Rome
Wow thanks now it works !!
Another question... the skin is too little to fit the model, so there are many aligned. How i can do to rescale it to be the same size of the model's skin?

Re: Cubemap aligned with model's angle [Re: _Tommo_] #68529
03/30/06 13:43
03/30/06 13:43
Joined: Apr 2005
Posts: 64
Italy - Rome
_
_Tommo_ Offline OP
Junior Member
_Tommo_  Offline OP
Junior Member
_

Joined: Apr 2005
Posts: 64
Italy - Rome
Hmm really the matrix was useful but it doesn't work as i want... i need to project skin3 on my model like a cubemap, but now it's printed by the side of the model, like a normal skin...
Here is my code:
Code:
 
m3x3 oT3, v7, c9 //matWorldInv is in c9
};
pixelShader=
asm
{
ps.1.3
def c0, 1.0f,0.0,0.0,0.0

tex t0 // fetch normalized normal
texdp3tex t1,t0 // light.normal=u -> use u to lookup in t1 // _bx2 -> 0..1 of normcube will be -1..1
tex t2 // sample color map
tex t3 //damagemap in mtlSkin3

mul r1, t3, c0 //multiply the cubemap for its color
mad r0, t1, t2, r1 //add the cubemap to base + shadow
};


Can anyone post an example where is showed how i could do to cubemap skin3? Thanks.

Re: Cubemap aligned with model's angle [Re: _Tommo_] #68530
04/19/06 21:03
04/19/06 21:03
Joined: Apr 2005
Posts: 64
Italy - Rome
_
_Tommo_ Offline OP
Junior Member
_Tommo_  Offline OP
Junior Member
_

Joined: Apr 2005
Posts: 64
Italy - Rome
Anyone???
Another thing: i changed my Nvidia FX 5700 to a X800 gto pro...
and now my models are totally black...
this could be because the first had dx8.1, causing some errors in ps1.4 to show up only on dx9.0c?


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