Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Fr Mai 24, 2024 12:43

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 15 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: Loading 3d chunks
BeitragVerfasst: So Aug 13, 2006 13:19 
Hello

I would like to use OpenGL to display and edit an spline from coordinates within an unknown file format. How could I find the right chunks to bite in?

The other solution would be to read from a text file (xyz comma separated) and rewrite it after; and export etc... But the process is damn tedious :(

Any idea?

Thanks,

Algis


Nach oben
  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: So Aug 13, 2006 16:03 
Offline
DGL Member

Registriert: Sa Jan 22, 2005 21:10
Beiträge: 225
I'd say that using the textfile is the far better way to go. However if u wish to crack that fileformat u should get some good hexeditor und create some small easy files to investigate.

_________________
[18:30] tomok: so wie ich das sehe : alles. was nich was anderes ist als nen Essay ist nen Essay

hi, i'm a signature viruz, plz set me as your signature and help me spread :)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: So Aug 13, 2006 17:52 
Thank you for your reply.
It's honestly time wasting process; because you have to change small things; mainly vertex position in a 3d program; generate a text file multi-lines by the rendering engine; crunch that file with a Delphi small app I wrote which produce another text file that I import in excel; draw an x-y chart - See my mistakes; point it with the mouse to get the coordinates (uniques); make a search in the first file to check 'which object' and; start at step 1 :p

Therefore my idea would be to directly generate an spline from the original mesh (MTS file) and generate from it an ascii msa or similar (?)

I am not OpenGL specialist but it seems to be the right choice.

I use WinHex and I already tried generating cubes with / without mapping to try to understand but to not avail :(

I dont know if this message will come - I cant read the graphics...


Nach oben
  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Aug 14, 2006 08:59 
Offline
Fels i.d. Brandung
Benutzeravatar

Registriert: Sa Mai 04, 2002 19:48
Beiträge: 3827
Wohnort: Tespe (nahe Hamburg)
This post belongs to Agis and was sent to me via email:
Zitat:
I have found what I believe to be a compromise: the import-asc model sample. As I have anyway to crunch the first text file; I can as well re-write an asc because the asc format is very simple. I can put generic colors and materials if needed. I can load my asc scene fine no problem but: the demo I have is commented in German; which is fine (on-line free traduction) but no readme or whatsover. So beside watching it spinning I cant do much with my model...

Could someone point me to a sample code to show,rotate,zoom my model and pick vertex with the mouse? Then I think I can handle to modify values and write back (?)

showmessage('Many thanks!');


end;

_________________
"Light travels faster than sound. This is why some people appear bright, before you can hear them speak..."


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Aug 14, 2006 09:09 
Der eingegebene Bestätigungs-Code war nicht richtig (over 10 times; I am tired of this...)

Can somebody disable the graphic lollipop before posting for me :P
I'm half-blinded by twenty-five years of computing and cant read the confirm string: took me about 10 trials yesterday :shock:

Anyway: IF you get his post then begin:

I have found what I believe to be a compromise: the import-asc model sample. As I have anyway to crunch the first text file; I can as well re-write an asc because the asc format is very simple. I can put generic colors and materials if needed. I can load my asc scene fine no problem but: the demo I have is commented in German; which is fine (on-line free traduction) but no readme or whatsover. So beside watching it spinning I cant do much with my model...

Could someone point me to a sample code to show,rotate,zoom my model and pick vertex with the mouse? Then I think I can handle to modify values and write back (?)

showmessage('Many thanks!');


end;


Nach oben
  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Aug 14, 2006 10:43 
Offline
DGL Member

Registriert: Mo Aug 14, 2006 10:15
Beiträge: 6
Thanks to Phoebus for his help;

Seems to work fine now :)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Aug 14, 2006 14:55 
Offline
DGL Member
Benutzeravatar

Registriert: Fr Mai 14, 2004 18:56
Beiträge: 804
Wohnort: GER/OBB/TÖL-WOR/Greiling
Hi,

would you mind telling us the name of the file format and the app that uses it? Maybe somebody else out there already did what you are trying to.

_________________
Bild

"User Error. Replace User and hit Continue."


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Aug 14, 2006 17:02 
Offline
DGL Member

Registriert: Mo Aug 14, 2006 10:15
Beiträge: 6
Hey Luke;

Sure; here is more details:

Format is called .MTS tho I believe it is a proprietary format or else (ISI?) Cant find anything about it on the web except for:

the 3D "Editor" that can manipulate (pretty succesfully) the objects; called ZModeler 1.07 (new v2 does not support the format anymore). V1.07 was a freeware.

Those files are the graphic part of a game named F1 Challenge (99-02) which is pretty old but help me a lot to understand AI (for artificial car driving during races).
So what I am working on is a way to make AIW files (which are the text files I described in the thread) and in the middle my small crunching app and excel etc...

Thanks for any hint :)

