2 registered members (AndrewAMD, ChrstphFr),
941
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
supertrace plugin / second uv-set plugin
#134220
06/06/07 13:56
06/06/07 13:56
|
Joined: May 2002
Posts: 7,441
ventilator
OP
Senior Expert
|
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: frazzle]
#134224
06/06/07 20:31
06/06/07 20:31
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
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
Expert
|
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]
#134228
06/07/07 18:27
06/07/07 18:27
|
Joined: May 2002
Posts: 7,441
ventilator
OP
Senior Expert
|
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
Expert
|
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
|
|
|
|