Major changes are around shaders and terrain rendering.
New contributions were also included so thanks to people who shared them.
You can see some screenshots on the web site.
Here is the full list of changes :
- New demo in Game.cs (remember that this sample is NOT optimized but includes most of Brume features)
Terrains
- support for 8 bit and 16 bit Greyscale heightmaps (L3DT also supported -> easy texture splatting)
- Simple Heightmap based terrain implementation (brute force, may be a good choice if you target modern graphic cards)
- ROAM implementation (poor...has some bugs lighting)
- GeoMipmapping implementation (best choice for not too old/modern graphic cards)
- Hardware Texture splatting (Vertex and Pixel shaders 2.0)
- terrain dynamic lighting and bumpmapping (using normal maps : shaders 3.0, may be easilly modified with lightmaps for shader 2.0)
- terrain collisions (using trimesh for the moment). Note that collisions shapes are disabled by default for GeoMipMapping (too slow with all patches).
A method GetPatchAt was added to handle collision on/off - added BrumeTerrain height methods : GetHeight, GetHeightFromMap. Methods to retrieve the Patch or Triangle at x,z were also added.
Physics/Collisions
- Upgraded to ODE 0.8 (22/01/2007)
- added BrumeObject.HasCollisions helper. If set to true, adds automatically collision shapes based on mesh type
- Random crash during simulation : made some long running tests with full success (but I never reproduced the problem on my platform even with old version so...)
- Fixed Mesh collisions precision (noticed by Rubbish in this post)
- contact points were passed to 16 (instead of 4) due to this ODE bug.
You can change the contact points using Brume.CollisionWorld.NbrContacts - all collisions are not supported, ODE current supported collisions are here.
So check this first before posting bugs ! - ODE scaling is not implemented as stated here.
I managed to do something with it but it is static. Create your mesh, resize everything and then add collision shapes.
Rotation and translation are still dynamic. If you want dynamic scaling, you should destroy and create the collision shapes again (will be slower)
Shaders
- Shaders are now declared in RenderStates properties.
- new BrumeMainRenderer completely reworked to support shader sorting (ready for programmable pipeline only).
Fixed pipeline is now deactivated when BrumeObject.RenderState.Shader is set - Complex mesh shaders support.
- added hologram, sky and texture splatting shaders
- BrumeWaterShader effect (ps2.0 required) : uses reflection, refraction, fresnel term, animation and specular light(ps3.0) or bump mapping(ps3.0) to simulate water. Underwater also supported. Shoreline blending with shader 3.0.
- added TOTAL_TIME and ELAPSED_TIME to shader parameters
- added GLOBAL camera setting to shader parameters (ie ActiveCamera) as well as new View/proj computation for infinite objects.
Video
- Added a BrumeVideoTexture class : supports AVI play/stop/pause on a texture. Avi is displayed according to the refresh rate of the video.
Audio is not supported. You can also use BrumeVideo.GetTexture() helper to create the texture. (AVI source code by Corinna John from codeproject.com) - Experimental : added a video recording feature. Activate it in Brume constructor (using Brume.EnableVideos = true) then F11 to start recording / F12 or exit the app to stop recording. Note : you will need the AviWriter.dll file from brume.sf.net
I tested with uncompressed, ms codecs and xvid codecs (xvid worked first but crashed after changing compression). Uncompressed is the best choice because not too slow and always reliable.
This feature is Multi-Core CPU friendly as the recording is made by two threads. It needs a new AviWriter.dll (uses unsafe code) I found here.
New Particle System (MoDDiB's contribution)
- supports a lot of cool effects like : fire, snow, plasma,... (You can see a nice screenshot here)
- Integrated into EffectEngine (old classes were removed)
Other
- (Modifications required) added new Animation type for Local*RST transformation. Transform Type is now specified in BrumeObject.AnimationStates (the old BrumeAnimation(Type) constructor was removed, RST is still the default animation type)
- added better missing texture notification (you can now use a new constructor if you want to avoid notification)
Two methods/helpers are now available : GetTexture(filename) with notification and GetTexture(filename, bool) the bool indicating if you want to be notified or not if the texture is missing - Brume can now render in Component (MoDDiB's contribution)
- added Animation Speed and Duration properties to BrumeObject.AnimationStates
- added BrumeObject.SkipRenderStatesComputation to skip ComputeRenderStates method when previous object in the rendering pipeline had the same render states (may be useful with particles or terrain patches)
- added BrumeObject.AfterMove(float) method
- added BrumeAnimationManager.AddAnimationsFromMesh method with a prefix : it may be useful if your meshes contain identical animation names.
The prefix will be added to each animation name to avoid conflicts. - added BrumeObject.UseParentRenderStates : using this property you can now build hierarchies based on the parent RenderStates
Important : .X Meshes are now loaded with all childs using UseParentRenderStates = true. This way you can alter mesh render states on a root object basis.
If you want to modify subMesh object's render states you will have to pass the property to false.
Previous Brume versions were behaving like if UseParentRenderStates were false. - removed unnecessary logs and statistics to avoid the creation of brume.log file
- User Clip Planes are now working with shaders
- Added Brume.ElapsedTime and Brume.TotalTime properties (in ms)
- Changed MoveScene to abstract method so that you must implement it in your main Game class. But in the same time you no longer have to call base.MoveScene(time)
- Changed RenderScene to optional method, you no longer have to call base.Render() when you override this method
- added a Brume.GetTexture(string name, int mipmapLevels) method for better mipmapping control. By default mipmaps will be generated if not present
- xmesh automatic bounding volumes generation
- Modified the AddObject and RemoveObject methods (MoDDiB's contribution) to allow to add/remove objects even in their own Move method
- added MoDDiB's contribution on Animations with empty KeySets
- added new object orientation methods : OrientInDirection(BrumeVector dir), OrientInDirection(BrumeVector dir, float angle), OrientInCameraDir(float angle) and OrientToCameraPos(float angle)
- Snapshots & Videos can be disabled/enabled using Brume.EnableSnapshots/EnableVideos properties
- The BrumeSimpleMesh class is no longer abstract. You can load you own primitive data and use it as a simple mesh.
- Tested on XP/Vista
- added a BrumeSplashScreen class (based on Tom Clement's sample from codeproject.com)
- added NVidia PerfHUD 5 support. A new Brume.InitStates.EnableNVPerfHUD property may be used to activate instrumented driver. (Should also work with v4 but not tested)
- added PIX/PerfHUD instrumentation events and markers. Helps to see what Brume draws when out frames (added Brume.InitStates.EnableDXMarkers property) (Source code by Rim van Wersch from MDXInfo tutorial)
- added documentation file to the release. Work in progress.
Bugs
- fixed mipmapping that was not enabled by default
- fixed a problem using same animation for multiple meshes
- fixed transparency problem between 3D and HUD objects
- fixed : Objects with shaders do not reflect very well (when using BrumeMirror object).
- fixed : camera button states not working when MoveScene was called after camera orientation
- fixed outlining and bounding volumes rendering problems (bad render states backup)
- fixed picking problem with scale, transformations and distances.
- fixed a crash with BrumeMirror or BrumeWater when switching fullscreen/windowed
- fixed a memory leak with complex meshes (the mesh was not released)
- fixed alpha problem when rendering to texture refraction (with particle system for example)
Known issues
- Artifacts may be present on water reflection or mirror (objects appearing/disappearing) using recent NVidia drivers (163.14 - 163.16).
This problem is not reproduced using Reference device under Vista or old drivers under XP. - MoDDiB's particle system has a FPS dependency problem : this issue will be fixed for next release. You can still use the feature with 1.6.
Silmaryls