Serious Sam 2 Tools Interview with Davor Hunski Page 1 - Mesh editing, texturing and other editor features Page 2 - Scripting, physics, multiplayer
by Earthling
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.
suite :
Seriously! - From what we've heard, you've moved away from sector-based spacial partitioning. How does the new visibility system work?
Davor Hunski - Yes, I suppose (since we haven't finished it yet) that the new visibility system will be based on a mix of hierarchical occlusion culling, distant rejection and level of detail techniques (assisted with some procedural rendering).
Seriously! - Could you tell us about the new scripting language and how it affects level editing? What's an example of something cool that can be done with the new scripting language that was impossible in the previous version of the Serious Editor?
Davor Hunski - There are actually two levels of scripting in SE2. There is "script" scripting that is very C++ -like (intended to be used by programmers for adding new things and modifying existing ones) and there is so-called macro scripting. Macro is simple but very powerful high-level batch-like language intended to be used by level designers. It allows you to control gameplay events and do some fancy scripting easily. It can be used to control scripted scenes or cut sequences. You can issue commands to entities and listen what they have to say about it. It is still edited in text form, but you have suggestions all over it so you can almost use just the mouse to program a macro. Macro editing text control is integrated with the 3D view, so you can drag and entity from world and drop it onto variable name in text and variable will get assigned. You can also invoke text variable value pointing and see the entity that is contained in the focused/selected/highlighted variable.
Seriously! - With the added dynamics that advanced physics bring to the game, how has level design been affected? Will mappers be able to specify the mass of each object and create destructible architecture? How will water work, and can we have strong wind or shockwave effects?
Davor Hunski - "Realistic" physics is awesome ground for some superb game design. Of course, it has some limits you must keep in mind, but brings a LOT! I hope that we will be able to use the new physics in some good stuff for the upcoming game. Regarding the second part of your question, yes, you can alter mass, and yes, you can create destructible architecture (you actually have a complete editor just for that, but be careful with what you mean by destructible architecture! You can simulate it, but I think that you will like never see real-world-like architecture destruction with all of its consequences in computer games), water will look very real, objects will sink/raise extremely realistically, though don't expect water to behave realistically when spilled. Again, you can add wind that will "drag" dynamic objects in some direction, but is that all you thought of? Because for now, wind won't bend trees and houses...Shockwave effect, again, what exactly do you mean by that? You can make player feel like it is there is shockwave going on, you can also support it with some new fancy gfx features, but don't expect tremors that will "actually" physically shake ground by moving it around and then expect buildings to collapse due to the shaking effect.
Seriously! - What about world models? Will statues, trees and other high-polygon scenery still be constructed in a third-party modeling program and imported from there, or can you do build them from start to finish in the Serious Editor?
Davor Hunski - You can select between the two as you noted. Most of our models are build in third-party modeling programs, but that's due to the fact that Serious Editor 2 didn't have modeling abilities finished on time and our artists and designers are used to third-party modeling programs. Also, it is hard to match modeling quality of established modeling applications because they have been all about modeling for years. Still, I have high hopes for our modeling abilities and they would be my tool of choice if I were to do some levels.
Seriously! - Will per-polygon collision exist for the world geometry, or will a hitbox system still be utilized in some areas?
Davor Hunski - You can do both and more. You can use rendered geometry for collision, you can make a shell model that will be used for collision (less polygons than the actual rendered mesh) or you can "glue" collision primitives (spheres, boxes, cylinders, capsules) and form collision shell from them (fastest).
Seriously! - Tell us about the plug-in system. How does it work, exactly?
Davor Hunski - I am not the best person to talk about that one, but if I am right, anybody could add anything to editor. Any kind of new renderable, editor, control, dialog, modeling/mapping tool, anything. That means that you guys can shape Serious Editor 2 by yourself, however you wish. Someone could add procedural starts rendering (or curved surfaces), someone could add a texture processing editor, someone an "easy" texture bake setup control, someone an "edge smooth" tool and all of them could be shared with all the rest of us. Limitless possibilities. We will help you and encourage you to do technology additions.
Seriously! - What about the real-time editing, have you found it helpful in fine-tuning the level balance? Will it be possible to host a multiplayer game and edit the map while the players are playing on the server?
Davor Hunski - We still haven't experienced the full range of features that real-time editing brings, although I am sure that we will do so. Imagine playing a level and noticing that a stone is in the air (as in not exactly aligned with the ground) or that a mapping seam is visible. You can go to god mode, move the stone or fix its mapping and continue playing. Great stuff. Still, things like that are not allowed on the server because content is not transferred to clients upon game startup (too time consuming) and would slow down gameplay heavily. This idea implicates several superb gameplay elements, but also brings tons of problems. We didn't explore the possibilities too much, but we could do so in the future.
Seriously! - Speaking about multiplayer, are you planning on including other multiplayer game modes apart from co-op and deathmatch? What about dedicated Linux servers?
Davor Hunski - I am still not sure what will be in the game in terms of multiplayer abilities. I think that Linux servers will happen though (they surely are planned, but we don't have time to do them just now).
Update - Alen Ladavac - With SE1, we had problems with this on the technical side. The network architecture with syncs couldn't possibly run a Linux server with a PC client without bad syncs happenning. Now that we have that completely reengineered, there is no real reason for not having a Linux server, except time spent in closing the port. So I'd say that there will _definitely_ be a Linux server. Not together with the game, but sortly after. The code is easily portable and we have basic engine facilities working on Linux for quite some time already - without gfx/sound of course - so this shouldn't be a problem. Whether we will be allowed to distribute maps and models with it for free or you will need to have a copy of Windows version CDROM when installing it - we'll see. I'd like it to be completely free, but I believe even the second choice is not that bad.
Seriously! - It's been mentioned that Serious Sam 2 will most likely support auto-download of maps. What about other user-made content, such as entire mods and player models/skins? Also, are there plans for an auto-update system for patching the game?
Davor Hunski - Again, auto download of maps and user-made content like player models and skins is planned, but we haven't implemented it yet, though we will do so in the future. We would also like to have auto download of scripted code, but that's hard thing to do, as we'd have to prevent viruses and such to make sure that the users are 100% secure.
Update - Alen Ladavac - Regarding autodownload - again, since there are no syncbad problems, and since the world scripts have been made completely safe, it is also a planned feature. But I wouldn't bet on it making the release date. If so, it will be added in a patch. Autodownload of mods, on the other hand, is a bit of a security problem, and probably won't happen so soon. Even though it is planned, it will need much more to be safe enough for an average user.
Seriously! - Furthermore, will it be possible to have multiple users editing the same map over a network, like you can do in some commercial CAD programs, for example?
Davor Hunski - No. At the beginning we have had high hopes for it and started designing the technology, but due to the realism of this world and the unstretchiness of time (don't believe them when they say that time can be altered, because it can't), we had to abandon that idea. After contemplating on that idea for some time, I don't see it as a very useful feature for game design (as I did before) any more, and if I would ever go into designing technology again, I wouldn't heavily build upon that idea. When you hear about it, though, it sounds very impressive.
Seriously! - Is there anything else you would like to add?
Davor Hunski - If you are still reading this, than you are a very patient man. Thank you for that. I hope that we won't disappoint you with the new technology and game of ours.
That concludes our interview with Davor Hunski of Croteam. Unfortunately, we were not able to get any screenshots of the editor yet, but look forward to screenies and possibly even video feed of the editor in the next few days - you'll see it first on Seriously!
http://www.seriouszone.com/images/ [...] shot01.jpg
http://www.seriouszone.com/images/ [...] shot05.jpg
http://www.seriouszone.com/images/ [...] shot08.jpg
Message édité par the gentleman le 12-05-2004 à 08:34:58
---------------
-= Fight =-