What Are Planes And What Does This Setting Really Do?
#1904 posted by mankrip on 2015/11/12 16:34:34
While Trenchbroom and all other editors represent brushes as 3D meshes with polygons and vertices, brushes are actually defined as a set of faces created from intersected planes. Each intersection of at least three planes generates a vertex in 3D space, and since each brush must be convex, each face will have at least three vertices, and the lines between each pair of vertices will never be colinear with the lines between any other pair in the same face. Thanks to this, the orientation of those planes can be safely calculated from the position of three of its vertices in 3D space, and their edges are resolved by getting the intersections of those planes during compile time. ID chose to use this method because it reduces the filesize, is faster to render in software, and is safer against T-junctions.
#1905 posted by JneeraZ on 2015/11/12 16:47:57
"is faster to render in software"
How does the MAP representation improve software rendering speed?
I Didn't Meant To Start This...
#1906 posted by primal on 2015/11/12 17:06:49
Plane Definitions
#1907 posted by Kinn on 2015/11/12 17:08:10
ID chose to use this method because it reduces the filesize
Fun fact: In DoomEdit (The Doom 3 editor), id chose to reduce the filesize even further by defining a plane with just one vector and one scalar, representing a normal and a distance from the origin. This meant that every single brush face that was not aligned with an orthogonal axis was represented using imprecise float coordinates.
Further to this, opening and saving a .map file would cumulatively introduce float imprecision into these brush planes, including ones the designer had not even fucking touched in that session, meaning over time, the map they had been working on started to develop microscopic cracks in areas that were long since considered finished. A Doom 3 map literally decays over time as you work on it, along with the designer's sanity.
#1908 posted by JneeraZ on 2015/11/12 17:58:40
Why on earth would they care about MAP filesize on Doom 3? Geez... Old habits I guess.
WarrenM
#1909 posted by mankrip on 2015/11/12 18:30:13
Because it follows some essential principles used by the software renderer: convex brushes, convex polygons, and implicit texture mapping (which plane normals are used for).
The MDL format, on the other hand, uses things like direct texture mapping (each vertex is directly assigned to a texel's coordinates).
I said the method is faster to render, not the format.
#1910 posted by JneeraZ on 2015/11/12 19:04:54
The renderer is reading the BSP so ... it's a glob of triangles, same as the models are. That's all I'm saying. The source format for the MAP file has nothing to do with anything renderer related.
#1911 posted by Lunaran on 2015/11/12 20:33:25
The software renderer didn't see the world as triangles originally, did it? wpoly and epoly were totally separate paths.
Yeah I Thought
#1912 posted by Kinn on 2015/11/12 21:06:11
the software renderer traversed the bsp tree and rasterised the convex faces, which were not necessarily triangles.
#1913 posted by JneeraZ on 2015/11/12 21:21:34
True, and the epoly had that optimization we talked about before where it would only render the vertices if a model got too far away.
However, that doesn't change the fact that the source file format has nothing to do with how the software renderer works. QBSP shreds the brushes into a tree ... after that the source format is irrelevant.
#1914 posted by czg on 2015/11/12 23:00:54
In fact in the actual bsp file the plane struct is a normal vector and distance (and a type field), so the three point version of a plane disappears completely after qbsp.
What Mankrip Says
#1915 posted by anonymous user on 2015/11/12 23:04:27
Primal
Of course, you are right. What I wrote is nonsense. I will rephrase this in the TB2 docs. Thank you for pointing it out!
Looking Forward To 2.0
#1917 posted by Fan on 2015/11/13 17:27:04
Keep it up, looking forward to having HL1 support out of the box in TB 2.0, this has some serious potential to ignite the HL1 modding community back up again like it's 1999 ;)
Tb Current Dev Branch Fail
#1918 posted by xaGe on 2015/11/18 10:45:55
Haven't compiled the tb develop branch in a while and its failing with thousands of the same wx-3.0 Wdeprecated-declaration warnings where previously there where none.
#1919 posted by Spirit on 2015/11/18 14:26:51
Those are just warnings, the error is missing pandoc.
make[3]: pandoc: Command not found
Thank You Spirit.
#1920 posted by xaGe on 2015/11/19 05:01:04
Appreciate that. I was up very late when I attempted to compile and wasn't thinking clearly.
Ugh Why Did You Do This, Doom 3
#1921 posted by Hai on 2015/11/20 19:38:42
Re #1907 by Kin on 2015/11/12 17:08:10:
I've read this post today and just fired up the Doom 3 Editor and looked at a freshly saved map file.
And oh my, this is real. They are really using the numerically unstable way of saving brush plane information using just a normal vector and a distance value.
Why on earth would ANYONE do that? Move the whole level geometry forward and back a bit a few times, and you're _guaranteed_ to have everything that's not perfectly straight entirely screwed up! That's lunatic!
O_O
X_X
Yeah Shit Is Fucked Up
#1922 posted by Kinn on 2015/11/20 20:11:32
I think Sikkpin or someone modded the editor to use the quake-style plane format and the problem of course just went away - you could try to dig up some info about that.
D3
#1923 posted by necros on 2015/11/20 22:49:33
I lost a couple of maps to that feature before I realized that you're really meant to so complex get with models.
What Does SW Think Of This?
Would this be something that could be supported in the future by TB?
https://www.youtube.com/watch?v=rJzguNJsivM
Could Be
but I have no interest in developing plugins for Unreal. If anyone wants to do it, I'll support it, but I won't do it myself.
TB2 FGD Loading
I am having trouble loading FGDs for Hipnotic and Rogue into TB2. Has anyone else tried these in this build? Maybe I am doing something wonky. Trying the FGD versions from Quaddicted archives. wanted to ask before submitting to Github.
Error and then crash:
Unknown entity definition class @Main (line 8, column 1)
TrenchBroom-Win32-2.0.0-36e49c4-Release
Looks Like It's The FGD
Cannot load this in TB1 either same error although it doesn't crash.
Submit An Issue Report And Attach The File Please
|