Release Notes for Build 126: Difference between revisions

From C4 Engine Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ '''Release date:''' August 31, 2006 * '''IMPORTANT:''' In the unlikely case that you have world or model resources that have not been saved in build 113 or later, you need to open them and save them in build 125 before opening them in build 126. * '''IMPORTANT:''' Because of some format changes in this build, it's recommended that you open and save all worlds and models to update your resources. In most cases, resources will shrink in size slightly. * '''I...")
 
(No difference)

Latest revision as of 09:37, 15 July 2023

Release date: August 31, 2006

  • IMPORTANT: In the unlikely case that you have world or model resources that have not been saved in build 113 or later, you need to open them and save them in build 125 before opening them in build 126.
  • IMPORTANT: Because of some format changes in this build, it's recommended that you open and save all worlds and models to update your resources. In most cases, resources will shrink in size slightly.
  • IMPORTANT: Changes in this build have largely removed the need for the concept of "group space" in the engine. Plans are to remove group space functionality in the next build, so please update any geometries using group space by merging all such geometries in each group together into a single object (more below).
  • Implemented support for multiple materials on a single renderable object. The Renderable class now supports multiple render segments represented by the RenderSegment class. Each segment corresponds to a separate material and has its own material attributes and shading data. The first segment is built into the Renderable class, and additional segments can be attached by a higher-level object.
  • The higher-level object normally attaching additional render segments is the Geometry class, which now supports multiple materials. The GetMaterialObject() and SetMaterialObject() functions now take a material index to identify a material slot. The number of material slots for a geometry is always at least 1 and can be set using the SetMaterialCount() function. The granularity at which multiple materials can be applied is based on the division of a geometry into surfaces. Surfaces are groups of polygons that are isolated with respect to normal smoothing, bump mapping, etc. These have been supported by the engine for some time, but now each surface can designate a separate material. When a geometry is built, all sets of surfaces sharing a common material are combined to form a single segment, so the number of render segments is always less than or equal to the number of surfaces.
  • The Collada Importer tool will now apply multiple materials to meshes that have multiple surfaces referencing different materials. Each occurrence of a <polygons>, <polylist>, or <triangles> element within a <mesh> element generates a separate surface to which a distinct material may be applied.
  • Changed the behavior of the Merge Geometry command in the World Editor. Previously, this would merge the selected geometries and apply the current material to the result. Now, it generates a single geometry that has all of the original materials applied to it. The number of surfaces in the resulting geometry is the sum of the numbers of surfaces in the input geometries. If surfaces of multiple input geometries use the same material, then they are combined into the same segment of the resulting geometry, but the surfaces remain separate.
  • Changed the behavior of the CSG operations in the World Editor so that they now always produce a single geometry with multiple materials. All surviving surfaces of a CSG operation between two geometries are combined into a single geometry, and only the materials used by the surviving surfaces are applied to the new geometry.
  • CSG operations now generate as many LODs as the maximum number possessed by the two input geometries, whereas previously, only the minimum number of LODs were generated. This is useful if you do something like subtract a two-LOD cylinder from a single-LOD box and still want two LODs in the result.
  • Completed the in-game interface panel system. Under the markers/triggers/effects panel in the World Editor, there is a new effect called "Panel Effect" that lets you draw a rectangular interface panel. This effect automatically has a panel controller assigned to it that can be configured under the Controller pane in the Get Info dialog. There are two sliders here that control the resolution of the interface panel—these are independent of the size of the panel effect in the editor viewport. Clicking on the Edit Panel button opens the Panel Editor window where the contents of the interface can be designed.
  • The Panel Editor window contains tools similar to those that would typically be found in a 2D drawing application. In this build, there are two types of items that can be placed in an interface panel: images and text. A future build will also include a viewport item that can display a rendered image from another camera in the world. An image or text item is placed in the interface by selecting one of the drawing tools in the upper-left part of the window and dragging out a rectangle. The texture applied to an image item is the one selected on the left side of the window. The texture palette displays all of the textures in the Data/tex/panels/ directory (but any texture can be applied to an image by changing it after it's drawn).
  • When a single item is selected in the Panel Editor, its properties can be edited on the right side of the window. The item identifier is a four-character code that can be used to identify different items from a script—they do not need to be unique, so it's possible to identify a group of items using the same value. The Disabled and Hidden check boxes determine whether an item is initially clickable or initially hidden, respectively.
  • A panel item can be made interactive by assigned a script to it. To do so, select the item and click the Edit Script button at the bottom of the window. The script will run each time the panel item is clicked. Note that the Interaction property must be assigned to a panel in order for it to receive interaction events (see below).
  • Panel items can be animated by assigning one or more mutators to them. The popup menu on the right side of the window contains the available mutators for a selected panel item, and the list box next to it displays the mutators that are currently assigned to the item. A new mutator is added to a panel item by selecting it from the menu and clicking the Add button. Like a panel item, each mutator also has a four-character identifier that can be used to identify it from a script.
  • The PanelController class exposes a number of functions that can be called from a script. Each function takes a panel item identifier as a parameter that determines which items are affected. A blank identifier is a wildcard and matches all panel items. For functions that operate on mutators, a separate mutator identifier is also specified, and a blank identifier is a wildcard that matches all mutators.
  • Implemented an interaction event system that's used to communicate user interaction information to the controllers of interactive objects in a world. Currently, any geometry node or panel effect node can be made interactive by assigning the new Interaction property to it in the Get Info window. (In particular, this property must be assigned to a panel effect before anything in the panel can be clicked.)
  • Interactions are reported through the Interactor class. An application can define subclasses of the Interactor class and add them to a world in order to detect interactions between a given line segment and any interactive nodes in the world. When the line segment probe first hits an interactive node, a kInteractionEventEngage event is sent to the Interactor class. As long as the probe remains in contact with the interactive node, the Interactor class continues receiving kInteractionEventTrack events. When the probe later misses the interactive node, the Interactor class receives the kInteractionEventDisengage event. The application-defined subclass can handle these in any manner necessary.
  • Controllers now have a HandleInteractionEvent function for handling interaction events. Normally, a subclass of Interactor will pass interaction events to the controller attached to the interactive node that has been engaged. There are two additional events, kInteractionEventActivate and kInteractionEventDeactivate, that can be sent to a controller when the user explicitly generates some kind of input indicating that they want to activate the node that they're currently passively engaged to. This needs to be handled by the Application Module.
  • Implemented an associative key-value container called Map. It works like the List class in that there is also a MapElement class from which objects stored in a map need to be derived and the map owns its members. As with the list container, there is no memory allocation done when an object is inserted into a map—all of the linking pointers are part of the object itself. This also has the advantage that destroying an object automatically removes it from any map it is a member of.
  • The Map class uses an AVL tree implementation to maintain a balanced binary tree. This provides 1.44×O(log n) time searches in the worst possible case, where n is the number of objects in the map. (A red-black tree, used by most STL implementations, will take 2×O(log n) time in the worst case.)
  • Added the Terminate function to the ScriptController class. This terminates all scripts currently running on the controller.
  • Added a flag to fog spaces that causes their boundary planes to become collision barriers for cameras.
  • Added a small feature to the MarkingEffect class that causes a marking to exist for exactly one frame. This is useful if you're using a marking for something like a blob shadow. To specify that a marking lives for only one frame, the lifeTime field of the MarkingData structure should be set to -1.
  • Added a flag to light nodes that cause them to connect to a shadow space in the referencing world when they are included through a reference marker. If the "Connect to shadow space in referencing world" box is checked in a light's Get Info dialog, then the light will look for a SHAD connector on the reference marker that caused it to be included in another world. If that connector is found and is connected to a shadow space, then the light will automatically connect to that shadow space.
  • Added a node flag that causes a node's object not to be shared when the node is replicated. In order for this flag to be effective, the object attached to the node must support replication. Currently, only light objects can be replicated, and a new check box has been added to the Get Info dialog that turns this flag on. This is used to force lights in referenced worlds to have independent objects so that controllers can animate them separately for things like flickering effects.
  • Shadow spaces can now be used with infinite lights and depth lights. As with point lights, shadows rendered for a light connected to a shadow space can be restricted by the engine to the volume bounded by the shadow space as a performance optimization.
  • Made significant improvements to the shadow culling code for spot lights. Some areas of the demo world got a 10-15% speed-up.
  • The graphics stats window (accessed by the graf console command) has been expanded to display a lot more information. It now shows the number of faces and the number of drawing commands used for normal rendering, shadows, and the special effect buffer. It also displays more information about the higher-level visibility statistics, such as number of objects visible, number of shadows visible, and various portal counts.
  • The Cursor class no longer holds a hotspot position. Instead, the center position of a cursor is now specified in the cursor's texture. The Texture Importer tool has been updated to allow a center point to be specified.
  • Connectors in the World Editor can now be set to link only to entities (in addition to all the other node types that were already there).
  • The Collada Importer tool will now recognize texture names with spaces in them. It will also recognize the substring "/Import/tga/" and treat anything that comes after it as the full path to a texture image so that the imported material has the correct corresponding path in the Data/tex/ directory.
  • The Collada Importer tool can now apply textures for which a material attribute references a sampler instead of directly referencing the texture image.
  • Added a check box to the Font Generator tool that enables mipmap generation for font textures. This should be enabled for fonts that are to be used for in-game interface panels.
  • Added specializations to the << and >> operators in the Packer, Unpacker, Compressor, and Decompressor classes to explicitly handle the bool type correctly. When packing into a file, a bool is always saved as four bytes (for alignment). When compressing into a network message, a bool is always written as one byte.
  • Made a shader optimization that reduces the number of interpolants needed when fog is used. This allows all possible combinations of shading attributes to be applied with fog. (Previously, combinations such as depth light + dual texcoords + specular + fog would overflow the available interpolants by one.)
  • The kGeometryStaticShadowInhibit flag has been renamed to kGeometryDynamic. This flag means a geometry might move, so the engine will not do things like cache shadow volumes for a geometry having this flag set.
  • Resolved a problem in which motion blur would "stick" and cause screen trashing when decals were visible. There is an unrelated motion blur problem occurring only on GeForce 7x00 hardware which is currently under investigation at Nvidia as bug #251255. UPDATE: A zero-cost workaround has been found, so motion blur should be rendering correctly on all graphics cards now.
  • Fixed a problem in which dual texcoords were not working if a material used a parallax map.
  • Fixed a problem that could cause a stopped sound source to start playing when a game is saved and restored.
  • Fixed a crash that would occur if the cloth controller was removed from a cloth geometry.