New Quake4 Map-Like Thing: "Strombine"

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Lunaran
Posts: 34
Joined: Fri Dec 31, 1999 8:00 am

New Quake4 Map-Like Thing: "Strombine"

Post by Lunaran »

Okay, this is really kind of a dumb release.

Image

I've been doing a bunch of experimentation on the side with this engine, noodling problems and issues we're all pretty familiar with. They all got lumped into one map through various circumstances, and I've decided that even though it isn't a proper map I'll release it anyway. Hopefully people can pick up some ideas from my methods. The map is called 'Strombine,' which I'll explain below.





The first thing I tackled was a realistic setting, including textures. That was just a personal learning process for me, to try and make something other than rusty metal look realistic in diff/norm/spec (and to make the rusty metal look better). I've drooled on sites like opacity.us for years so I finally emulated the ruined factory setting a little more closely. Concrete and brick walls with paint flaking off and showing the material underneath was especially fun, as was gathering tons of photos of rusty dumpsters and shit and building a library of rusty scratch marks to mask off effects on worn metal textures. Plus, paint wall diffuse + brick wall normal = instant painted brick!

Image Image

I could have done a hell of a lot more here, because the place is still nowhere near as dirty as it could and should be. I considered using models with vertex blends for flat floors to get a much better piles-o-dirt effect than I could with just decals but ultimately didn't bother. That's something for me to remember to try on the next project.

One of the engine issues I tried to tackle was how texture variety kills performance by splitting batches. The idea I wanted to try was to build the map in something slightly more akin to the Geometry Competition process, with fewer larger and more featureless textures to model forms, and liberal use of decals on top (paged for batchiness) to add all those missing stains and seams and construction tells to the brushwork that are normally baked into the textures themselves. The idea is you get a lot of variety instead of repeating the same 128x128 panels all over, and also more freedom with brushwork, because texture application would be much more fluid and receptive, because you place all the welds and edges by hand. The big green machines around the map were built the same way - two big painted-metal pages, put together over a myriad of different machine-looking shapes with some rusty edge-trim applied wherever necessary.

Performance-wise it worked great: the main room of this map has about 160k triangles in the worst corners but runs as if it had a third of that. Visually, though, it's painfully apparent that the map is just some big plain textures with decals all over them. I may simply have just not really taken the best approach with how I balanced one against the other. The very regular and functional architecture in this map was probably really not the way to test the idea but I had it on the brain and couldn't help it. Ultimately it weakened the map by making it look bare and empty. I'm still not fully convinced it's a COMPLETELY terrible idea, and I think it might work better when used in a more gregarious fashion - ie, more obvious 'sweeping' decals rather than fiddly edges, with zany nunuk-esque geometry that actually warrants this kind of liquid approach - and backed up by a little more traditional texturing.

I'd actually originally planned to try this in Lun3DM5 (which I am working on), but the Q3 engine doesn't really necessitate that at all (god, what a workhorse) and it was getting to be kind of laborious to apply all the decals. I always wonder why work in procedural textures is always on purely computer-generated textures when there's seemingly clear advantages to be had in a system that combines some artist-created material content with procedural alteration, affected by the geometry the texture is applied to ... but whatever. :)





Another issue was the perennial favorite, the lighting. D3/Q4 clearly can't do reflected light very well - bounce lights with shadows are kind of ugly and obvious and also expensive to layer, bounce lights without shadows look ugly and obvious for other reasons, and the ambient (to anyone with at least one eye open) just sucks.

Or does it?

Image Image

I was poking around the fragment programs the engine uses for light shaders (four image lookups per pass, woo!) and I came to the realization that, if the engine has to split batches per light anyway to set up new light origins for the vector math, it is to your artistic advantage to paint a unique image for every light source. You've gotta design the shapes of your rooms with the light volumes that'll go into them in mind, but if you do that right you can fit one or two ambient light volumes over the room with maps painted to match just the lights and geometry in that room. The ambient usually looks so horrible because it's a consistently even brightness throughout the volume (that and the lack of normal shading in d3, which q4 'fixes'), but by painting light images for them you can get the smooth gradations that you'd need to better simulate scattered light. If you've got brightly colored surfaces in the room you can even fudge in a little colored radiosity ala the Cornell Box.

