|Serious Sam 2 Tools Interview with Davor Hunski
|Posted on May 11, 2004
The Serious Sam 2 technology was first introduced at Game Developers Conference 2004, and the community has been booming with speculations about the new engine and the integrated toolset, Serious Editor 2.0. After hours of grievous torture, the will of Croteam
lead programmer and designer Davor Hunski
finally cracked and he spilled the beans on the new toolset. Davor tells us all about lighting, texturing, mesh editing, script language, multiplayer and more.
Seriously! - First off, tell us a little bit about yourself and what you do at Croteam.
Davor Hunski - My title is lead designer and programmer, but after setting up premises for Serious Sam 2 design (assisted by Davor Tomicic Tome) I hardly get any time to deal with design any more. I am coding for most of the time. So for the large chunk of project time, Tome is leading design and production. I am responsible for leading development on editor's tools and game content (vehicles, enemies, weapons, .....)
Seriously! - What are some of the coolest new features in Serious Editor 2?
Davor Hunski - Huh, that's a hard one. There are so many new cool things that I can't answer with few words. But for starters...
- There is a completely new, custom made GUI: I mean all controls - buttons, text/number input, radio buttons, tab controls, drop down controls, sliders, list controls, color buttons and pickers, gradients, graphs), icons, progress bars, tool bars, title bars, documents, views/splitters, dialogs, drag-and-drop, docking, tool tips, menus, command processing, customizations (skins, keyboard rebinding, property extraction), file requesters, timers, mouse and keyboard handling, everything is completely written by us to serve our desire of how a great GUI should look like. I hope that you have a clue of what writing a complete GUI from scratch means. That's HUGE effort, but it was worthwhile. If I desire so, I can now write new type of control in matter of minutes. It is that easy.
- Geometry can be imported/exported/reimported from/to third party 3D programs using an intermediate file format (it is easy to write a plug-in for any 3D modeling program).
- We also implemented complete mesh editing so you can edit mesh geometry and mapping in the editor. We implemented some of the most commonly known tools and will continue adding new tools in the future, wishing that editor's mesh editing capabilities could in some areas match those of established 3D packages.
- We developed our own module responsible for dealing with realistic physics. That's huge! Hard thing to do, tweak, optimize, etc... But a very necessary thing to have these days.
- A particle system that can be used in two ways: as procedural particles or emitters. There is a complete set of user friendly GUI tools (graphs, gradients...) that can be used to create limitless fancy effects. Effects can be edited in real time (while the effect is playing). Very powerful.
- Interpreted language. Extremely C++ -like, but without .h files. Actually, by declaring certain functions as "native" they become executed as C++ - I think that this extremely useful feature has never been seen before. Makes mod programming very easy.
- Script debugger (still WIP) supported by a text editor that supports syntax highlighting/breakpoints/checkpoints.
- Powerful GUI enhancements: nice file browser systems supporting history, favorites, split screen copying, thumbnails, sorting, viewing models/textures in info tips, file finding, opening objects in internal/external editors..., console variable explorer, output window, command bar, paint palette (brushes, foreground/background colors, color swatches, sliders...), guides and easy interactive object/vertex snapping/aligning tools, history/favorites for properties of all editing tools (WIP)...
- Editors. These are awesome! We have all kind of editors: mechanism editor (physics/collision setup), animation editor (camera paths, animating objects like bones, lights...), skeleton editor, destruction editor, mesh editor, model editor, world (entity) editor, font editor...
- Customizable/modifiable gui. Besides docking and skins (customizable fonts, colors, shortcuts), the user is able to extract controls (drag-and-drop) and organize them in favorite dialogs (WIP). So if you are interested in a certain property of an entity, just drag it out.
- Simulations. You can run more than one simulation in editor. For example, you can test-run two levels and examine from god position what is happening. In the real time you can change the speed of the simulation, move entities around or change their behavior or pause it and then explore the properties of each entity (great for debugging). Also, multiple simulations are great to simulate both server and client(s) inside one application.
So, we want editor to serve for long line of Croteam's next generation products.
Seriously! - The new Serious Engine is obviously quite a leap from the previous version of the engine, built almost completely from scratch. What new features are you most exited about in terms of expanded level design capability?
Davor Hunski - Well, there is nothing else we can do to make level design easier than we did. We built mesh editing tools that will help you do things you want. However, you have to understand that if you want to be up to date with polygon count used these days, level design is MUCH harder, the requirements jumped drastically. While few years ago certain house could be simulated with tens/hundreds of polygons, now it must be with thousands/tens of thousands. You have to sit down and model it. Then you have to map it. We implemented nice mapping tools, but you still have to do the work. And you must map it keeping in mind what is good for performance (what graphics cards like). Hard work, but worthwhile.
Seriously! - About the editor itself, tell me a bit about what sort of tools can we expect in terms of level geometry creation and polygon manipulation?
Davor Hunski - What I can do is to dump list of currently supported tools.
Tools used in mesh editing:
Import/reimport/export, create vertex/polygon, draw polygon, create open/close paths, vertex randomization, primitives (box, cone, cylinder, grid, sphere, terrain), smooth shifter, normal/edge/path/rotate extrude, mirror, bevel, inserting vertex, common/spike subdivide, linear/rectangular/radial/bcg clone, triangulate/flip/flip horizontal/flip vertical, cut/weld band, rotate +-90, vertex/normal move, split/merge polygon, jitter/smooth/magnet, cut, align, find quads, paint/displace, rail/bend/volume/connected/rnd select, and weld/weld average/unweld vtx/unweld polygon edges/unweld polygons.
Tools used in mesh mapping:
Texture moving/stretching/rotating in 3D view, merge all/current map, round u/v, auto map u/v/uv, fit map u/v/uv/auto, and arrange map. Of course, mapping vertices can be also manipulated with the tools mentioned above (that apply for UV editing).
Seriously! - Can you explain how texturing will work in Serious Editor 2?
Davor Hunski - Since meshes in SE2 are rendered in only possible way (using shaders and UV maps), you have to create UV maps for them. There is no other way. It is an over-do when looking from artist's point of view how texturing has been performed in old SE (each polygon had its own mapping), but there is no escape from that fact. So you must create UV maps manually. Of course, you can map each polygon to have its own mapping, but that will be extremely unoptimal and you will lose performance big time. So idea is to map the meshes in the most optimized way (to get as few seams as possible). Then you will have BIG frame rates. There are few rules to follow, we will create documents to explain them.
Seriously! - How has the ability to have fully dynamic lighting affected game design? Is the lighting system still the same, with a light entity, or has it changed? How does shadow baking work?
Davor Hunski - The question is, what do you mean by "fully dynamic lighting", because you can't imagine how many meanings that has. Often people not involved in cutting edge technology programming don't have a good knowledge (because these things are hard to understand) about dynamic lighting (do you mean lighting or dynamic shadows?). About lighting, we use spherical harmonics, brilliant technique that will display multiple colored lights onto object that passes near by. I can't see any better solution for dynamic lighting. Dynamic shadows is completely another area of problems. There are few solutions in existence today, of which neither one is good enough to be used as general shadow rendering solution in an general purpose real-time game (in my opinion, at least). Some of them are too CPU intensive, some of them are too memory driven, some look chunky. We have some kind of dynamic shadows (and we will probably have all of the most important algorithms in the engine some day) but Serious Engine 2 is not built upon the idea of having truly dynamic shadows on everything. We still prefer (as a general useful case, and the case used in our games) shadow maps as a starting point for building game visuals.