Archive for December, 2007

CSG Subtraction

Friday, December 21st, 2007

I knew I was close yesterday and I was right. I was able to get this working today after fixing a long standing bug in my splitBrushWithPlane routine (it would sometimes create extra faces - now I know why and it won’t do that anymore). The subtraction routine is good! It will subtract the selected brushes from the world and it only subtracts them from brushes that are actually being intersected by the selected ones. This means that you don’t have to hide the rest of the level before subtracting. Want to drill a hole through your level? Go ahead! It’ll work.

A small peek:

csgsubtraction.jpg

Progress

Thursday, December 20th, 2007

I added a few options to the texture browser this morning. You now have various filters you can apply to the browser:

ALL
Just like it is now - shows every texture loaded.

IN USE
Only shows textures that are actually being used in the level. This is hella useful for optimizations and reducing the number of textures used. Just this morning I noticed I was using several textures that almost looked alike. So you select one, hit SHIFT+T to select it everywhere in the level, and click the other texture that looks like it. Bingo, the first texture leaves the “in use” view and you’re using one less texture!

MRU
Or “Most recently used”. Shows you the textures that you have been clicking on in the browser, with the most recently clicked near the top. This is great for promoting consistency in the level. If you use the MRU filter as you texture your level you can reuse textures pretty darned efficiently.

I also started into brush carving but it’s not working just yet. Hopefully will have screen shots of that soon!

Edges

Wednesday, December 19th, 2007

Sometimes I make myself happy. When I started ToeTag I was determined not to have the traditional set of modes that most editors have. You know: brush, face, edge and vertex. When you go into each mode you can only select those kinds of things and none of the others.

With ToeTag, I’ve managed to implement all of those editing modes but in a completely modeless way. When you select a brush, it highlights but then it also draws it’s edges and vertices. Selecting those will highlight them and you can drag them freely. As for faces, SHIFT clicking any face in the world will select it and you can select as many as you like without having to select the brushes first. This is wonderful for texturing an area as you don’t need to be concerned with which brush owns which face. Just hold down SHIFT and grab the faces you want to work with.

Edges started working this morning. I implemented them in a somewhat cheeky manner. I allow you to click an edge in the viewports and then behind the scenes the editor selects the 2 corresponding vertices that make up that edge. As a final step, the drawing code will draw a thick highlighted line between any 2 selected verts that make up an edge. So it appears as though there is a real edge selection/dragging mode built in but in reality you’re just selecting and dragging vertices in pairs rather than individually.

Usability Features

Monday, December 17th, 2007

I added a number of usability features that will speed up the mapping process this morning. These are small things but they really add up.

CMD+T will find the texture on the currently selected face in the texture browser and scroll it into view.

CMD+C will copy the selected face to the clipboard, including all of it’s alignment information.

CMD+V will paste that information onto all selected faces. This is a quick way to match up a group of faces so that they all look identical. (of course, copy/paste still works for entities - the editor is smart enough to know the difference between entities and faces when it sees them on the clipboard)

SHIFT+T will select all faces that have the same texture on them as the currently selected one. If no faces are selected, all faces that match the currently selected texture in the browser will be selected.

This stuff doesn’t sound complex or all that interesting but it makes a world of difference when you’re actually editing a level.

Sample Level

Sunday, December 16th, 2007

I’m working on a replacement “start” level for Quake that I will probably bundle with the editor when I release it. It’ll be one of the sample levels. I’m really enjoying using ToeTag now and it’s quite good as a level editor. It has some rough edges, no question, but on the whole it’s very good. Much better than anything I used back in the day, that’s for sure. Here’s some shots of the sample level as it stands:

testlevel1.jpg

testlevel2.jpg

testlevel3.jpg

testlevel4.jpg

As you can see from the visual evidence, the editor is solid at this point. This level was made completely in ToeTag, from scratch.

