|
Czg
#4645 posted by aguirRe on 2006/01/07 14:57:51
Take a look at http://www.gamers.org/dEngine/quake/QDP/QPrimer.html
In your case, you have a plane normal in positive z-direction positioned at z=-160. You just need three points on that plane that don't line up and are arranged clockwise (I think) so the normal points in positive z-direction, something like:
(1, 0, -160) (0, 1, -160) (-1, 0, -160)
Btw, the three points don't need to be vertices in the brush and AFAIK seldom are.
More Spiders
#4646 posted by Mike Woodham on 2006/01/07 16:07:10
Has any got a working link to Requiem's Redback Spider?
CZG
#4647 posted by than on 2006/01/07 19:35:54
I thought that the way Quake worked is that you needed all the planes that define a convex volume (i.e. a brush) to be able to resolve the Quake .map face definitions? You need to find the intersections of the planes to get the vertices - which is why you can't define a concave volume with a brush.
I don't really know much about this, but I wrote a .map compiler for the game I wrote at uni, which did pretty much exactly what you want (I think). It converted .map planes into polys/tris strips easily renderable by OpenGL.
Can't explain the maths, because I have completely forgotten it, but I still have the source if you are interested.
Actually, I just looked at the source, and don't understand it at all. Don't know how I wrote it :(
What are you trying to do anyway?
Aha, Maybe This!
#4648 posted by than on 2006/01/07 19:51:26
Here is the function I found. Sorry if it doesn't render correctly:
bool LdfCompiler::getPlaneIntersection(CPlane& a, CPlane& b, CPlane& c, CVector& v)
{
//if denom is 0, then the planes are parallel (hence no intersection can be found between them)
float denom = CVector::dotProduct(a.n, CVector::crossProduct(b.n, c.n));
if(denom == 0) return 0;
//calculate intersection point
v = (a.d * (CVector::crossProduct(b.n, c.n))
+b.d * (CVector::crossProduct(c.n, a.n))
+c.d * (CVector::crossProduct(a.n, b.n)))
/ denom;
return 1;
}
The function takes 3 planes and a reference to a vector. The planes are resolved to calculate a point and the point is stored in the vector. The other functions called are functions of the vector class I implemented and should be pretty obvious.
LDF is the map format I used for my game. It stands for Level Definition Format. Amazing!
I might have missed what you are looking for completely, but I hope this helps.
I got the maths from a textbook called real-time rendering I think. There is also a really good Half-life format map compiler writing guide that I used for sorting out some problems I had, but I don't know if I still have it.... it is possible. Email me if this sounds helpful.
Er
#4649 posted by than on 2006/01/08 01:30:32
don't bother emailing, since I haven't put it on my website or here or anything. Just post in here again.
Anyway, you need three planes to get one vertex. You need all the planes of a brush to be able to get all the vertices. I think there can be certain cases where a vertex can be defined twice by two or more different sets of planes (not sure of this though) so if you want to convert a brush into tris for some reason, you might need to check all the vertices are different.
Also, since I am a shit coder and my maths is crappy, the function I posted is probably less than optimal.
"Maths"
#4650 posted by . on 2006/01/08 04:00:27
WTF? Math.
You Say Tomato, I Say Tomato
#4651 posted by than on 2006/01/08 05:04:02
Doesn't really work in text, does it?*
Anyway, "maths" is what we say in England, "math" is what Americans say. I wonder if they also say "mathematic" instead of "mathematics".
Unless I put it like this "You say tomayto, I say tomarto". Works best in phonetic script, but this doesn't support rich text, and most people don't have the phonetic script fonts installed anyway.
The American Says:
#4652 posted by . on 2006/01/08 05:19:12
Mathematics
Than
#4653 posted by metlslime on 2006/01/08 15:35:57
Anyway, "maths" is what we say in England, "math" is what Americans say. I wonder if they also say "mathematic" instead of "mathematics".
We say "math" which is short for "mathematics." I can only assume you say "maths" which is short for "mathsematics."
More Like
#4654 posted by pjw on 2006/01/08 16:12:59
mathsemantics
lol
*shoots self*
Hipnotic Spawn Problem
#4655 posted by Scragbait on 2006/01/08 19:53:32
I'm working on my Quake Travail maps and am using Hipnotic spawn code (func_spawn) to bring in some of my enemies. This is needed to keep bmodel counts down by replacing teleport brushes with direct spawns.
I have a problem in that if I want to spawn a floating scrag, it just drops until it hits the ground. This results in them not being where I want them and if they drop into lava or water, they are effectively invisible.
Is there anything I can do to stop the drop? Any workarounds can't use bmodels otherwise I'd just go back to the old spawning method if I have bmodel counts to spare.
Scragbait
#4656 posted by Mike Woodham on 2006/01/09 12:56:26
I've just had a quick look at hip2m1.bsp (Ancient Realms), and the scrags in that particular map are spawned in the traditional manner.
I've had a quick look at the func_spawn code and it's noticable that scrags are not included in the random spawn function. Also, there is a reference to MOVETYPE_NONE; in the section that deals with the non-random code.
I don't know enough about the code to go any further but perhaps the above is a pointer to someone else to help you (if this was of any help anyway?)
Model Precache
#4657 posted by Ankh on 2006/01/10 05:16:03
Saddly i have hit the limit yesterday :(
I think the reason is I have too many triggers and func_walls in the level (used some in light supports). I have two questions:
Can I combine func_wals from nearby places in the map into one bigger func_wall?
Do trigger_counter and trigger_relay eat up a precache slot everytime I use them in the level?
Answers
#4658 posted by than on 2006/01/10 06:54:35
Can I combine func_wals from nearby places in the map into one bigger func_wall?
YES! As long as they aren't too far apart. Sometimes the engine can start to render them badly if the bounding box becomes too big. They might become invisible from certain angles etc. Typically if they are in the same area and not separated by any walls, then you can group them.
Do trigger_counter and trigger_relay eat up a precache slot everytime I use them in the level?
trigger_relay does not use a model precache, since it is just a point entity. However, I think the counter does. All the other solid triggers take up a precache too.
If you don't want a trigger (for example, a trigger_secret) to take up a precache slot, you should set flag 1 (in Worldcraft it's labelled "entity only"). This way, no model is precached and no touch field will be spawned.
Thanks Than
#4659 posted by Ankh on 2006/01/10 07:33:39
This really helps a lot :)
I didn't know about the "entity only" solution
Ankh
#4660 posted by negke on 2006/01/10 07:40:01
you can make the trigger_counters point entities, too. ;)
Great!
#4661 posted by Ankh on 2006/01/10 07:46:17
I was worried already that I have to cut something out. Yesterday I have panically deleted some triggers to get below the limit :)
Than, I Need Some Clarification
#4662 posted by czg on 2006/01/11 01:33:28
What is going on here?
v = (a.d * (CVector::crossProduct(b.n, c.n))
+b.d * (CVector::crossProduct(c.n, a.n))
+c.d * (CVector::crossProduct(a.n, b.n)))
/ denom;
Are you dividing a vector? How the hell does that even work? Is / denom; the same as * (1 / denom);?
This is why I don't like operator overloading. :(
CZG
#4663 posted by than on 2006/01/11 04:50:31
I've forgotten completely. I don't even remember what denom was.
Here's the CVector declaration for the / operator.
inline CVector operator / (float s) const { s = 1/s; return CVector(x*s, y*s, z*s); }
So er, yeah, dividing a vector I suppose.
I think I assigned it that operator because some tutorial in a book or on the net had done that, and I really liked operator overloading.
I don't think I ever understood the maths for this part of the compiler, I just accepted it and got on with the other shit :)
Why are you interested in this stuff, btw? Are you making a game of some sort, writing a tool to export from .map to .3ds/whatever or something more sinister involving dancing badgers?
Anyway, like I said before, you can have the source if you like. The game and all the really badly written documentation can be found here: http://than.spawnpoint.org/files/clayer_full.zip (10mb, sorry, it includes the game and some other shit.)
SHIT! I just looked in the zip and found probably the exact file that you need. I looked it up on google just now and found a link for you http://folk.uio.no/stefanha/MAPFiles.pdf
Hehe
#4664 posted by than on 2006/01/11 04:52:34
the google results also included the file linked in a reply to a question I asked on Flipcode, back when it was running.
Pharaoh Type Monster
#4665 posted by Mike Woodham on 2006/01/12 12:21:25
Time dulls the mind, again.
Which Quake level had the pharaoh-looking monster that rose out of the ground?
Mike...
#4666 posted by generic on 2006/01/12 12:47:00
Do you mean the dudes with the staves in Dissolution of Eternity?
Generic
#4667 posted by Mike Woodham on 2006/01/12 14:16:25
You got it, thanks.
Mike
#4668 posted by Kell on 2006/01/12 15:45:20
those 'dudes with the staves' are bad models with utterly abominable animations. The skins are pretty good, but that doesn't save them. Please don't put them in a map.
Quake Monster Creation
#4669 posted by than on 2006/01/12 17:13:50
So, are there any good tutorials about this on the net?
|
|
You must be logged in to post in this thread.
|
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.
|
|