The Drag[en]gine is a fully customizable game engine and game development environment designed with modularity and extensibility in mind not requiring expensive licenses.

Report article RSS Feed The Big News Pack 2/6

Lots of time passed with too many updates to fit in one news post so it has been broken into 6 weekly parts. Here is therefore part 2/6.

Posted by Dragonlord on Jun 19th, 2010

I planed to do a different topic in this news post but I have changed it in the last minute. The reason is that some parts of the news post would shows lots of stuff which comes in a later one which would be odd. Even with this change there is no way around having tidbits of later news posts to be shown but it's less this way. So enjoy this news post. And don't worry, the „dragon in narrow spaces" will come in another news post.

Video decoding support

This had been on my wish list since quite some time and I eventually got around to pull it off. Video resources have been added now to the game engine to support loading (and later on saving) videos of various kinds. To begin with Theora is supported as video format (hence *.ogv files). The implementation of videos in the game engine works similar to the way streaming sound files are handled.

The Video resource is obtained once a video is loaded from a file. This is a streaming resource object hence the actual file is kept open and the video is not yet loaded. To use a video in your game you have to use a Video Player resource object. Simply create one and assign it the video resource you loaded. Video player resources provide support to obtain individual video frames from the attached video resource. This is done internally using a decoder object provided by the Video Module that loaded the video file. To make it easy to use videos the video player provides support to define a play range, play speed as well as pause/resume support. Playback can be either looping or not in which case the video player stops playback after the play range is left. Otherwise playback loops endlessly. The playback speed determines as expected how fast the video plays back. You only have to call the „update" method with the amount of game time elapsed. The video player takes care of doing all the calculations.

Videos are usually used for textures. For this purpose you need a Dynamic Skin object. Simply create a renderable with the matching name and assign the video player to it. The graphic module then takes care of picking the right video frames from the video using the settings you made in the video player. Since you can use renderables for all kinds of texture properties videos can therefore be used also for all kinds of texture properties.

Video Decoding

Here a sample video showing the video object and video player in action. See the image description for some further infos.

ModDB and HD doesn't like each other. See it HD on YouTube or Direct-Download (11MB)

Video encoding support will follow later on.

Sky system improvements

The sky had been one of the few places left in the OpenGL module which have not been yet using OpenGL 3.0 shaders. They are now changed to use this shader version. Furthermore the shadow casting has been altered at the same time. Sky shadows now support too PCF filtered shadows. As another change the boundary calculation for the Cascaded Shadow Maps technique has been altered. The shadow system though still requires some changes as the stock CSM technique does not work well with the large shadow range the engine supports.

Besides these changes ambient lighting has been added. So far the engine decided how much ambient light a sky light has. This is though not flexible and designer might wish to have specific lighting situations. The introduction of an explicit ambient lighting takes care of this. Sky lights now have two light intensity properties the light intensity and the ambient intensity. The ambient intensity defines the strength of light in shadow areas where the sun light only reaches over multiple bounces. The light intensity defines the strength of areas in plain sight of the sun light. The two values are additive in nature. Hence geometry in the sun shadow receive ambient-intensity light. Geometry in the plain sight of the sun receive ambient-intensity + light-intensity. This allows to implement daylight effects like clouds obscuring the sun in a dynamic way. By altering the light-intensity parameter this effect can be simulated. Moving the light intensity towards 0 the areas lit by sun light come closer to the areas only light by the ambient intensity. At 0 all areas have only the ambient intensity. This allows to break up the monotonicy of typical sun lighting as found in many games.

The image below (click, it's a GIF animation) shows a sequence of direct light values for showing the effect.

Sun Direct/Ambient Light

In a next step an explicit sun occlusion will be added to make lighting distribution inside buildings more natural.

Outlook

The next news post will take a look at some game changes including the Day-Night cycle using the modified Sky System.

Post comment Comments
Theon
Theon Jun 19 2010, 5:41pm says:

AWESOME

+1 vote     reply to comment
Arxae
Arxae Jun 19 2010, 7:07pm says:

the video texture really adds alot of dynamic to a level :D

+1 vote     reply to comment
Ark_
Ark_ Jun 19 2010, 11:20pm says:

Coming along quite nicely.

+1 vote     reply to comment
Silverfisk
Silverfisk Jun 20 2010, 5:41am says:

I love it all! Looking forward to the next post!

+1 vote     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

Platforms
Windows, Linux
Company
Team Epsylon
Contact
Send Message
Official Page
Dragengine.rptd.ch
Licence
L-GPL
Release Date
TBD
Engine Watch
Track this engine
News
Browse
News
Report Abuse
Report article
Related Engines
Drag[en]gine
Drag[en]gine L-GPL TBD
Related Groups
Indie Devs
Indie Devs Hobbies & Interests group with 1,125 members
Team Epsylon
Team Epsylon Developer & Publisher with 2 members