Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: hit.u1, hit.u2 [Re: jcl] #229202
09/25/08 14:14
09/25/08 14:14

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



Damit Sie es auch bequem sehen können, hier das zugehörige Testprogramm: u1v1.zip (50kb)

Das Programm läd ein einfach texturiertes Modell auf welches ein extra Vertix (Textur roter Punkt) gesetzt ist.
Das Programm tracet permanent von der Camera (0,0,100) auf den Vertix und zeigt hit.u1/hit.v1 an.

Diese sollten immer gleich sein - sollten...

Mit der Maus können Sie das Modell drehen.


Das Ergebnis:

Last edited by mercuryus; 09/25/08 14:26. Reason: +video
Re: hit.u1, hit.u2 [Re: ] #229209
09/25/08 15:01
09/25/08 15:01
Joined: Mar 2007
Posts: 1,852
A
alpha_strike Offline
Serious User
alpha_strike  Offline
Serious User
A

Joined: Mar 2007
Posts: 1,852
Ich habe schon ne Weile nix mehr gemacht... aber bekommst Du das gleiche Ergebnis auch, wenn Du beim Tracen "use_polygon" verwendest?
Kann das wechselnde Ergebnis mit der "Strahldicke" zu tun haben?

So etwas gab es mal zu Zeiten von der A5 und A6, bis eben die polygongenaue Abfrage kam.

Re: hit.u1, hit.u2 [Re: alpha_strike] #229212
09/25/08 15:15
09/25/08 15:15
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Ohne USE_POLGON triffst du einfach nur die Bounding Box und die rotiert bekanntlich nicht mit. Dein roter Punkt hat mit dem Treffer nix zu tun.

Setz doch einfach eine Zielentity auf die Trefferstelle dann siehst du wo das Problem ist.

Re: hit.u1, hit.u2 [Re: Tobias] #229218
09/25/08 16:21
09/25/08 16:21

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



Ladet Euch doch einfach das Testprogramm runter und schaut es Euch an (hier noch mal der link).
@tobias: der rote Punkt ist ein opt. Hilfspunkt für den Vertex der als trace-Ziel dient.
An dem Ergebnis ändert auch ein USE_POLYGON nichts.

Und wenn Ihr gerade dabei seid, würde ich mich über die Lösung freuen - einfach das Testscript ändern und hier posten (scheint ja nur eine Unachtsamkeit von mir zu sein).

Re: hit.u1, hit.u2 [Re: ] #229227
09/25/08 17:36
09/25/08 17:36
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline
Member
Foxfire  Offline
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
Ive been having the same problem!
I wanted the UV coordinates (either pixels or 1 to 0) but the trace function doesn't seem to return the correct values.

I would really appreciate a solution. I am planning on creating a small code to handle bullet fire as actual holes (tranparent) in some entities such as crates to make my games and simulations more realistic.

Sorry for writing in english, I translated your German but I can't write it.

-Mike-


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: hit.u1, hit.u2 [Re: Foxfire] #229240
09/25/08 19:11
09/25/08 19:11
Joined: Sep 2005
Posts: 980
Aue, Sachsen, Germany
W
Wicht Offline
User
Wicht  Offline
User
W

Joined: Sep 2005
Posts: 980
Aue, Sachsen, Germany
Auch auf die Gefahr hin, daß mein Gedanke dämlich ist:

Das getroffene Polygon ist ja immer ein Dreieck. Somit sollte es möglich sein, alle 3 Vertices und damit deren UVs zu ermitteln. Der Punkt, der tatsächlich auf dem Polygon getroffen wurde, liegt ja entweder genau auf einem der drei Vertices oder halt irgendwo innerhalb des Dreiecks.
Das Dreieck selbst ist immer eine Fläche und kann nicht gekrümmt werden. So könnte man anhand der Position des getroffenen 3D-Punktes im Verhältnis zur Position der anderen 3 Vertices das gesuchte UV-Paar berechnen.

Re: hit.u1, hit.u2 [Re: Wicht] #229243
09/25/08 19:35
09/25/08 19:35

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



CONTACT-Informationen

...aber wenn es eine Möglichkeit von 3DGS gibt, das Pixel zu ermitteln sollte diese auch funktionieren (da sie in diesem Fall einfacher zu verwenden währe)

Re: hit.u1, hit.u2 [Re: ] #229279
09/26/08 01:16
09/26/08 01:16
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
I have tested the u1v1.zip. It had many bugs, for instance it must be SCAN_TEXTURE+USE_POLYGON, and you shoot at the very edge of the model so that you will probably miss the model in 50% of the time, and are not testing if you have hit it. But when I fixed all those errors the uv values are still wrong, so I think there is some engine bug.

Re: hit.u1, hit.u2 [Re: Spirit] #229281
09/26/08 04:22
09/26/08 04:22

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



then hurry up and move it to the bug forum (you are the guy for moving posts as I remember).

Quote:
and you shoot at the very edge of the model so that you will probably miss the model in 50% of the time,


lol - the vertix is somewhere in the inner range (far away from the border) of the model - the traces must hit it every time.
The only thing you had to add was the USE_POLYGON, my little friend.

And now please just fix this bug (conitec) it (once again) took too much of my time to attract you to this obvious bug.


Re: hit.u1, hit.u2 [Re: ] #229291
09/26/08 08:03
09/26/08 08:03
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
I'll look into this and will check if there is a bug.

Page 2 of 3 1 2 3

Moderated by  old_bill, Tobias 

Gamestudio download | 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