It’s true what they say about eating your own dog food. Making this sample level has uncovered many holes and problems with the editor that I might not have noticed otherwise. The more I use it, the better the code gets.

Next up are some major improvements for the texture browser. It needs it.

Small Update

Friday, December 14th, 2007

I got my mip mapping code working in the WAD save routine (that sort of code sucks a lot more when the images are palette based) so now everything exports properly and looks good inside of Quake. Over the weekend I’m going to finish up the WAD management system and try to round out some of the other rough usability edges that I have remaining.

My goal is to have an editor that works decently enough that I could work on a level over the week of xmas. Kind of an aggressive goal but that’s half the fun, right?

Here’s a shot of a test level that I made using ToeTag. It’s using a WAD that was exported from ToeTag so you can see that it doesn’t mangle anything and the mip maps look good. Hooray!

preview1.jpg

WAD Management

Thursday, December 13th, 2007

I took a walk into the WAD code this morning and decided to get that system up and running. The editor could already load WADs (obviously) but now it can also save them out. The menu for textures includes an option to “Append WAD…” which will load the textures in a new WAD and merge them into the existing set you have loaded. You can then save this newly merged WAD out to disk under a different name. And it works! Well, once I add code to do the mipmapping it will, but the basics are in place at least.

I’m going to add some basic features like importing textures from external files (PNG, BMP, etc), exporting textures to individual files, and deleting textures from the loaded set. This should give enough flexibility that you could create your own custom WADs pretty easily!

Face Dragging

Wednesday, December 12th, 2007

I got smart face dragging working yesterday. This is the nice thing that QERadiant does where you click in the 2D view and drag and it figures out which face to pull automatically. In ToeTag you’ll hold down CONTROL and COMMAND to activate this. Here’s a video of it in action:

I’ve never embedded a QuickTime video before. Let’s hope this works!

Back from New York!

Monday, December 10th, 2007

My lovely and talented wife had a couture jewelry show in New York so I went along as her resident pack mule.  Hey, those boxes aren’t going to get themselves up 3 flights of stairs! The best part was that I got to wear a tuxedo for the first time in my life. I dare say, I clean up real good!

While she was doing her show, my traveling companions and I hit the town a little and saw some of the sights.  I’ve never been to New York so everything was new to me.We stopped by ground zero to see what we could see (which isn’t much since they have most of it blocked off from viewing now).  I also rode the New York subway a few times, saw the inside of Grand Central Station, marveled at the incredible diversity in the architecture, experienced the insanity that is Times Square, saw the Rockefeller center Christmas tree and visited the “Top of the Rock”.  What a view!  My god, it was intense.  We were so high up that Central Park was simply a medium sized chunk of the yawning vista before us.  I have no idea how a city that large continues to function successfully but it makes me happy that it does.

One of the best parts of New York was the food and the feel of the place.  We spent our first night with friends at this tiny little corner store/restaurant near their apartment.  It was incredible!  The food was amazing, the atmosphere in the place was pitch perfect, and I had one of the best times of my life.  Simply amazing.  We left very late and very drunk.

On our last morning, we stopped into a diner near the hotel and it was perfect.  It was that perfect New York diner that you see in the movies.  A little grungy, a little dingy, but filled with character and uniqueness.  As an added bonus, the waitress was rude.

Huzzah, New York! 

I didn’t think I was going to like New York all that much but I have to admit that it started to grow on me. I came to respect and admire it and, yes, even love it in some ways. I can’t wait to go back again.

Key/Values

Tuesday, December 4th, 2007

Key/value editing is in and working now.

entitykeyvalues.jpg

Works the way I want it to after a lot of futzing.  If you have multiple entities selected with the same key but differing values, you get this sort of display: 

entitykeyvalues2.jpg

See how the value for angle is “??”  That means the value is different for each func_door selected.  If you change the “??” to something else, then all selected entities will get that value.  If you don’t touch it, they all retain their original values.Next thing to do is entity creation from scratch.  Got a few ideas on that one…