You can do this for the direct light sources too (which you'll need far fewer of with the improved ambient), adding blurry shadows on the broad axis. I exploited this a bit in Strombine by rotating light volumes and putting them in long hallway-like spaces sideways to put the least-controllable axis of the light (the z) on the most linear axis of the room. Check out the lights in the three side rooms for good examples. Characters and smaller details still cast hard-edged shadows, but character shadows not matching world shadows isn't yet the cardinal sin Doom3 makes it out to be, so I didn't worry.

This worked out a lot better than the texturing thing, and I didn't even take it as far as I could - golden sunlight piercing into a room at an angle and throwing a localized bounce while the rest of the room is lit blue by scatter from the rest of the sky, etc.

An idea I'd like to try next is to ditch the normal shading on the ambient light and instead have the ambient.vfp multiply diffuse by its alpha channel, and paint in custom shading and fuzzy shadowing for each diffuse map in the alpha that would only be applied by that kind of light. Naturally this would only work with all custom textures.






The gameplay is nothing to really scream about. I was having fun in Doomscript trying to pull off some gameplay-related functionality other than scripted sequences you just sit and watch, and I had succeeded in reproducing a few things from HL2:
- the boxes that always have ammo in them when you open them (the marine box and lid with an invisible gui on a patch over the box that triggers the lid and an item spawner)
- big tempting cranks that slowly raise doors while you hold them down (same gui trick with sloppy state-based door and wheel behavior that responds to mouseDown and mouseUp)
- the laser-beam Combine snipers that shoot physics objects when they can't see you (hundreds of lines of terrifying Doomscript AI)

Image Image

The map has good examples of how all three are implemented - feel free to steal them.

Wanting to try the snipers out in a real map context influenced the design of the main room, which is why it feels so empty and spacious. (Making it a train station instead of a factory would have given the map a lot more reasons to look like it does.) I had an idea for tying the other two things into the same scenario - play it and see :) - so I rolled all three into the map and added some Strogg blundering around in what seemed like sensible places for good measure.

I had to explain visually why there were Strogg in this realistic factory, though, so I busted out the Q4PowerPlant set and added some burrowed-in bunkers that admittedly are also pretty much just like HL2. I acknowledge this with the tongue-in-cheek title "Strombine."

[ Download from lunaran.com (61 MB) ]

