|
File Output question
Hi,
I was hoping someone could help me. I read in a unreal *.t3d map file and read all the vertex information from it, then write to a new file with only the vertex information. I have set it up to also count how many polygons are in the map file. But I want to put in my new file something like "Number of Polygons : 6". So after writing to my file with the vertex information, how can I go back to the start and insert the number of polygons into the file?
Another question is can someone give me some tips on converting the 4 sided polygon information in these t3d files to 2 triangles instead of 1 polygon/quad.
Here is my source so far. P.S. Yes I am very much a beginner...
Werdy666 :D
Edited by - werdy666 on February 2, 2002 9:27:58 AM
Hi,
I''m working too on a T3D converter.
On my site, you''ll find the last version (0.5) of my program.
You''ll see soon that reading and converting a T3D file is hard ...
There''re many things to keep for correctly loading a T3D file in your engine.
I''m using the 0.6 version for my program and I''m very happy with the result.
Now, I can load a T3D map.
Here''s a map made under UnrealEd 2.0 and my engine can load the same.
If you have any question, don''t hesitate ...
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
I''m working too on a T3D converter.
On my site, you''ll find the last version (0.5) of my program.
You''ll see soon that reading and converting a T3D file is hard ...
There''re many things to keep for correctly loading a T3D file in your engine.
I''m using the 0.6 version for my program and I''m very happy with the result.
Now, I can load a T3D map.
Here''s a map made under UnrealEd 2.0 and my engine can load the same.

If you have any question, don''t hesitate ...
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
Oups, sorry, your questions ... 
- In my program I use 3 files :
- Temp file for vertex
- Temp file for textures
- Temp file for informations (number of polys, textures)
After I read the 3 files and I write them in a more simple format to use.
And for you, you can use this :
rewind(your_file) ==> Not tested
- And for tranforming a quad in 2 triangles, no idea. Search a splitting algoritme (not sure)
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/

- In my program I use 3 files :
- Temp file for vertex
- Temp file for textures
- Temp file for informations (number of polys, textures)
After I read the 3 files and I write them in a more simple format to use.
And for you, you can use this :
rewind(your_file) ==> Not tested
- And for tranforming a quad in 2 triangles, no idea. Search a splitting algoritme (not sure)
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
Splitting a quad in 2 tris is simple if the vertices are stored in order (clockwise or counterclockwise) :
quad : ABCD ====> tri 1 : ABC ,tri 2 : ADC
A------------B
|00000000000|
|00000000000|
D------------C
In your mind draw a line between B and D
(don't mind the 0's, using spaces doesn't seem to get the vertical lines right)
Edited by - George2 on February 4, 2002 7:32:17 AM
Edited by - George2 on February 4, 2002 7:32:59 AM
quad : ABCD ====> tri 1 : ABC ,tri 2 : ADC
A------------B
|00000000000|
|00000000000|
D------------C
In your mind draw a line between B and D
(don't mind the 0's, using spaces doesn't seem to get the vertical lines right)
Edited by - George2 on February 4, 2002 7:32:17 AM
Edited by - George2 on February 4, 2002 7:32:59 AM
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement