Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
c_trace -> GET_UVS flag #124459
04/16/07 09:03
04/16/07 09:03
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
it would be great if c_trace had a GET_UVS flag.

when using this flag the global predefined vectors trace_uv1 and trace_uv2 would get set to the exact texture coordinates of the c_trace hit location.

trace_uv1 = coordinates in the first uv-set
trace_uv2 = coordinates in the second uv-set



this would be helpful once entities can have light maps (thanks for adding ent_setmesh()!) since with entities tex_light probably won't work? with the GET_UVS flag we could read the light map brightness ourselves.

it also would be helpful for painting entities (blood splotches, graffitis,...).

Re: c_trace -> GET_UVS flag [Re: ventilator] #124460
04/16/07 18:50
04/16/07 18:50
Joined: Sep 2005
Posts: 980
Aue, Sachsen, Germany
W
Wicht Offline
User
Wicht  Offline
User
W

Joined: Sep 2005
Posts: 980
Aue, Sachsen, Germany
Your wish is good. Really good.

Re: c_trace -> GET_UVS flag [Re: Wicht] #124461
11/26/07 23:08
11/26/07 23:08
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline
User
DavidLancaster  Offline
User

Joined: Nov 2004
Posts: 862
Australia
We really need this feature, having to use newton and a dll for it is really becoming a pain.

Re: c_trace -> GET_UVS flag [Re: DavidLancaster] #124462
11/27/07 11:00
11/27/07 11:00
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
I like wishes that require no more work from me than a reference to the manual - or in this case, to the beta page, look for hit.u1 and hit.v1.

Re: c_trace -> GET_UVS flag [Re: jcl] #124463
11/27/07 11:11
11/27/07 11:11
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
we need the uvs of the second uv-set though. you said c_trace will set a VERTEX struct in the future. when will this get implemented?

Re: c_trace -> GET_UVS flag [Re: ventilator] #124464
11/27/07 11:31
11/27/07 11:31
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
c_trace uses a VERTEX struct. It does not fill in the second UV set, though, only the first. The second set has little importance as it's normally tiled and thus contains no usable information about the hit point on the texture.

However, of course we can also fill in the second set in a future version.

Re: c_trace -> GET_UVS flag [Re: jcl] #124465
11/27/07 12:13
11/27/07 12:13
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
it has importance for users who use light mapping on models since with it the brightness of the light map could be accessed. it would be great if you could fill the second one too!

at the moment we have to use our own raycast function but this isn't a very elegant solution if it would only take a small c_trace() change anyway.

Re: c_trace -> GET_UVS flag [Re: ventilator] #124466
11/27/07 12:30
11/27/07 12:30
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
For light mapping on models you should definitely use the first UV set, not the second one. The A6 and A7 engines use the second UV set for tiled textures, detailmaps and so on.

The reason is that the first UV set must be nontiled and use unique texture coordinates. Otherwise many parts of the engine would not work properly, like the light mapping algorithms, trace, and the upcoming decal system. Also all the shaders we're developing for A7 expect the lightmap on the first UV set.

However you'll get the second and also the 3rd UV set of the VERTEX struct through c_trace in future engine versions. Maybe already in 7.07, but at least in 7.08.

Re: c_trace -> GET_UVS flag [Re: jcl] #124467
11/27/07 12:55
11/27/07 12:55
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
ok, i didn't think of that convention and that it would make sense to also use it. i will use the first uv-set in the future...


Moderated by  aztec, Spirit 

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