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/0814:26. Reason: +video
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.
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).
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
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.
...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)
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.
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.