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
3 registered members (AndrewAMD, Akow, degenerate_762), 1,430 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 1 of 5 1 2 3 4 5
Projective Texture Mapping - Spotlight Flashlight #181133
01/31/08 14:17
01/31/08 14:17
Joined: Jun 2005
Posts: 656
G
Grafton Offline OP
User
Grafton  Offline OP
User
G

Joined: Jun 2005
Posts: 656
PROJECTIVE TEXTURE MAPPING and PER PIXEL SPOTLIGHT SHADERS

I created a series of shaders designed to create a HLSL spotlight/ flashlight.
These stem from a side project that I have lost motivation for. Since there
have been several requests for some texture projection examples on the forum,
maybe this will help someone.

The examples were written in Lite-c, but could be rewritten in c-script quite
easily. The version I used in creating these examples was A7.06. You will need
support for PS 1.1 and VS 2.0 to run these examples.

The first four deal with creating a spotlight with "per pixel lighting" (PPL).
Its not texture projection, but I incuded these is because it is a simpler,
faster spotlight method which would also make a good fallback method for slower
machines.

The second four deal with creating a spotlight with "projective texture mapping" (PT).
The examples also demonstrate a colored texture projected onto a models surface.

EXAMPLE 1: PPL SPOTLIGHT WITH DIFFUSE AND SPECULAR
EXAMPLE 2: PPL SPOTLIGHT WITH NORMAL MAPPING
EXAMPLE 3: PPL SPOTLIGHT WITH SHADOW MAPPING
EXAMPLE 4: PPL SPOTLIGHT WITH NORMAL AND SHADOW MAPPING

EXAMPLE 5: PT SPOTLIGHT WITH DIFFUSE AND SPECULAR
EXAMPLE 6: PT SPOTLIGHT WITH WITH NORMAL MAPPING
EXAMPLE 7: PT SPOTLIGHT WITH WITH SHADOW MAPPING
EXAMPLE 8: PT SPOTLIGHT WITH WITH NORMAL AND SHADOW MAPPING

IMPORTANT: In order to keep the file size small, I have removed the models from
all the examples except the first. So you will need to copy the two models from
the first folder into the other example folders in order to run those examples.

I would appreciate any feedback on any issues you might find, so I can fix them
in case I decide to post this package at the Acknex Resource site.

Thanks!

9MB Rapidshare Link
9MB FileFront Link


Not two, not one.
Re: Projective Texture Mapping - Spotlight Flashlight [Re: Grafton] #181134
01/31/08 14:34
01/31/08 14:34
Joined: Aug 2005
Posts: 390
Florida
O
oldschoolj Offline
Senior Member
oldschoolj  Offline
Senior Member
O

Joined: Aug 2005
Posts: 390
Florida
I havnt looked this over yet, but the fact that you released something of this caliber, in order to further educate people is simply impressive. I will comment more when I've had a chance to further review this. Although I can't be sure, this is the first real jump in the right direction for projectors that I have seen in this community.

Last edited by oldschoolj; 01/31/08 14:37.

you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe. __________________________________ yours truly
Re: Projective Texture Mapping - Spotlight Flashl [Re: Grafton] #181135
01/31/08 14:36
01/31/08 14:36
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
Thank you very very very much!

Re: Projective Texture Mapping - Spotlight Flashl [Re: Emre] #181136
01/31/08 15:15
01/31/08 15:15
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
This is a very generous contribution!
Thanks a lot!

Re: Projective Texture Mapping - Spotlight Flashl [Re: Pappenheimer] #181137
01/31/08 15:20
01/31/08 15:20
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
i am so curious to get home and check if it now works with my gf6800. i hope so ooo o

Re: Projective Texture Mapping - Spotlight Flashl [Re: ello] #181138
01/31/08 15:32
01/31/08 15:32
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
can this work with a6? if so it seems like you could easily make a sun out of this......

Re: Projective Texture Mapping - Spotlight Flashl [Re: lostclimate] #181139
01/31/08 17:28
01/31/08 17:28
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
example 1&2 working. But other examples not working.
engine message:

"Error in 'MAIN' line 104: 'matViewProj' undeclared identifier
<mat_set(mtlSpotlit.matrix,matViewProj);>


can anyone help me please?

edit:Sorry.need a 7.07. Now all working.

Last edited by Emre; 01/31/08 19:11.
Re: Projective Texture Mapping - Spotlight Flashl [Re: Emre] #181140
01/31/08 18:39
01/31/08 18:39
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
indeed, it works now.. what exactly did you change since my pm? just like to know what caused the wrong shadowing...

thank you very much for your efforts!

Re: Projective Texture Mapping - Spotlight Flashl [Re: ello] #181141
01/31/08 19:56
01/31/08 19:56
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Great UC, will test asap

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: Projective Texture Mapping - Spotlight Flashlight [Re: Grafton] #181142
02/01/08 01:04
02/01/08 01:04
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
This is a great contribution, thanks.

Shame about you loosing your motivation on the project though..


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Page 1 of 5 1 2 3 4 5

Moderated by  adoado, checkbutton, mk_1, Perro 

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