Natural Selection 2 is the sequel to the popular Half-Life mod Natural Selection. It is built on our own engine and will be distributed through Valve's Steam platform.

Report article RSS Feed Effect Editor Part 1

The team take you through their recently built effect editor for their engine.

Posted by LongBottom on Apr 7th, 2009

One of the difficulties with having such a small team is finding enough time to do everything that needs to be done. As the only engine and tools programmer, this can become a problem, since often my work can hold up other people's ability to make progress. While almost every other tool or system has been developed far enough that people can be productive, special effects is one area that hasn't gotten any of my attention thus far. This week I decided to rectify this and create the effect editor that we'll use to create all the special effects for the game.

Tools often fall into a "level of effort" category, where the amount of time they can take is unbounded; there's always one more feature you can add to make it easier to use or more powerful. Since there are lots of other tasks to be done before shipping, I decided that 5 days was the most I could afford to spend creating the effect editor. I think most people (including myself) would consider this a ridiculously aggressive schedule, but nobody said independent game development was easy!

Since this was such a short task, I decided to document the major stages of development as I progressed. I started working on the editor on Friday morning and it's now Monday afternoon. A power outage on Friday put an abrupt stop to development, but things are progressing smoothly otherwise.

The first step to building anything is creating a design. For tools, I always like to borrow ideas from other similar applications, synthesizing the best ideas from each into something even better. My hope is that by drawing on established user interface conventions, my tools will feel very familiar and immediately usable. This also speeds up the design progress by transforming it into more of an editing progress.

As a first step, I grabbed screen shots of the features I like from 3D Studio MAX and Photoshop � two tools that most artists are intimately familiar with. Normally I would have also grabbed shots from the effect editors that come with other game engines, but I didn't find anything I thought would be helpful in the ones I looked at. Typically at this stage I'd also talk to effect artists who had experience with making effects for other games, but I felt like I already had a general concept of the high level advice they'd give (e.g. make everything animatable) and I could solicit the detailed ideas later.

Like our level editor and viewer, I'm building the effect editor using our engine and the wxWidgets user-interface library. To get the basic framework of the effect editor up and running, I put together existing components with a little bit of copy and paste from our existing tools.


A solid undo feature is one of the most important components of a usable tool, and in order to make sure it worked great I started on this right away. Undo can be a little tricky, but fortunately I'd already built a good system for the level editor. I took the existing system, generalised it a bit and incorporated it into our engine library. Now the level editor, the effect editor and any tools I build in the future will all use the same system.

The next step was to start building the concept of time into the tool. Every effect editor I've seen is based around the concept of emitters which release particles into the world. The properties of the emitter and particles can be varied over their lifetimes to create all types of different effects, ranging from smoke to fire to unearthly magic Most effect editors use time varying graphs to represent and edit these properties.

While I wanted to incorporate this type of editing into my effect editor, I also wanted "key frame" based editing like you'd find in a tool like 3D Studio MAX or Maya. Since I'm still developing the tool, I don't know how well this will pan out, but my expectation is that this will make editing certain types of effects much faster and more natural. The video shows this type of key framing for the position of an emitter with a slider for scrubbing through the frames of the animation.


From this point I had a lot of details to fill in for the big functions I'd put in place. This included creating a UI for typing in values for properties, displaying the key frames on the time bar, and (optionally) rendering the trajectory of the emitter over time.


The next task was putting in the traditional curve editing user interface. In this UI you can see a graph showing the value of a parameter over time. The levels tool in Photoshop has a great graph editor that allows you to easily move, create and delete points with just the left mouse button, so I implemented a very similar mechanism in my curve window.

This final video shows the current state of the effect editor, with key framing, graph editing and manually typing in the values for emitter properties. I haven't implemented very many emitter properties yet, but with the underly framework I've built it's quite easy to add new ones.


Also noticeably missing are any actual particles. Because I have a very clear idea in my head of how this tool will work, most of my time has been spent building the infrastructure rather than trying to get something fully usable as quickly as possible. Particles will be going in very soon though! I think I'm still on track to hit my 5 day schedule.

What effect tools have you used and found useful? What would you change about them?

Post comment Comments
NullSoldier
NullSoldier Apr 7 2009, 4:54pm says:

Please convert your very nice useful videos to some flash based format or upload them to youtube or moddb as I along with many others don't have quick time and probably will never install that piece of trash if our lives depended on it.

Plus, streaming and live data are the future. It's so convenient. Yay bandwidth.

Regardless this is a very great article and I enjoyed reading it. I look forward to playing NS2.

+3 votes     reply to comment
technoblue
technoblue Apr 7 2009, 7:44pm replied:

VLC media player plays quicktime files quite nicely.

0 votes     reply to comment
f0rqu3
f0rqu3 Apr 7 2009, 5:42pm says:

hmm what about showing some particles instead of the editor?

0 votes     reply to comment
Woolybear777
Woolybear777 Apr 7 2009, 6:03pm replied:

My guess is because the finished particle effect would not necessarily reflect the quality of the the tool. If lots of work went into the editor and then the particle effect was rushed, it would look like crap. This way you can tell that the possibilities are endless.

0 votes     reply to comment
Arxae
Arxae Apr 7 2009, 6:17pm replied:

*sigh* i quote

Quote:Also noticeably missing are any actual particles. Because I have a very clear idea in my head of how this tool will work, most of my time has been spent building the infrastructure rather than trying to get something fully usable as quickly as possible

they putted the most focus on the usability of the app, not the workings
and its still wip
so quit nagging >_>

+1 vote     reply to comment
Betelgeuze
Betelgeuze Apr 7 2009, 6:54pm replied:

lol yeah, reading the whole update always helps...

0 votes     reply to comment
Armageddon104
Armageddon104 Apr 7 2009, 7:04pm says:

Very, Very cool!

0 votes     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Natural Selection 2
Platforms
Windows, Linux
Developer
Unknown Worlds
Engine
Spark
Contact
Send Message
Official Page
Naturalselection2.com
Release Date
Released Oct 28, 2012
Game Watch
Track this game
News
Browse
News
Report Abuse
Report article
Related Games
Natural Selection 2
Natural Selection 2 Indie Multiplayer Real Time Shooter
Related Engines
Custom Built
Custom Built Commercial Released Sep 1, 2007
Related Groups
Unknown Worlds
Unknown Worlds Developer & Publisher with 5 members