Convex Hate

May 11th, 2008

The problem I’m facing is a seemingly tough one. What I want to allow ToeTag to do is to import triangulated meshes from a modeling program (in my case, Cheetah 3D) and then break that mesh down into convex chunks when it writes the MAP file out for compiling.

It’s tough because I can’t quite come up with a routine that will work for any arbitrary mesh. I can get it to work on some meshes but not others. I think it’s worth the effort though because when it works it will allow so much more expression in my level design.

Coding, coding…

New ToeTag Feature

May 10th, 2008

Soon. Heh, sorry! No, it should be done within the next few days assuming that things go as planned. It’s forced me to clean up my 3D code somewhat though and I’m kind of getting happy with how it works/looks now. I used to have a bunch of functions where I could ask a plane which side of it a vertex was sitting on. I’ve condensed that down to one now:


-(ESide) getVertexSide:(TVec3D*)InVector
{
float distance = [self getDistanceFrom:InVector];
float delta = fabs( distance - dist );

if( delta < = ON_PLANE_EPSILON )
{
return S_OnPlane;
}

if( (dist - ON_PLANE_EPSILON) < distance )
{
return S_Front;
}

return S_Behind;
}

Not very exciting, I know, but I haven’t posted anything in a few days and was feeling bad. :) I hope to be back soon with cool shots of a kick ass new feature!

I don’t know why WordPress sucks SO MUCH at posting source code but if anyone knows how to make that look nicer, I’m all ears. Unbelievable that it’s 2008 and it doesn’t “just work” yet.

Remix Progress

May 4th, 2008

Remix Progress

This is the starting area. It’s not complete but this is the direction that it’s headed.

glDrawFastAsHell

April 29th, 2008

I took some time off from my remix level to look at the ToeTag source again. The editor was getting a little choppy when the entire level is visible and I wanted to see what I could do to fix that.

The answer, it seems, is glDrawArrays. Holy crap! It takes some massaging of the data each frame to get it into contiguous arrays but, man, once it’s in there you can blast polygons to the video card. I can now work on my level with the whole thing visible. There are lots of places I can leverage glDrawArrays still so it will only get faster in the future.

Once I get as much as I can drawing through arrays, I’ll post a new version of ToeTag.

Very happy!

Grill Club for Men

April 20th, 2008

So I’ve never owned a grill before. I know that calls my manliness into question but it’s true. My wife and I went out today and bought one because we figured it was time.

As we’re loading it into her truck, a guy comes up and offers to help out. I gladly accept and once we’re done he compliments me on the grill.

As we’re pulling out, another guy walks by and upon seeing the grill, gives me a big thumbs up and a smile and jokingly calls out, “When’s the barbeque!?”

We get home and I ask my neighbor to give me a hand lugging it into the backyard. He does and then we have a conversation about the grill, it’s specs, and we left off with my being tasked to report back to him later as to how this grill performs.

I feel like I’ve gained membership into some sort of club that I had no idea existed.

E3M4 Progress

April 13th, 2008

A quick shot of what I’m doing in my E3M4 remix. What lurks in the towers above?

What lurks above?

Work Is Getting Crazy

April 8th, 2008

Real life is impeding on my Quaking so I’ll be back in a bit. We’ve got a few weeks of crazy hours coming up. Be back when I can!

E3M4Rmx - Progress

March 31st, 2008

Here’s a shot of my in-progress remix of E3M4. It’s coming along but there’s a lot of work still ahead of me.

-: CLICK FOR SHOT :-

Quick Groups & Prefabs

March 30th, 2008

I finished implementing Quick Groups today in ToeTag. It’s really interesting to me how I figure out the features that the editor needs simply by using it. I was constantly having to copy things like light fixtures or complicated wall structures and other things made of many brushes/entities. This sucked a lot because I had to reselect everything from scratch.

With ‘Quick Groups’, if you are diligent from the start of your map, you’ll be sitting pretty once you reach critical mass of detail. Every level designer knows what critical mass of detail is. That’s the point in the development of your map when you’ve established the visual theme and now you’re heading for the finish line. You’re working on gameplay and new areas but the visuals are more or less established. With ‘Quick Groups’ you’ll be able to copy complex brushes/entities from earlier in your map without a hassle. You select one brush/entity, hit CMD+OPTION+G and then all the other brushes/entities that are part of that quick group are selected.

It does smart things too. If you copy a group of brushes/entities that are part of a quick group, the new brushes/entities that are pasted into the map will be placed into a new quick group automatically so they will be selectable as a group as well.

Creating a quick group is easy as well. Select the brushes/entities that you want to be grouped together and hit CMD+G.

This is hugely powerful once you get the hang of it. And I’ll go even further and say that it’s more powerful than a prefab system. There, I said it.

Prefabs are a great idea in theory but when it comes to Quake levels you tend to customize things in every level. Your prefab library tends to morph to keep up with your current levels requirements. So you might as well use quick groups and work within the level itself.

And let’s face it - level designers like designing levels. They don’t want to use a bunch of stuff that someone else built. They want to build it themselves.

Sure, sometimes you need something standardized like a slipgate or a teleporter. If that’s the case, just open another map in ToeTag, copy and paste what you need. Prefabs be damned!

BSP Blues

March 30th, 2008

I decided to try something out yesterday. I’m trying to figure out how to get an OBJ file to integrate with ToeTag in a seamless fashion. I had many ideas but then came up with the one that I felt was ideal : have QBSP simply insert those triangles directly into the resulting BSP! Why fool around with trying to create convex shapes from the OBJ file or extruding the polys backwards or other techniques that can get messy?

Well, because the QBSP code is horrifically complicated. Well maybe not for some people but for me, it is. I can’t make heads or tails out of what Carmack is doing in there. Global variables everywhere, obscure variable names, oddly structured function calls - ye gods. So that idea is dead. I thought that I was close at one point as I had it reading the triangles in and I was inserting them into the BSP but lots of stuff was breaking and they weren’t rendering and … well, just forget it.

I’m going to do a more traditional implementation of it now. ToeTag will read the triangulated mesh into the editor, break it down immediately into a set of brushes and then you can work with it freely.

I will offset the pain of this somewhat by implementing a feature that I will call “Quick Groups”. You’ll be able to select a set of brushes, hit CMD+G, and then those brushes will work as a group. If you double click on one, it will select all of the others in the quick group. Any imported triangle meshes will automatically go into their own quick group. Should work well enough I suppose although I really would have liked to have gotten the QBSP solution working. I guess that’ll have to wait until someone who speaks Carmack better than I do can take a look at it.