Release Notes for Build 113
From C4 Engine Wiki
Revision as of 19:25, 18 July 2010 by Eric Lengyel
Release date: December 26, 2005
- WARNING: It is strongly recommended that you backup
MDLresources before upgrading to this version of the code. The geometry serialization format has changed a little, and existing resources will automatically be updated to the new format when they are loaded and then saved (see next item). Although no problems are anticipated, a backup of your old files should be kept until you're sure the updated files are able to be loaded.
- The geometry data format has been changed a little bit, and some extra information has been removed from the array structures stored in the
GeometryLevelclass. The engine will still read the old format, but it is recommended that all worlds and models be updated to the new format. To update a world, all you have to do is open the world in the editor and then just save it. You can update a model by opening it in the model viewer and saving it using the Save item under the Model menu.
MDLfiles will generally shrink by an average of 3% to 7%. All new files are saved in the new format.
- Support for NV2x hardware has been removed, along with several thousand lines of shader code. The result is that the rendering core of the engine is much cleaner, the data structures used for shading are smaller, and several ugly pieces of special-case code have been removed. A lot of work had been put into the NV2x shading code a few years ago, so it's sad to see it go, but after careful consideration, it was decided that it was bad for the engine's future to keep it around. Some of the reasons for the cut were 1) we never supported ATI hardware from the same generation, 2) the NV2x shading code was the only rendering path that required multiple passes per light, and 3) Nvidia has not implemented FBO functionality for NV2x chips.
- This build includes the first release of the Collada format import tool. This tool supports version 1.3.x of the Collada format, and version 1.4 will be supported once the specification has been finalized. Collada export plugins for various content creation packages can be found at the following locations:
3D Studio MAX
- The Collada export plugins write files with the
DAEextension. Place these in the
Import/DAE/directory, and they will be found by the Collada import tool. To import geometry from a Collada file, select Import Geometry from the World menu in the world editor. The import tool will recognize and import the node hierarchy, instanced geometries, instanced light sources, skinning information, material information, and animations.
- Once something has been imported into the world editor, it can be turned into an entity by using the Export Model command under the World menu. You can make changes to the imported geometry first if necessary. An exported model can be opened in the model viewer, and animations can be applied using the Import button. Animations for a particular model need to be stored in a subdirectory having the same name as the imported model. For example, if you import a Collada file named
Import/DAE/directory), then all the animations for that model should be stored in the
- The import dialogs for both importing geometries and animations have a popup menu at the bottom that lets you select an import tool. The Collada importer is active by default, but the old 3DS Max importer is there as well. When you select the Max importer, the source directory will change to
Import/C4G/(for geometries) or
- Note: There appears to be a bug in the Collada export plugin for 3D Studio Max that generates bad skinning data. This is an issue with the export plugin provided by Autodesk and is beyond our control. Until the issue is resolved, you still need to use the old Max plugins for skinned models. (Skinned models exported from Maya work fine.)
- Animation interpolation has been improved, and it is now possible to change the animation rate. The
Entity::SetAnimationRate()function sets the animation rate in frames per millisecond.
- Added a new particle system feature that places particles at infinity. This is useful for placing objects infinitely far away in the sky. Specifying the
kParticleSystemInfiniteflag for a particle system will cause the particles to be rendered at infinity, and the radius of each particle is then interpreted as a percentage of the horizontal field of view.
StarFieldparticle system has been added to the sample game module. It reads star positions and intensities out of a
FLDresource and generates a particle system that places the stars at infinity in the sky. Currently, the positions of the 12,000 brightest stars visible from Earth will be read from the file. A star field is placed in a world by adding a location marker with the "Star field" type. An example world named "Earth" has been included which contains two spheres representing the Earth and the moon, and the star field.
- Support for framebuffer objects (FBOs) has been added to the Graphics Manager. Currently, this will only be used on Nvidia hardware under Windows because they are the only ones who have implemented it to a usable degree (meaning they support
EXT_packed_depth_stencil). This build includes a glow post-processing effect that uses the FBO functionality, and more effects will be added soon.
- Implemented a glow post-processing effect. Glow is automatically applied whenever a glow-enabled object is rendered in the scene. Currently, a skybox can be made to glow by checking the "Enable skybox glow" box in the World Settings dialog. The textures used in a glowing skybox should contain alpha channels representing the glow intensity. Glow for ordinary geometries is determined by the emission attribute in their materials. The emission alpha determines the glow intensity, and this is taken from the emission color or emission texture (or the product of the two if they are both present). For a geometry to glow, the "Enable emission glow" box must be checked in its Get Info dialog.
- There is now a new alpha channel format that can be selected in the Texture Importer tool called "Glow Intensity". This should be selected for textures used as emission maps or skybox faces that should have the glow effect applied to them.
- Several global rendering options have been exposed in the Graphics Options dialog. Among them are control over bilinear/trilinear/anisotropic texture filtering and enable switches for parallax mapping, microfacet shading, and higher-quality bump mapping. Some of these options were previously controlled using the
$featureDisableMaskvariable, but each option now has its own variable (and
$featureDisableMaskhas been removed).
- Microfacet shading (Cook-Torrance) is now fully implemented for all light types.
CharacterControllercode has been updated to handle some nasty corner cases, and a lot of the functionality that used to be in the
FighterControllerclass of the sample game module has been moved to the
CharacterControllerbase class. More tweaks are planned for this class in near-term releases.
- Two new functions,
LookInDirection(), have been added to the
Cameraclass, and they do exactly what they sound like they do. For details, see the documentation at
- Added the
C4Spatial.hfile that contains generic structures for octrees, quadtrees, bintrees.
- Added the
AlignedBoxclass to the
C4Bounding.*files to represent an axis-aligned bounding box.
- Added the
ProjectOnto()function that projects one 2D/3D/4D vector onto another.
- It's now possible to set a clear color in the world editor. Normally, the color buffer is not cleared before rendering because the whole screen will be filled by geometry. However, in some scenes such as a space environment, it's convenient to be able to specify a clear color instead of using a solid-color skybox. If a clear color is selected in the World Settings dialog, the color buffer is cleared to that color before rendering occurs for each camera. Note that using the clear color will prevent remote portals that render to the primary buffer from working.
- Added the Select All by Mask command to the Edit menu in the World Editor. Unlike the ordinary Select All command, this respects the current selection mask.
- Added a toggle button to the World Editor for showing backfaces in wireframe. This also allows planar geometries to be seen when viewed edge-on in an orthographic viewport.
- The world editor now generates picking rays that account for the bounding sphere of the whole world. Some huge worlds were experiencing problems because the 2km range of the previous rays was too small, causing some items to be unselectable.
- Leak detection functionality in the Memory Manager has been improved. There is now a preprocessor define at the top of
LEAK_DETECTIONthat controls whether this functionality is enabled. To turn leak detection on, set
LEAK_DETECTIONto 1 and recompile. When you run the engine with leak detection, exercise all of the code you want to test, and then quit the engine. Right before exiting, the engine will write out the file
leaks.txtin the same directory as
C4.exe. This file contains a list of unfreed memory blocks along with the allocation count, filename, and line number at which each was allocated.