I found some code that does that - I don't really have the time to code it
myself, as this project is due in a couple of weeks, and other classes are
taking up way too much time <sigh>. Interesting enough, the RMF has both -
the actual vertices, and the plane coords (for lack of a better term). I
think the map file is more universal, and isn't the RMF a Valve thing only?
Were it up to me, I'd just bloat the file and put the vertices in, but I'm
not familiar with the compilation process. It can't be just size reduction
alone that is the reason for this. My VMF can be 8MB or 12MB, who cares
about a couple of extra MB of file size.


----- Original Message -----
From: "Christopher Harris" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, November 14, 2007 9:51 AM
Subject: Re: [hlcoders] How to get actual vertices from map/rmf file?


To get a vertice you have to find the point of intersection of the planes
it
is part of. Like a vertice in a corner would be part of two side planes
and
the bottom/top plane. But it is useful to have this size reduction. A
cylinder or odd shaped brush benefits from it, as does a very large map
with
many brushes.

Chris
----- Original Message -----
From: "Ook" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, November 14, 2007 12:43 PM
Subject: Re: [hlcoders] How to get actual vertices from map/rmf file?


I saw those - the BSP one was good, but there were things the author
wasn't
certain about. Does Valve publish an official BSP format guide? The map
file
doesn't store vertices, neither does the vmf - those coordinates you see
are
not actual vertices, there are a more "efficient" way to store the plane
definition - it uses three coordinates for a four sided polygon, for
example, instead of storing the actual vertices (go figure?). Makes the
file
smaller, but you have to do some math to get actual vertices. It's not
difficult, but it's more work then I have time for right now. The BSP
docs
say "vertex arrays", but I'm not sure if it has an array of vertices, or
actual vertex arrays (they are not quite the same thing). It also might
have
the normals in it, so I might spend a few hours extracting stuff from the
BSP and see if that will give me what I want. The BSP data is already
clipped, where the RMF data includes all of the planes that would
normally
get clipped. Otherwise I'll go with the RMF, since it not only has actual
vertices for the planes, but has texture information in the same block,
and
texture u/v coords as well. It doesn't have the normals, but that should
be
easy to calculate. For my purposes, a few thousand extra polygons won't
make
any difference, because performance really isn't an issue.

I'm curious why they made the decision to not store actual vertices in
map/vmf files? The file size reduction really isn't significant, and the
files are highly compressible. Having actual vertices in the vmf would
make
it easier to work with outside of hammer.

----- Original Message -----
From: "Kevin Ottalini" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, November 14, 2007 12:55 AM
Subject: Re: [hlcoders] How to get actual vertices from map/rmf file?


This is a good description of the BSP:
http://www.geocities.com/cofrdrbob/bspformat.html

It's probably a little out of date with the release of EP2 and TF2.

a good VMF description is here:
http://developer.valvesoftware.com/wiki/VMF_documentation

VMF is easy to get the coordinates, just open it in wordpad.  I would
export
the .RMF to .MAP then open the .MAP in wordpad to get similar
information
(or you can import the .RMF to VMF).



----- Original Message -----
From: "Ook"
To: <[email protected]>
Sent: Tuesday, November 13, 2007 8:22 PM
Subject: [hlcoders] How to get actual vertices from map/rmf file?


Does anyone know of an easy way to get vertices from a map/bsp/vmf/rmf
file?
The rmf, and I think vmf, don't actually store vertices, they store 3
sets
of xyz coordinates and I'm not sure how they get to/from the actual
face
it
represents. I'm looking at the format for the rmf file, and if I
understand
what it is telling me, it stores:

  int             number of vertices
  Vector[]        vertex coordinates in clockwise order looking from
front
of face
  Vector[3]       3 points defining plane of face (VHE simply uses a
copy
of the first 3 vertices)

( from http://extension.ws/hlfix/rmf.html )

It also stores the texture u and v axis, which is way cool, and if it
really
does have actual vertices, then I can calculate the normals for the
vertices.

I'm guessing that when it says vertex coordinates, it means the actual
vertices of the face, not the "3 points defining plane of face", as
those
follow what appears to be the list of vertices. Anyone have experience
with
this, and know if extracting these vertices from the rmf is the easiest
way
to get actual shape vertices?


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to