News | Forum | People | FAQ | Links | Search | Register | Log in
Mapping Help
This is the place to ask about mapping problems, techniques, and bug fixing, and pretty much anything else you want to do in the level editor.

For questions about coding, check out the Coding Help thread: https://www.celephais.net/board/view_thread.php?id=60097
First | Previous | Next | Last
Spides 
Thanks for the info ijed, madfox and generic. 
Preach 
ok cheers, I�ll give it a try. I�m using Max and photoshop and qME only as a converter so there shouldn�t be a problem. oye, I meant a single texture map with multiple pictures inside it mapped onto the different models / objects . . . I�ve studied this stuff and I still don�t know the terminology :/ 
Czg 
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 
Has any got a working link to Requiem's Redback Spider? 
CZG 
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! 
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 
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" 
WTF? Math. 
You Say Tomato, I Say Tomato 
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: 
Mathematics 
Than 
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 
mathsemantics

lol

*shoots self* 
Hipnotic Spawn Problem 
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 
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 
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 
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 
This really helps a lot :)
I didn't know about the "entity only" solution 
Ankh 
you can make the trigger_counters point entities, too. ;) 
Great! 
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 
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 
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 
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 
Time dulls the mind, again.

Which Quake level had the pharaoh-looking monster that rose out of the ground? 
Mike... 
Do you mean the dudes with the staves in Dissolution of Eternity? 
Generic 
You got it, thanks. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.