Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (Quad, M_D, Ayumi, AndrewAMD), 783 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 1 of 6 1 2 3 4 5 6
supertrace plugin / second uv-set plugin #134220
06/06/07 13:56
06/06/07 13:56
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
supertrace.zip ~ 500kb

it's a free plugin with a function called supertrace() which works with static models and can return the texture coordinates (of both uv-sets) of the hit location.

(to try out the example script extract the zip file to the directory with the mesh plugin demo.)



for example it is helpful if you use entities with light maps and want to figure out the light map color somewhere or for painting graffitis, blood splotches,... at certains locations.



...
and in case you didn't know it already: mesh_plugin_demo.zip ~ 5mb

this plugin makes it possible to use two uv-sets on your models. since the mdl7 format doesn't support two uv-sets, you will need two versions of your model. one with the first uv-set and one with the second uv-set. with the ent_loadseconduvset() function you can load the uvs of the second model into the second uv-set of the first model.



see this thread in the third party forum for more details: http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/755382/page/0/fpart/1/vc/1

Re: supertrace plugin / second uv-set plugin [Re: ventilator] #134221
06/06/07 14:48
06/06/07 14:48
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline
User
DavidLancaster  Offline
User

Joined: Nov 2004
Posts: 862
Australia
Greatest contribution/plugin ever. *gives Ventilator 1.2 million kudos*

Re: supertrace plugin / second uv-set plugin [Re: DavidLancaster] #134222
06/06/07 14:58
06/06/07 14:58
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline
Expert
Puppeteer  Offline
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
I already gave him 5 stars ^^


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: supertrace plugin / second uv-set plugin [Re: DavidLancaster] #134223
06/06/07 19:40
06/06/07 19:40
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Quote:

Greatest contribution/plugin ever.




One of the best indeed, very helpfull

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: supertrace plugin / second uv-set plugin [Re: frazzle] #134224
06/06/07 20:31
06/06/07 20:31

A
Anonymous
Unregistered
Anonymous
Unregistered
A



very, very useful!

thanx very much, mercuryus

Re: supertrace plugin / second uv-set plugin [Re: ] #134225
06/06/07 20:46
06/06/07 20:46
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
So, theoretically, would it be possible to generate lightmaps using supertrace() ? Or is supertrace actually the other way around, as in it only returns coords from vec, not coords to vec.


xXxGuitar511
- Programmer
Re: supertrace plugin / second uv-set plugin [Re: xXxGuitar511] #134226
06/06/07 20:55
06/06/07 20:55
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
for generating light maps it's the other way around. there you already have the triangle and its uvs. you have to rasterize the triangle and convert each pixel's uv-coordinate to a 3d-coordinate and trace to the light from there. i think that's the easy part. the hard part is the algorithm which automatically creates a good uv-map.

Re: supertrace plugin / second uv-set plugin [Re: ventilator] #134227
06/06/07 21:08
06/06/07 21:08
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I'm not worried about creating a good UVMap (Yet ), I just want to make a 'lil program for generating lightmaps ingame. I can use the TGA code on the WIKI to save them to TGA files. I've already done this with a terrain for a school project, but terrains are easy


xXxGuitar511
- Programmer
Re: supertrace plugin / second uv-set plugin [Re: xXxGuitar511] #134228
06/07/07 18:27
06/07/07 18:27
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
if you already have the uv-map for the light map then it isn't much harder than doing it for terrains (med supports automatic atlas mapping now so this could be used for the uv-map).

i think basically you just need a triangle rasterization algorithm and you have to know how to use barycentric coordinates so you can get the 3d-coordinates of the rasterized pixels. both things aren't too difficult and you can find information about it with google.

you have to use lite-c because with it you have access to the mesh data. i posted an example in the lite-c forum a while ago.

an ingame light mapper would be nice!

Re: supertrace plugin / second uv-set plugin [Re: ventilator] #134229
06/07/07 18:34
06/07/07 18:34
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I've been avoiding light c, lol..

I should probably start digging into it this weekend...


xXxGuitar511
- Programmer
Page 1 of 6 1 2 3 4 5 6

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