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

Aktuelle Zeit: So Jun 16, 2024 08:29

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



Ein neues Thema erstellen Auf das Thema antworten  [ 9 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: Planes to Verts
BeitragVerfasst: Fr Jul 01, 2005 02:52 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
Im wondering how i could turn a list of planes into vertex's. (tryed searching google for help bit it was of no use)

Code:
  1.  
  2. // brush 0
  3. {
  4. ( -64 64 64 ) ( -64 -64 64 ) ( -64 -64 56 ) chateau/test 0 0 0 0.500000 0.500000 0 0 0
  5. ( -56 -56 64 ) ( -64 -56 64 ) ( -64 -56 56 ) chateau/test 0 0 0 0.500000 0.500000 0 0 0
  6. ( -48 -64 64 ) ( -48 64 64 ) ( -48 64 56 ) chateau/test 0 0 0 0.500000 0.500000 0 0 0
  7. ( -64 -64 64 ) ( -56 -64 64 ) ( -56 -64 56 ) chateau/test 0 0 0 0.500000 0.500000 0 0 0
  8. ( -64 -64 64 ) ( -64 64 64 ) ( -56 64 64 ) chateau/test 0 0 0 0.500000 0.500000 0 0 0
  9. ( -56 16 -68 ) ( -64 16 -68 ) ( -64 -112 -68 ) chateau/test 0 0 0 0.500000 0.500000 0 0 0
  10. }
  11.  

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Fr Jul 01, 2005 07:24 
Offline
DGL Member

Registriert: Fr Aug 13, 2004 17:43
Beiträge: 60
Wohnort: Belgien
First, a plane doesn't has broders so if you want a plane to be changed into a vertex, you will also need coordinates of the borders (you only need 3 x and z coordinates and you can calculate the y coordinate with your plane).

The general equation of a plane is: ax+by+cz+d = 0 with (a,b,c) is the normal vector of the plane.
If you have such an equatation you can calculate y from x and z with: y = (a*x+c*z-d)/b (b <> 0)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Fr Jul 01, 2005 14:54 
Offline
DGL Member

Registriert: Fr Dez 19, 2003 14:27
Beiträge: 107
Wohnort: Indianapolis, USA
Well, if you have a list of planes then you can calculate where they intersect. The intersection of two planes gives you a straight line. Then the intersection of this straight line with the next plane yields your vertex.


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Fr Jul 01, 2005 16:31 
Offline
DGL Member
Benutzeravatar

Registriert: Fr Mai 14, 2004 18:56
Beiträge: 804
Wohnort: GER/OBB/TÖL-WOR/Greiling
seems to be the .map (half life 1) way of life. try searching fpr VHE, half life map format, BSP map format or similar. and yes, you'll have to get the intersections. i also always wanted to decrypt this format, but never really started with it. so you can expect me to be glad to help you. i could also get you some basic things (cubes, cylinder, triangle....) out of my old antique Valve Hammer Editor if you need some samples. :D

_________________
Bild

"User Error. Replace User and hit Continue."


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Sa Jul 02, 2005 18:03 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
Well i gave up. Couldn't be bothered searching any further on the net (loads of results have nothing to do with what i want to do) and also the 'actual' bit of changing the list into verts flys over my head (tho i get the principul). So i cheated and took the data from the compiled bsp.

The sample above comes from gtkradient. (VHE is much easyer to use but due to the differences in the .map format layout the texture position, rotation etc is lost with a conversion)

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Sa Jul 02, 2005 18:47 
Offline
DGL Member
Benutzeravatar

Registriert: Sa Dez 28, 2002 11:13
Beiträge: 2244
There is a tutorial at flipcode: http://www.flipcode.com/articles/articl ... data.shtml .


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Sa Jul 02, 2005 22:05 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
http://folk.uio.no/stefanha/MAPFiles.pdf

more compleate doucment.

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Jul 13, 2005 14:44 
Offline
DGL Member

Registriert: Mi Okt 16, 2002 15:06
Beiträge: 1012
I build a long time ago a full .map Compiler which Calculated the Planes to Vertices with a lot of features.
The src lies on my system @ home.
I post when i am @ home.


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Aug 24, 2005 09:23 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
incase anyone is still interested the following demp from Delphi3d.net can convert planes to verts Demo

Think its in map.pas or mapdata.pas.... its in one of them.

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


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


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 14 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.234s | 17 Queries | GZIP : On ]