DGL
https://delphigl.com/forum/

Planes to Verts
https://delphigl.com/forum/viewtopic.php?f=19&t=4311
Seite 1 von 1

Autor:  Stucuk [ Fr Jul 01, 2005 02:52 ]
Betreff des Beitrags:  Planes to Verts

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.  

Autor:  BTierens [ Fr Jul 01, 2005 07:24 ]
Betreff des Beitrags: 

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)

Autor:  Tokter [ Fr Jul 01, 2005 14:54 ]
Betreff des Beitrags: 

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.

Autor:  luketheduke [ Fr Jul 01, 2005 16:31 ]
Betreff des Beitrags: 

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

Autor:  Stucuk [ Sa Jul 02, 2005 18:03 ]
Betreff des Beitrags: 

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)

Autor:  LarsMiddendorf [ Sa Jul 02, 2005 18:47 ]
Betreff des Beitrags: 

There is a tutorial at flipcode: http://www.flipcode.com/articles/articl ... data.shtml .

Autor:  Stucuk [ Sa Jul 02, 2005 22:05 ]
Betreff des Beitrags: 

http://folk.uio.no/stefanha/MAPFiles.pdf

more compleate doucment.

Autor:  Finalspace [ Mi Jul 13, 2005 14:44 ]
Betreff des Beitrags: 

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.

Autor:  Stucuk [ Mi Aug 24, 2005 09:23 ]
Betreff des Beitrags: 

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.

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/