Things
#12438 posted by Kinn on 2013/03/04 11:05:25
Ok, i did a test to see how TyrBsp coped. I noticed that TyrBsp doesn't support the -group switch, so I had to move all my terrain brushes to worldspawn. When I compiled it, it worked ok with no leaks :}
However, I then tried Bjp's bsp on the same map (after moving all func_group brushes to worldspawn), and that also compiled it with no leaks this time.
With the terrain in a func_group though, Bjp's bsp created a leak (yes, the -group switch was enabled). I can only think that this is to do with that changing the order at which the brushes get processed, and the fact that it is in a func_group isn't actually the problem here, in general (but i'd have to do more tests to confirm).
As a related question - Tyrann, do you plan to support func_group in future?
Vondur - cheers :} It was born out of my frustration with Radiant's crapness when trying to do simply trisoup "heightmap"-type terrain. The original plan was just to do heightmap stuff with tri prisms, but it soon became obvious that I may as well go the full wallop and do the tetrahedron thing for arbitrary meshes.
A little part of me still dies though whenever I look at it in game with r_drawflat 1 enabled. T_T...I wish there was a way of improving that mess.
#12439 posted by sock on 2013/03/04 11:13:50
You don't need to have a special map format.
Stage 1: Load all brushes into map, group them together and make them a special brush entity like for example "func_mesh"
Stage 2: Add a spawnflag switch "solid" to the "func_mesh" entity. If the mapper does not want the mesh to be solid then create a simple brush mesh behind for collision and map leak testing and mark with a "skip" surface that the compiler understands.
Stage 3: Compiler takes "func_mesh" and treats the set of brushes as detail. If solid, add them directly into the Hull mesh. Make sure the light compiler understands the new entity "func_mesh" and casts shadows on itself and surrounding brushwork.
Stage 0: Allow the compiler to take brushes and validate and check the brushes before. make sure triangles, valid planes etc. Save this checked version in a map format ready for import later.
This pretty much describes the process for creating a misc_model mesh in Q3 using a compiler and light program like q3map2.
Things
#12440 posted by Tyrann on 2013/03/04 11:50:19
Sock: if you want to represent your mesh using the verticies and not planes in the map file, then a new format will be needed. I think this is what the others are getting at.
Kinn: Adding func_group support right now.
Hrm
#12441 posted by Tyrann on 2013/03/04 11:54:16
Now that I think about it, three point plane definitions... are triangles. *facepalm*
So it could look just like the current map format, although the semantics would be completely different inside a "func_mesh" entity.
I.e. a compiler that was not aware of the special meaning of func_mesh would barf due to the wierd structure of the "brushes" contained within.
Not Necessarily
#12442 posted by SleepwalkR on 2013/03/04 12:00:24
It would just create planes and then recompute the vertices from those, with all the errors inherent in that process.
An aware compiler would just skip this computation and take the vertices from the plane points.
Sock
#12443 posted by Kinn on 2013/03/04 12:14:50
Stage 1: Load all brushes into map, group them together and make them a special brush entity like for example "func_mesh"
So this still requires us to create a collection of tetrahedron brushes (or whatever) to represent this "mesh"?
I suppose this would work if all the unseen faces of the "mesh" brushes are flagged with a special texture that tells the compiler to discard them immediately. Then, the compiler will have a proper mesh of just the visible faces as a starting point, equivalent to as if it had just loaded in, say, an external .ase mesh.
#12444 posted by sock on 2013/03/04 12:37:42
So it could look just like the current map format, although the semantics would be completely different inside a "func_mesh" entity.
I.e. a compiler that was not aware of the special meaning of func_mesh would barf due to the wierd structure of the "brushes" contained within.
Sounds perfect, all the brushes would be contained within the entity definition inside of the map file. So it can safely be ignored by editors/compilers that do not understand.
So this still requires us to create a collection of tetrahedron brushes (or whatever) to represent this "mesh"?
This is where a stage 0 would be needed. A compiler would have to triangulate all surfaces and then convert all marked surfaces into a tetrahedron mesh and save it as a map file. All of the back faces should be marked with something like terrainskip.
Another solution is to create the terrain from brushes and mark all non-visible sides with the terrainskip that the compiler can get rid of later.
The ultimate benefit of this system would be that the terrain brushes are treated like detail, they can be solid/clip and can cast / receive shadows.
#12445 posted by sock on 2013/03/04 12:51:19
An example work flow:
* create terrain brushes (rough shapes)
* Group brushes into a func_mesh entity
* Use Trenchbroom to vertex edit the brushes
* Mark all backside surfaces with terrainskip
* Change spawnflags to suit application (solid/shadows)
* Pre-compile the brushes into a special mesh (faster)
* Or create mesh at compiler runtime (slower)
It would be good to have a pre-compile stage of the terrain brushes as this will speed up the final compile of a map.
Also could we have a compiler feature that has AI clipping? Brush surfaces that can be included in the later clip hulls but are invisible normally.
Before Anyone Jumps To Work On This
#12446 posted by SleepwalkR on 2013/03/04 12:55:53
Please let me think about how this would best be supported in TrenchBroom. Preferably, the method of creating a mesh would be compatible to creating Quake 3 meshes, because that would make it easier for me to add Quake 3 support.
Now I'm Completely Confused
#12447 posted by Kinn on 2013/03/04 13:07:39
Surely the benefit of meshes is that you use a dedicated tool like Maya to model them (which is designed specifically for this kind of work), and don't have to worry about buggering about with tetrahedrons and manually flagging backfaces to be culled and whatnot?
#12448 posted by sock on 2013/03/04 13:08:48
The process above is how I created my Q3 map Pyramid of the Magician and here is the source if you are curious to see what it looks like in an editor. (will probably need Radiant to look at it)
I think it would be easier for most people if the terrain mesh could be created from brushes and vertex edited into the shape they want. The real trick to this whole process is the compiler not the editor.
That Was
#12449 posted by Kinn on 2013/03/04 13:08:51
more a response to sock than sleepwalkr
#12450 posted by JneeraZ on 2013/03/04 13:15:48
Kinn
If the editor/compiler support for this is added, I think OBJ import will be absolutely essential to making it useful.
#12451 posted by sock on 2013/03/04 13:26:10
Surely the benefit of meshes is that you use a dedicated tool like Maya to model them
The beauty of the Q3 ASE model format was it could be created from brushes or in a modelling package. Forcing the process to only work in a modelling package would shut out people who only have the editor.
Using the compiler to convert a mesh into a brush mesh (tetrahedrons) would bring all the terrains into a single pipeline. Plus the compiler could mark all back surfaces of the tetrahedron with a terrainskip. One other solution is the mesh is in a special external file (like ASE) which will require editor and compiler support.
The thing that is lacking from Q1 terrains is a detail flag, an optional clipping HULL and proper shadow support.
#12452 posted by Kinn on 2013/03/04 14:42:19
If all the special compiler is doing is turning a mesh into a bunch of tetrahedrons anyway, then I'm not sure what real advantage you get from a special compiler.
Anyway, who here uses Unity? I'm wondering if there's any audience for this maya->quake unity project that i've made.
I Have Some Basic Knowledge
#12453 posted by ijed on 2013/03/04 15:31:58
of Unity, though I'm not currently working on anything with that engine.
The power of it is that it's free, if you include the logo at the start.
Have you tried throwing it at your phone or a browser yet?
Well
#12454 posted by Kinn on 2013/03/04 15:44:34
It's currently just some crap i bashed together as a script i can use via the unity editor.
So that others can use this, I think the best thing then would be for me to turn this into a standalone app that you can just run without needing to install Unity. I'll try to get on this asap.
Of course it's overkill doing something like this through Unity. I just did it like this for my own convenience at the time because it imports almost any mesh format already, already has an interface for me to input settings, options etc...
Actually
#12455 posted by Kinn on 2013/03/04 15:58:03
I won't be able to use unity's mesh importers at run-time, and I ain't writing my own (I'm too busy right now). It'll have to stay as editor-only. I can make it a bit more user-friendly though.
The Unity editor is free to download and use though, so anyone can use it if they don't mind installing it.
Maps
#12456 posted by Kinn on 2013/03/04 19:24:59
by the way, if anyone wants to have a gander at the .map of that terrain shizzle, to see what it looks like, here is that cavey test thing:
this one has all the brushes as worldspawn and doesn't seem to leak:
https://dl.dropbox.com/u/61424391/Quake%20Stuff/bdwtest07a.map
This is the same geometry, but the terrain is in a func_group for convenience. Leaks in txqbsp currently. (yes I am using -group).
https://dl.dropbox.com/u/61424391/Quake%20Stuff/bdwtest07.map
Mesh
#12457 posted by Tyrann on 2013/03/04 23:00:45
When I wrote above I was thinking of just using the triangles of the mesh in the .map format, not having full tetrahedrons. Anyway, a few good ideas here. :)
Recently...
#12458 posted by quaketree on 2013/03/05 11:14:28
I was thinking about messing around in mapping for Quake. I last played around with it about 2002 or so and was discouraged by the engine limitations and the communities (then) general disdain for newer engines at the time and the maps that required them (I was using TxQuake I think but don't hold me to it, it was a GLQuake spin off) so I stopped trying as everything I was doing was going to kill the original engine in R-Speeds alone and so many comments here were purist in nature that I didn't consider it worthwhile to go on. I see now that that opinion has changed considerably so I'm willing to look into it again.
The problem that I am facing now is that I've forgotten pretty much everything regarding spawnflags, triggers and the like (I still have a what I consider to be a firm grasp on the basics of brush manipulation and r-speeds and all of that).
Is there a basic guide that is still out there that covers the basics? Consider me as a newbie that needs everything spelled out in excruciating detail.
I searched through this entire thread and what I am seeing is a lot of dead links (For example using "triggers" or "guide" as search terms).
Google isn't much help as just about everything seems to be sending me to USGS type sites regarding earthquakes.
I have already installed Hammer 3.3 and the Quake One configuration utility, have the wads and have refamiliarized myself with the software changes from 1.6 although I haven't as yet bothered with the more recent tyre-tools 0.5 as I'm not getting that far into it as of yet.
Any suggestions would be appreciated.
Doesn't
#12459 posted by ijed on 2013/03/05 11:21:50
Baker's quake adapter have a mini-guide? For WC you can also search the Forge tutorials which were beginner things on setting up stuff like doors, keys, counters and so on.
Might well be 404 though. I'll have a search once I get to a computer.
In Fact
#12460 posted by ijed on 2013/03/05 11:23:23
I seem to remember WC 1.6a had some docs included inside for Quake.
#12461 posted by quaketree on 2013/03/05 11:33:36
I didn't see a guide for Quake adapter that addressed the entities in detail but I will look again. It assumed a basic knowledge of flags IIRC. I used to have that written down or remembered but after over a decade I've forgotten much of that.
Quakeforge.net is pretty sparse and really seems to also assume a knowledge base that I currently don't have anymore.
I didn't think of WC1.6 but I suppose that I could install it and see what's there. I'm pretty sure that I have a copy buried somewhere.
And To Add...
#12462 posted by quaketree on 2013/03/05 11:39:29
The PQ stuff is now gone, which was my first idea in this search for information. Many of the dead links went to things like Necros's guide which is what I probably was going to reference first anyway.
|