View previous topic :: View next topic |
Author |
Message |
banshee777 Member
Joined: 10 Feb 2005 Posts: 37
|
Posted: Thu Feb 10, 2005 12:59 am Post subject: Help i can't understand .dmf and .x file formats. |
|
|
Hello people
I've been searching for an editor to make a game. This one seems perfect for it. But i can't understand the map format. Seems so complex. I've used triangles rendering before, quads rendering and used this format freeworld map editor's. But that editor is lacks features.
http://members.net-tech.com.au/alaneb/freeworld_saving_and_exporting.html <--fileformat.
I hope i can get this fileformat working on my engine. Seems like a cool editor.
I want to create kinda like castle or something and walk around with textures and lightmaps.
31138874 is my ICQ if u would like to get incontact.
http://www.geocities.com/geforce2mx2000/engine/ <--bit of screenshots of the engine at work. |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Thu Feb 10, 2005 1:05 am Post subject: |
|
|
The dmf is easy to parse, and the documentation for it is in the help file. |
|
Back to top |
|
|
banshee777 Member
Joined: 10 Feb 2005 Posts: 37
|
Posted: Fri Feb 11, 2005 3:52 am Post subject: |
|
|
Hey i just did a simple cube...
"
256;0;256;
-256;0;256;
-256;0;-256;
256;0;-256;
256;128;256;
-256;128;256;
-256;128;-256;
256;128;-256;
"
Just wonder how i would render that in opengl.
DeleD Map File;
Version 0.91;
no-name-yet;00FFFFFF;75;
16;
0;system;System;0;1;0,System\system.bmp,1;
1;Floor02;Floors;0;1;0,Floors\Floor02.jpg,1;
2;Floor04;Floors;0;1;0,Floors\Floor04.jpg,1;
3;Floor10;Floors;0;1;0,Floors\Floor10.jpg,1;
4;Floor11;Floors;0;1;0,Floors\Floor11.jpg,1;
5;Water01;Nature;0;1;0,Nature\Water01.jpg,1;
6;Roof03;Roofs;0;1;0,Roofs\Roof03.jpg,1;
7;Roof04;Roofs;0;1;0,Roofs\Roof04.jpg,1;
8;Wall01;Walls;0;1;0,Walls\Wall01.jpg,1;
9;Wall02;Walls;0;1;0,Walls\Wall02.jpg,1;
10;Wall06;Walls;0;1;0,Walls\Wall06.jpg,1;
11;Wall10;Walls;0;1;0,Walls\Wall10.jpg,1;
12;Wall11;Walls;0;1;0,Walls\Wall11.jpg,1;
13;Wall12;Walls;0;1;0,Walls\Wall12.jpg,1;
14;Wood01;Wood;0;1;0,Wood\Wood01.jpg,1;
15;Wood02;Wood;0;1;0,Wood\Wood02.jpg,1;
1;
cube0;0;1;-1;1;-1;-1;User info;
8;
256;0;256;
-256;0;256;
-256;0;-256;
256;0;-256;
256;128;256;
-256;128;256;
-256;128;-256;
256;128;-256;
6;
4;0;0;1;5;4;2.0000;0.0000;-2.0000;0.0000;-2.0000;1.0000;2.0000;1.0000;
4;0;1;2;6;5;2.0000;0.0000;-2.0000;0.0000;-2.0000;1.0000;2.0000;1.0000;
4;0;2;3;7;6;-2.0000;0.0000;2.0000;0.0000;2.0000;1.0000;-2.0000;1.0000;
4;0;3;0;4;7;-2.0000;0.0000;2.0000;0.0000;2.0000;1.0000;-2.0000;1.0000;
4;0;3;2;1;0;2.0000;-2.0000;-2.0000;-2.0000;-2.0000;2.0000;2.0000;2.0000;
4;0;4;5;6;7;2.0000;2.0000;-2.0000;2.0000;-2.0000;-2.0000;2.0000;-2.0000;
0; |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Fri Feb 11, 2005 4:23 am Post subject: |
|
|
If you don't understand how to take a bunch of vertices and face definitions and render them in OpenGL, I suggest you read through the Red Book (online) and then maybe the Nehe Tutorials.
Did you read the Deled help file? |
|
Back to top |
|
|
banshee777 Member
Joined: 10 Feb 2005 Posts: 37
|
Posted: Fri Feb 11, 2005 4:54 am Post subject: .... |
|
|
Quote: |
If you don't understand how to take a bunch of vertices and face definitions and render them in OpenGL, I suggest you read through the Red Book (online) and then maybe the Nehe Tutorials.
Did you read the Deled help file? |
I understand the 8 vertices now, i expected 16 for a cube.
Yes i did read the help file. I'm just wondering how i'm going to render it.
QUADS or TRIANGLES.. Then the order of the rendering. The faces i mean, one face has 4 vertices for a QUAD, 6 for TRIANGLES.
I'll see what i can do, i'll see if can get the 3d rendering, then i'll see if can get the textures going with it.
Still some other stuff and variables in the file format i still need to understand. But that can come later. 1.) 3d and 2.) textures is what i want to get done.. first |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Fri Feb 11, 2005 5:28 am Post subject: |
|
|
Ah, ok.. then why didn't you say that.
Select your model, and triangulate it.. I forget if there is a funtion to that, or if it's only there when you lightmap your level. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Fri Feb 11, 2005 7:40 am Post subject: |
|
|
Yes, DeleD has a function for that
You can also do the triangulation yourself (all polygons should be convex, so they are really easy to triangulate in numerous ways), or use glBegin(GL_POLYGON) if you don't mind a little loss of speed. |
|
Back to top |
|
|
banshee777 Member
Joined: 10 Feb 2005 Posts: 37
|
Posted: Fri Feb 11, 2005 8:11 am Post subject: |
|
|
Paul-Jan wrote: |
Yes, DeleD has a function for that
You can also do the triangulation yourself (all polygons should be convex, so they are really easy to triangulate in numerous ways), or use glBegin(GL_POLYGON) if you don't mind a little loss of speed. |
I'm just using quads for now...i got it render the quads from the 8 vertices, had to draw 3d box on paper... now i need create an importer into my engine. I've removed the textures information and removed all these things ;;;;;;;. I'll try to get QUAD map going with texture support. |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Fri Feb 11, 2005 8:14 am Post subject: |
|
|
You are betetr off using Triangles. The quads just get broken down into triangles internally anyways. And all the info you need is in the dmf files. Just write a parser NOW and skip all that hard work you seem to be doing for nothing. |
|
Back to top |
|
|
banshee777 Member
Joined: 10 Feb 2005 Posts: 37
|
Posted: Fri Feb 11, 2005 9:02 am Post subject: |
|
|
Whats a paser? |
|
Back to top |
|
|
banshee777 Member
Joined: 10 Feb 2005 Posts: 37
|
Posted: Fri Feb 11, 2005 9:10 am Post subject: |
|
|
banshee777 wrote: |
Whats a paser? |
;;;; this?
I just use the option replace in notpade ; with space nothing. I'll add something else later..so i don't have to get rid of the ;;; |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Fri Feb 11, 2005 9:12 am Post subject: |
|
|
A parser... to read your dmf files, and exract the info you want from them. |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Fri Feb 11, 2005 10:16 am Post subject: Re: .... |
|
|
banshee777 wrote: |
I understand the 8 vertices now, i expected 16 for a cube. |
The vertices are shared. If you had 3(or 4) vertices for every triangle(or quad) your files / drawing / and ram requirements would go through the roof! |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Fri Feb 11, 2005 10:45 am Post subject: |
|
|
*cough* x file format and non-sharing of uv coordinates per vertex */cough* |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Fri Feb 11, 2005 8:13 pm Post subject: |
|
|
Paul-Jan wrote: |
*cough* x file format and non-sharing of uv coordinates per vertex */cough* |
hehe, Like I am going to cover the way MS f***s everythig up. They dig their own graves, they can dig themselves out... not me.
-edit- swearing. |
|
Back to top |
|
|
|