Put in a mod folder, run game with +set fs_game (I didn't include whatever random text doohickey you have to have to make it show up in the mods menu), 'map lunaran/strombine' and have fun.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

OMG! My jaw dropped.

Judging by the screenshot, this is singularly the most impressive thing I've seen done on the Doom3 Engine to date. I'm almost certain you mixed up the first screenshot with a photo or something.

I've been playing around with a lot of projected light volumes as well, but nothing on the scale of what you've done here, so I'm definitely interested in learning from some of your techniques.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
xgo
Posts: 35
Joined: Sun Nov 19, 2006 9:17 am

Post by xgo »

obsidian wrote:OMG! My jaw dropped.
same here :icon25:
obsidian wrote: I'm almost certain you mixed up the first screenshot with a photo or something.
same here :icon25:

will test this for sure
ALMighty
Posts: 542
Joined: Sat Mar 02, 2002 8:00 am

Post by ALMighty »

Damn! Didn't know you could do that with the D3Engine. I read the whole thing you wrote, but a lot of it went over my head. It's gotta be magic! :P
User avatar
seremtan
Posts: 36011
Joined: Wed Nov 19, 2003 8:00 am

Post by seremtan »

i really like the space you've created in the first shot, especially the way it's lit up, but what's actually filling that space is a tad disappointing

nice job on the HL2 look btw. ever considered simply mapping for HL2? no text scripting, all ents-based in-editor, hours of fun for the whole family
Lunaran
Posts: 34
Joined: Fri Dec 31, 1999 8:00 am

Post by Lunaran »

seremtan wrote:i really like the space you've created in the first shot, especially the way it's lit up, but what's actually filling that space is a tad disappointing
No arguments there. :/ I really just built an awesome ceiling and thought, "ok, now what"
nice job on the HL2 look btw. ever considered simply mapping for HL2? no text scripting, all ents-based in-editor, hours of fun for the whole family
I have, yeah. Getting assets into Source is a terribly unfriendly process, though, and while I miss lightmaps a lot and the HDR is really useful if you apply it right, I just know what I'm doing in this tech a lot more.

I'll be getting back to something more Doomy soon enough.
jjensson
Posts: 16
Joined: Sat Oct 21, 2006 12:35 am

Post by jjensson »

Wow! Great radiosity simulation! Never thought i will see something like that on D3...

:icon14: :icon14: :icon14:
jj
rgoer
Posts: 798
Joined: Sun Aug 17, 2003 7:00 am

Post by rgoer »

3 maps, 2 weeks

you already wasted like 3 days so far
4days
Posts: 5465
Joined: Tue Apr 16, 2002 7:00 am

Post by 4days »

good stuff lunaran, nice one :icon14:
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

rgoer wrote:3 maps, 2 weeks

you already wasted like 3 days so far
I'm going to venture a guess and say that all Lunaran has to do to get caught up at work is to replace those Strogg with Nazis. :paranoid:
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
rgoer
Posts: 798
Joined: Sun Aug 17, 2003 7:00 am

Post by rgoer »

hahaha something like that
Kat
Posts: 952
Joined: Tue Nov 14, 2000 8:00 am

Post by Kat »

That was pretty good, there were a couple of minor decal layer problems - where it looked like they were sitting on the exact same plane as the underlying surface - overall very nice. The sniper trap was a good idea and would make for an interesting gameplay mechinic - having to disable them *before* being able to get to the gate control and so on. AI seemed to be placed 'logically' as well and fitted in with the setting.

Lighting was damn good, it's finally nice to see someone thinking a bit more about how to use it without being lazy and sticking ambeint lights everywhere becasue they can't be bothered to work with the potential it has. Double thumbs up from that point of view.
[url=https://www.katsbits.com/tutorials#q3w]Tutorials, tools and resources[/url]
dichtfux
Posts: 571
Joined: Thu Feb 02, 2006 10:51 pm

Post by dichtfux »

Impressive.
[color=#FFFFFF][url=http://maps.rcmd.org]my FPS maps[/url][/color]
KungFuSquirrel
Posts: 56
Joined: Mon Nov 07, 2005 2:12 pm

Post by KungFuSquirrel »

snazzy indeed, mister lunaran. And with a title like that it'd be hard not to be awesome.
[url=http://www.button-masher.net/]www.button-masher.net[/url]
GODLIKE
Posts: 387
Joined: Tue Nov 30, 1999 8:00 am

Post by GODLIKE »

Wow.. Okay, tutorials/strategies for painting light textures for ambient lights, please. That whole idea is dead secksy.
User avatar
hemostick
Posts: 203
Joined: Wed Feb 14, 2001 8:00 am

Post by hemostick »

Needs some sort of haxx0red q3map to automatically bake some light textures ;)
Method
Posts: 222
Joined: Thu Feb 28, 2002 8:00 am

Post by Method »

Respect, Lunaran. Downloading...

-Method
Lunaran
Posts: 34
Joined: Fri Dec 31, 1999 8:00 am

Post by Lunaran »

GODLIKE wrote:Wow.. Okay, tutorials/strategies for painting light textures for ambient lights, please. That whole idea is dead secksy.
Well, this one isn't for an ambient light but the principle is the same. You've got a light source in a room, and that light is going to spread out from the source in volumes. The trick is visualizing what direction you can project a 2d image from that will let you most closely map those volumes.

Take the first side room. With the main light source (the skylight) directly above, it'd be impossible to project an image from above that fits the way the light spreads out as it comes down. But from the side:

Image

all the angles of the shape of the room and the shadows they cast can be seen at once. Thus, we take the room from the side:

Image

and through the magic of photoshop we make a light image that looks like this (minus the white outlines, those are just for visualization):

Image

This is mostly radial/linear gradients and some masking. The dark bit in the lower right corresponds to the machines running the length of the room, and contributes some softened darkness to the corners where you can see behind/inside them. Make a light shader out of it, and rotate the light volume in the editor so that the top is turned to the side, and the projection happens from the direction we want. You can see the softness of the shadow against the far wall in the first image now.

You can now make a second z-image with dark stripes for the columns or a big dark splotch for that bridge in the distance, because those features fit the second axis of the volume the best. Fog brush on the ceiling to mimic some volumetric glare, give the ambient light in this room a similar (but much more blurry) treatment to fill the black shadows in, and you're sold.

That's probably not the best explanation since it's 4am and I'm rushing, but I think it helps visualize the idea. Rooms with more funky shapes can be achieved with multiple volumes fitted to the room shape, and you can paint dark areas that line up between two images so that when the lights overlap they add over each other to hide the seam.

I actually had to do this for the room in the example, since at the far end that bridge divides the room vertically, so I need a second light volume there with the same image cropped to the top half, so the volume doesn't need to extend below the bridge (which would be pointless overdraw as it's supposed to be dark down there. There's also a bounce light above the bridge shining back up at the ceiling, because having a big white concrete floor right there so close to the skylight would be reflecting a bunch more light straight back up.

So, yeah. Lighting!
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

Whoa! That's totally thinking outside of the box. I never really thought of using projection lighting the way you have here. I usually think of them projected from the direction of the light source.

If you have any more time, please continue sharing your techniques.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Strahlemann
Posts: 35
Joined: Fri Jan 13, 2006 6:45 pm

Post by Strahlemann »

Thanks a lot for sharing your techniques.
Finally Lighting for Doom3 gets really sexy.

Great work.
Method
Posts: 222
Joined: Thu Feb 28, 2002 8:00 am

Post by Method »

Lunaran: Is that your custom Radiant color theme or it's for the WolfensteinRadiant?

-Method
Lunaran
Posts: 34
Joined: Fri Dec 31, 1999 8:00 am

Post by Lunaran »

I did this at home in Q4R. I just hit ctrl-I in photoshop to make the grid view black. :)

WolfRadiant probably still looks like the radiant you're used to.
Method
Posts: 222
Joined: Thu Feb 28, 2002 8:00 am

Post by Method »

Hehe, I see. I'm using Super Mal theme which is gray and very relaxing for the eyes. But those themes can be encoded into program only by a programmer. Although you can change the colors yourself, you cannot save it as a theme.

-Method
cha0s
Posts: 28
Joined: Sat Jul 12, 2003 7:00 am

Post by cha0s »

Impressive work! Very nice graphics and gameplay wasn't bad either. It's a bit short tough :P

I just read through your .script. Seems the Doom 3 Engine has some more shortcomings than I realized :)
GODLIKE
Posts: 387
Joined: Tue Nov 30, 1999 8:00 am

Post by GODLIKE »

Lunaran: Thanks for detailing that technique.. cool stuff. :icon31:
Post Reply