(*) I also suspect another app (SimEd) to use OpenGL to do the same but the program does not work well with MTS format; unlike what is said in the ad :D


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Aug 15, 2006 14:02 
Offline
DGL Member
Benutzeravatar

Registriert: Fr Mai 14, 2004 18:56
Beiträge: 804
Wohnort: GER/OBB/TÖL-WOR/Greiling
ZModeler.... the one and only proprietary format editor :lol: (the only one which is able to edit Emergency v3o files)

Sorry I can't help you any further with this.

_________________
Bild

"User Error. Replace User and hit Continue."


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Aug 16, 2006 03:46 
Offline
DGL Member

Registriert: Mo Aug 14, 2006 10:15
Beiträge: 6
I dont need to plzy with ZMod or it s proprietary features... I use the ASC file; questionwas and still:

Could someone point me to a sample code to show,rotate,zoom my model and pick vertex with the mouse? Then I think I can handle to modify values and write back (?)

Does not even involve Zmod or wnatever for that. Now if you dont know how to do that; I guess I'll have ot translate the Wiki :D


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Aug 16, 2006 10:56 
Offline
DGL Member
Benutzeravatar

Registriert: Fr Mai 14, 2004 18:56
Beiträge: 804
Wohnort: GER/OBB/TÖL-WOR/Greiling
well,

showing:

- load the vertices into a format recognizable by OpenGL
- pass them to OpenGL

you can use VBOs, Vertex-Arrays, Diplay Lists or the one and only glVertexxx.

rotating:

glrotatex

zooming:

you can change the perspective, or you can simply move through the world with gltranslatexx.

picking with mouse:

you should make your vertices into small spheres, so you can pick them. then there are several possiblities:

1. color keying: you give every vertex another color. so if you click, you can find the color you clicked on, and find the vertex that belongs to it
2. GL_SELECT render mode: you can set names (integers) at any stage of rendering, which will be set for all subsequently rendered vertices. so if you click on one, OpenGL can tell you the name.
3. glu(Un)Project: you give the function the x,y coordinates of you mouse and the value of the depth buffer of where you clicked and the function returns you a 3d coordinate on the plane you clicked on. you can then search for the next vertex near this position.

there's a lot of possiblities.

_________________
Bild

"User Error. Replace User and hit Continue."


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Aug 16, 2006 11:17 
Offline
DGL Member

Registriert: Mo Aug 14, 2006 10:15
Beiträge: 6
Wunderbar! That will keep me busy for a bit :D

Many thanks Luke; you're the Duke. That will keep me from wasting a long time searching.

I will keep posting progress when relevant (or when I'll need more help)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Aug 16, 2006 11:28 
Offline
DGL Member
Benutzeravatar

Registriert: Fr Mai 14, 2004 18:56
Beiträge: 804
Wohnort: GER/OBB/TÖL-WOR/Greiling
well, thanks.

Addendum to color keying: you get the color value from the color buffer. you should be able to find out how to access it easily on the web, I never worked with it.

_________________
Bild

"User Error. Replace User and hit Continue."


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: So Aug 20, 2006 12:26 
Offline
DGL Member

Registriert: Mo Aug 14, 2006 10:15
Beiträge: 6
OK; moving here... I can draw an spline with gldraw and glvertex3f - Working on zoom, rotate and pick the points with mouse.

One thing: (call me donkey but...) I have found and use a part of a demo/tut at Selaco (sorry if concurrent) and I picked a part for mouse handling; but tho it recognize and do my glrotate on the left click; nothing seems to help to "see" the right/mid click...

Borrowd code is:

procedure ProcessMouse;
begin
case MouseButton of
1: // Left Mouse Button
begin

==> I put my glrotate here and it does the job (1 click at a time for now)

MouseButton := 0; // Cancel our mouse click (To use this procedure as a mouse down event remove this line)
end;
2: // Right Mouse Button
begin

==> Never comes here

MouseButton := 0; // Cancel our mouse click (To use this procedure as a mouse down event remove this line)
end;
3: // Middle Mouse Button
begin

==> Never comes here either

MouseButton := 0; // Cancel our mouse click (To use this procedure as a mouse down event remove this line)
end;
end;
end;

Any wild thought or better routine?

Thanks


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: So Aug 20, 2006 14:54 
Offline
DGL Member

Registriert: Mo Aug 14, 2006 10:15
Beiträge: 6
Okokok... My Bad :( Wasn't declared in HWnd procedure...

Still hanging on zoom / pan / rotate but I guess I'll find out :D


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 15 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 3 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.010s | 14 Queries | GZIP : On ]