Releases: gecko0307/dagon
Dagon 0.10.2
- Use dlib 0.17.0
- Fix warnings with recent compiler versions.
Dagon 0.10.1
- Alpha cutout for shadows. Partially transparent objects now cast correct shadows
- UTF8 support in Nuklear clipboard callbacks - Unicode copy/paste now work correctly
Dagon 0.10.0
- Rendering
- Terrain renderer with image-based and procedural (OpenSimplex noise) heightmaps. Thanks to Rafał Ziemniewski for the implementation
- Decals support in deferred renderer. Decals are special
Entities
that project a texture/material to geometry in the G-buffer. They can be used to place details over static geometry, such as bullet holes, graffiti, blood, dirt, footprints, clutter, etc. By default they project along -Y axis (towards the ground), but they can be transformed like any otherEntity
to project on non-horizontal surfaces as well. Decal is created usingScene.createDecal
. Decals are visible only on Entities withdynamic
property turned off. To create a decal material, useScene.createDecalMaterial
. Decal material properties are the same as for standard materials - they can have diffuse, normal, roughness, metallic and emission maps - Tube area lights support in deferred renderer. These are capsule-like lights that have length and radius.
Scene.createLight
is now deprecated, useScene.createLightSphere
andScene.createLightTube
instead - Spot lights support. They can be created using
Scene.createLightSpot
method - Custom directional lights support. They can be created using
Scene.createLightSun
method - Shadow rendering mechanism has been changed. Now there's no global shadow map, each directional light can have its own shadow map. It is turned on by
light.shadow = true
- Particles now don't drop shadows if
dropShadow
is set to false for emitter'sEntity
CascadedShadowMap.eyeSpaceNormalShift
- controls displacement of shadow coordinates by the surface normal (0.008 by default)
- Materials
- Cubemap textures support (
dagon.graphics.cubemap
). You can build a cubemap from individual face images, generate from equirectangular environment map, or render the scene into cubemap ImageAsset
- a new asset type for loading raw images with Dagon, without creating OpenGL textures for them. They are useful to load cubemaps, as well as to store non-color data.ImageAsset
supports the same formats asTextureAsset
- PNG, JPEG, TGA, BMP, HDRtextureScale
property for materials - bidirectional scale factor for texture coordinates- Built-in terrain shader (
dagon.graphics.shaders.terrain
) with 4 texture layers and splatting. Each layer supports diffuse and normal maps. To create terrain material, useScene.createTerrainMaterial
. Textures are passed via material properties,diffuse
andnormal
being the first layer,diffuse2
andnormal2
the second, and so on. There are alsotextureScale
,roughness
andmetallic
for each layer (textureScale2
, etc). Roughness and metallic properties are limited to numeric values. Splatting textures (that is, bw textures that define blending between layers) are passed usingsplatmap1
,splatmap2
, etc.
- Cubemap textures support (
- UI
- Nuklear integration (
dagon.ui.nuklear
). It is a lightweight immediate mode GUI toolkit which can be used to render windows and widgets over the rendered scene. To use Nuklear, createNuklearGUI
object and attach is to 2D entity's drawable, then use its methods to 'draw' widgets inonLogicsUpdate
(API is very close to original Nuklear functions). Nuklear also provides a canvas widget to draw 2D vector shapes - lines, Bezier curves, rectangles, circles, arcs, triangles, and polygons. Thanks to Mateusz Muszyński for the implementation and bindbc-nuklear binding
- Nuklear integration (
- Environment
-
Breaking change: now there is no default sun for deferred renderer, it should be created explicitly. Forward mode shaders still use sun settings from
Environment
(as well as sky shaders), so these settings should be synced with a customLightSource
by specifyingScene.mainSun
:mainSun = createLightSun(Quaternionf.identity, environment.sunColor, environment.sunEnergy); mainSun.shadow = true;
-
Breaking change:
Environment.environmentMap
now is used only for image-based lighting - to apply an environment map to sky object, useEnvironment.skyMap
property. Both of them now supportCubemap
textures also -
Environment.environmentBrightness
was added. It is a final brightness multiplier applied to environment map, both texture-based and procedural -
Environment.skyBrightness
was added. It is a final brightness multiplier in standard sky shader -
Built-in sky object now uses
ShapeBox
instead ofShapeSphere
-
- Post-processing
- Breaking change: post-processing settings are now part of the
Renderer
class, notScene
- Improved HDR glow quality
- Breaking change: post-processing settings are now part of the
- Assets & logics
- Transformation methods for
Entity
:translate
,rotate
,move
,moveToPoint
,strafe
,lift
,pitch
,turn
,roll
,scale
,scaleX
,scaleY
,scaleZ
,direction
,right
,up
- Now
Entity
has two separate rotation mechanisms - quaternion (Entity.rotation
) and axis-angles vector (Entity.angles
). You can use any of the two, or both simultaneously. This distinction was introduced to simplify user-programmed rotations while maintaining easy integration of quaternion-based systems (such as dmech). Axis-angles vector represents sequiential rotation around three local axes (X, Y, Z) in degrees. This rotation is always applied after the quaternion, so you can useEntity.rotation
as a 'primary' rotation coming from physics engine, andEntity.angles
as a 'secondary' rotation applying only to graphical representation of the object - Basic animation tweens (
dagon.logics.tween
) - objects that interpolateEntity
transformation over time with easing functions. There are several common in and out easing functions (linear, quad, back, bounce). To create tweens, useEntity.moveTo
,Entity.moveFrom
,Entity.moveFromTo
,Entity.rotateTo
,Entity.rotateFrom
,Entity.rotateFromTo
,Entity.scaleFrom
,Entity.scaleTo
,Entity.scaleFromTo
Entity.dynamic
to distinguish static/dynamic objects in renderer (you still can move static objects). Static entities are rendered before decals and meant to be immovable- Now
Entity
doesn't have default controller.DefaultEntityController
functionality was integrated intoEntity
. Custom controllers are still supported Scene.deleteEntity
methodShapeBox
indagon.graphics.shapes
Scene.asset
- generic asset adding method- Update timer was fixed, so that the application runs with a consistent speed at varying framerates. Dagon games are now playable on low-end hardware
- Transformation methods for
- Misc
-
A simple configuration system. Dagon applications now support optional settings.conf file in the working directory or in user's home directory (
%APPDATA%/.dagon
under Windows,$HOME/.dagon
under Posix). You can access loaded configuration viaSceneApplication.config
property -
dagon.core.input.InputManager
- an abstraction layer for mapping between logical commands and input events (Thanks to Mateusz Muszyński for the implementation). It allows to remap inputs without changing code. It supports keyboard, mouse and game controller devices. Mapping is stored ininput.conf
file, which has the same syntax assettings.conf
:upDownAxis: "ga_lefty, va(kb_down, kb_up)"; myButton: "kb_p, gb_leftshoulder";
-
dagon.core.locale
- a module that detects system locale. It can be used to automatically switch application's language -
In debug builds Dagon now shows informative error messages from graphics driver using debug output extension (GL_KHR_debug) when it is available
-
BindBC bindings have been excluded from source tree and used as Dub dependencies. Freetype binding is now a separate project, bindbc-ft
-
Dagon can be compiled without Freetype and Nuklear dependencies (thus disabling text and UI rendering). See README.md for details on how to do it
-
Dagon now uses dlib 0.16.0.
-
Dagon 0.9.2
- Fix
GL_INVALID_OPERATION
error.
Dagon 0.9.1
- Fix shadows for semi-transparent particles
- Fix 'not reachable' warning
- Performance optimization by reducing shader switching for some passes.
Dagon 0.9.0
IMPORTANT: Dagon now officially doesn't support macOS. This is because Apple has deprecated OpenGL in favour of Metal, which means that there will be no OpenGL above 4.1, and notorious driver issues will not be fixed. This makes targeting macOS in a non-commercial cross-platform game engine development virtually impossible. Dagon will stick with OpenGL 4.x and platforms that support it (Windows and Linux), and there are no plans to port the engine to other graphics APIs.
IMPORTANT: This is a huge release (the biggest since 0.5.0) featuring titanic internal refactoring and API improvement, so it can break compatibility with existing projects. Resulting image can change, and some parameters may require additional tweaking. Some functionality have been removed due to switching to deferred rendering.
Changes:
- Rendering
- Dagon now uses deferred shading which results in significantly better performance on complex scenes with large number of lights. Light count is now truly unlimited (fillrate-bound). This is mainly an internal optimization that doesn't affect user API. The only significant change is handling transparent entities (entities that use non-opaque materials) - they are rendered in a separate forward pass using only sun light, and currently there's no built-in way to shade them with point/area lights
- Shader system has been redesigned from scratch. Now there is a
Shader
class that handles GLSL shader objects. Parameter handling was greatly simplified - all uniforms are created automatically and lazily from D/dlib types (int
,float
,Vector3f
and others). Parameters can be even tied to class fields and methods via implicit references. User-defined shaders are supported - derive fromShader
class and provide your shader object when callingScene.createMaterial
. Objects using such shaders fallback to forward pipeline, because in deferred path you can't have individual shaders per object - All built-in shaders use GLSL 4.0 (400 core), linear colors and ITU-R Rec.709 luminance. Internal shader optimizations include GLSL 4.0 subroutines instead of branching for maximum performance in ubershaders. As a consequence, no more implicit solid color textures - animated color values are possible
dagon.graphics.clustered
module is nowdagon.graphics.light
.ClusteredLightManager
renamed toLightManager
. Its clustered shading functionality has been removed
- Materials
Material
,GenericMaterial
and all other material classes have been combined into one class -Material
, which usesShader
objects. Material backends are completely gone- Particle system improvements, including soft particles (e.g. alpha blending based on distance to underlying objects) and shaded particles (using custom or procedural normal map). Particles can now cast shadows. It is now possible to create many emitters in one particle system. An emitter can render any
Entity
as a particle. Default particle system and particle shader are now part of aScene
class (Scene.particleSystem
,Scene.particleShader
). To create particle materials, useScene.createParticleMaterial()
method. It is possible to use custom shader for particle material, just pass your shader instance toScene.createParticleMaterial
- Simple water shader with procedural raindrop ripples (
dagon.graphics.shaders.water
)
- Environment
- Optional Rayleigh sky model (
dagon.graphics.shaders.rayleigh
) - Default sky parameters were changed to more eye-pleasing ones
- Custom material support for
Scene.createSky
environment.setDayTime(hours, minutes, seconds)
for quick sun/sky setupenvironment.backgroundColor
is now used to clear the framebuffer
- Optional Rayleigh sky model (
- Post-processing
- Screen space ambient occlusion (SSAO)
- ACES tonemapper is now used by default
- Motion blur now works for background objects and particles
- Auto exposure now can be turned off (
Scene.hdr.autoExposure
)
- Assets & logics
- OBJ files without normals now don't cause application crash. Mesh normals are generated if they are missing
- IQM loader doesn't load textures automatically anymore - all textures/materials should be explicitly set up by programmer. It is possible to apply materials to individual IQM meshes
FirstPersonView.mouseSensibility
SceneApplication.saveScreenshot
- Physics
- dmech physics engine has been (experimentally) integrated into Dagon. Built-in rigid body and character controllers are provided
- Misc
- Dagon now uses BindBC instead of Derelict to dynamically link OpenGL, SDL and Freetype
- Dagon now uses dlib 0.15.0
- Automatic deployment using Dub. Now all files necessary to run the engine (Windows DLLs, configuration files, internal resources) are copied to project directory after each build
Dagon 0.8.3
- Ignore unsupported SDL2 functions.
Dagon 0.8.2
- Ignore unsupported Freetype functions
- Fixed
#define
errors.
Dagon 0.8.1
Fix to work with DMD 2.081.0.
Dagon 0.8.0
IMPORTANT: this release doesn't work with DMD 2.081.0. Please, use Dagon 0.8.2.
Changes:
- Rendering
- Dagon now requires OpenGL 4.0 (because of need for
glBlendFunci
). A long-term plan is to move to 4.3 to utilize compute shaders ParticleBackend
- a dedicated material backend for particle systems. It supports diffuse texture, per-particle color and transparency. Particle system now usesGenericMaterial
instead ofMaterial
- Dagon now requires OpenGL 4.0 (because of need for
- Materials
- Non-opaque blending modes now work correctly for all shaders.
Additive
mode now takes transparency into account - More material properties are supported by standard shader, namely,
shadeless
,shadowFilter
,transparency
- Non-opaque blending modes now work correctly for all shaders.
- Assets & logics
- Package assets support. A package asset is a Box container that stores meshes, entities, materials (for standard shader) and textures. They can be added directly to the scene or referenced using drawable mechanism, so you can use package assets both for level geometry and dynamic objects. Exporter for Blender is available. Format specification is here
Scene
have been renamed toBaseScene
,BaseScene3D
have been renamed toScene
(there is an alias for backward compatibility)- Factory methods for creating assets (like
addTextureAsset
) are now part ofScene
(formerBaseScene3D
). New factory methods have been added:addOBJAsset
,addIQMAsset
,addPackageAsset
Entity
class now implementsDrawable
interface, meaning that entities can render other entities. This is especially useful to render multiple instances of the same package asset- Entity children are now sorted by layer when new entity is added to a scene.