Giter VIP home page Giter VIP logo

digitalrune's Introduction

DigitalRune Engine

Copyright (C) DigitalRune GmbH. Authors: Helmut Garstenauer, Martin Garstenauer

The DigitalRune Engine is a collection of middleware libraries and tools for developing 3D games, VR simulations and CAx applications. The software is written in C# for the Microsoft .NET Framework and Mono. It supports the Microsoft XNA Game Studio and MonoGame.

Documentation

The documentation is available online: Link

Please note that the documentation has not been updated for the open source version.

The documentation refers to DigitalRune blog and forum articles. A backup of these articles can be found here: Link

Notes

The software was designed to serve as a personal reference implementation. It should be easy to use, yet rich with features. It was initially written for the Microsoft XNA Framework 4. Several limitations of the XNA Framework are still present in the software. By focusing on .NET 4.6+, C# 6+, DirectX 11+ many things could be solved more elegantly.

Several newer, planned features and optimizations are not yet included in the open source project, for example: DirectX 11/12 features, physically-based rendering (PBR), temporal reprojection techniques, improved game object system (game object behaviors), scripting and NuGet support.

The engine was designed for small to medium games ("indie games"). But there is room for optimizations: You can trim features that are not needed and optimize where necessary.

Please note that the original contributors are no longer involved with further development of the open source project. Currently, the open source project does not have a maintainer. At the moment we do not accept pull requests. But feel free to fork the project!

Experimental Features

The solution includes several WPF libraries, an MVVM framework for WPF and an early version of an IDE (integrated development environment) for games. See DigitalRune Editor.

MonoGame Fork

The DigitalRune Engine uses a forked version of MonoGame: MonoGame fork for DigitalRune

The MonoGame fork contains a few documented changes compared to the original MonoGame. Ideally, those changes are merged with the original repository or removed to use the original MonoGame version directly and get rid of the fork.

Build instructions

Here are instructions for building the DigitalRune Engine. Please note that there is no automated build system. (The original build infrastructure is not available for the open source project. Due to a limited amount of time, it was not possible to set up a new build system.)

Before you start, check the Prerequisites.

How to build the DigitalRune Engine for MonoGame

MonoGame content projects are not included in the Visual Studio solutions. A few manual steps are required:

  1. Update all git submodules recursively (to load the MonoGame submodules).
  2. Run Source/MonoGame/Protobuild.exe to generate MonoGame project files and solutions.
  3. Build the Visual Studio solution DigitalRune-MonoGame-<Platform>.sln (Configuration: Release, Platforms: Mixed Platforms). A few projects will fail because the MonoGame content projects haven't been built yet.
  4. Build the DigitalRune content by running Build-Content-Release.cmd.
  5. Build the sample content by running Samples/Build-Content-MonoGame-<Platform>.cmd.
  6. Build the Visual Studio solution DigitalRune-MonoGame-<Platform>.sln again. Now, the projects should build successfully.
  7. Run the sample project Samples/Samples-MonoGame-<Platform>.csproj.

How to build the DigitalRune Engine for XNA

  1. Build the Visual Studio solution DigitalRune-XNA-Windows.
  2. Run the sample project Samples/Samples-XNA-Windows.csproj.

To use the Microsoft XNA Game Studio with Visual Studio 2012 (or newer) follow these instructions: Link

How to build the documentation

The DigitalRune assemblies for the XNA Framework are used as the documentation source. The documentation can be built using the Sandcastle Help File Builder.

  1. Build the Visual Studio solution DigitalRune-XNA-Windows.sln (Configuration: Release, Platforms: Mixed Platforms).
  2. Build the Sandcastle project Documentation/Documentation.shfbproj.

The output can be found in _help/.

Media

Terrain Rendering Example

Water Rendering Example

Water Rendering Example

Have a look at our YouTube channel for more videos.

License

The DigitalRune Engine is licensed under the terms and conditions of the 3-clause BSD License. Portions of the code are based on third-party projects which are licensed under their respective licenses. See LICENSE.TXT for more details.

digitalrune's People

Contributors

digitalrune avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

digitalrune's Issues

How to use instancing with [MeshInstancingNode]

Hi , i use that very nice Library since 1 year now. Normally i can find everything i want with the official documentation web site. But recently, i am front a new problem.

How to use correctly the class [MeshInstancingNode].
I try to follow the DigitalRune sample =>
Graphics - DeferredRendering - Number 31- BatchingSample
I meet not exception but Nothing is draw on the screen. If i don't try to use instancing and choose not use the class [MeshInstancingNode] , eerything draw correct.

Here is the code i use :

`
int numberOfInstances = listVectorScaleOctree.Count;
InstanceData[] InstanceData = new InstanceData[numberOfInstances];

for (int i = 0; i < numberOfInstances; i++)
{
InstanceData[i] = new InstanceData(listVectorScaleOctree[i], listPoseOctree[i], new Vector4F(1));
}

blockGroup.MeshInstanceData = new MeshInstancingNode(tempMeshNode.Mesh, InstanceData)
{
// It is recommended to manually set a suitable pose and shape, so that
// the bounding shape contains all instances.
PoseLocal = new Pose((Vector3F) GetCenterOfBoundingBox(bdgRef.Value)),
Shape = new ConvexHullOfPoints(listPositionOctree),
ScaleLocal = new Vector3F(
Math.Abs(bdgRef.Value.Max.X - bdgRef.Value.Min.X),
Math.Abs(bdgRef.Value.Max.Y - bdgRef.Value.Min.Y),
Math.Abs(bdgRef.Value.Max.Z - bdgRef.Value.Min.Z)
)
};

blockGroup.MeshInstanceData.Name = "cube";
blockGroup.MeshInstanceData.IsStatic = true;
blockGroup.MeshInstanceData.CastsShadows = false;
blockGroup.MeshInstanceData.IsShadowCasterCulled = false;
_Scene.Children.Add(blockGroup.MeshInstanceData);
`
Many thanks in advance guys

Problem load fbx model with DigitalRune

Hi guys, i have a problem when i try to load a fbx model with DigitalRune. It's little bit weird cause before with the trial version, everything goes well.
Here is the message i get on the Monogame pipeline tools :
'System.Object DigitalRune.Animation.Character.Skeleton.get_Internals()'

If somebody know how to solve this problem, i will be very gratefulto him ^^
Many thanks in advance, i keep hope

Fog not rendering

Hi, i hope still have some people available to help me on DigitalRune . I use that library for make a small voxel game.
Everything goes well. except when i try to render a fog. I don't know what i am doing wrong. I follow exactly the documentation here : http://digitalrune.github.io/DigitalRune-Documentation/html/0bc6a222-64d5-4642-a2b6-241e9017c873.htm
I used the fog object class in the digitalRune sample.

Here is my render function i use :

protected override void OnRender(RenderContext context)
        {
            _frameCount++;
            if (_stopwatch.Elapsed.TotalSeconds >= 1)
            {
                Globals.FramePerSecond = _frameCount / (float)_stopwatch.Elapsed.TotalSeconds;
                _stopwatch.Restart();
                _frameCount = 0;
            }
            if (context.GBuffer0 == null)
            {
                var renderTargetPool = GraphicsService.RenderTargetPool;
                var width = context.Viewport.Width;
                var height = context.Viewport.Height;
                context.GBuffer0 = renderTargetPool.Obtain2D(new RenderTargetFormat(
                  width,
                  height,
                  false,        // Note: Only the SaoFilter for SSAO requires mipmaps to boost performance.
                  SurfaceFormat.Single,
                  DepthFormat.Depth24Stencil8));
            }

            var graphicsDevice = GraphicsService.GraphicsDevice;

            context.CameraNode = CameraNode;
            context.LodCameraNode = CameraNode;
            context.Scene = Scene;

            graphicsDevice.Clear(Color.Black);

            // Frustum Culling: Get all the scene nodes that intersect camera frustum.  
            CustomSceneQuery sceneQuery = Scene.Query<CustomSceneQuery>(context.CameraNode, context);


            // Render opaque meshes.                                                     
            graphicsDevice.DepthStencilState = DepthStencilState.Default;
            graphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise;
            graphicsDevice.BlendState = BlendState.Opaque;
            graphicsDevice.SamplerStates[0] = SamplerState.LinearWrap;
            context.RenderPass = "Default";
            _meshRenderer.Render(sceneQuery.RenderableNodes, context);


            // ----- Sky
            _skyRenderer.Render(sceneQuery.SkyNodes, context);
            // ----- Fog
            sceneQuery.FogNodes.First().IsRenderable = true;
            _fogRenderer.Render(sceneQuery.FogNodes, context);

            DebugRenderer.Render(context);
            //_sceneNodes.Clear();
            context.RenderPass = null;
            context.CameraNode = null;
            context.Scene = null;
            //context.GBuffer0 = null;
        }


Building errors

Hi,
I have managed to compile the projects to create the dlls to replace the older ones in my interop-UWP application. But now I need to create the following 4 dlls for the Pipeline:

DigitalRune.Animation.Content.Pipeline.dll
DigitalRune.Geometry.Content.Pipeline.dll
DigitalRune.Graphics.Content.Pipeline.dll
DigitalRune.Mathematics.Content.Pipeline.dll

But I can't manage to do that because I get some errors. Has anyone created this files succesfully? it could be possible for anyone to upload them?
Thanks in advance.

Under water effect

Hi ,
Yes i'm still using your pretty XNA library ^^
I just have a problem with the [Under Water Effect] .
When i go under the water, the effect work very well. But the problem , is about the edges of the water node shapes !
My game is a "voxel game", so for example , a river is made with many water nodes voxel. And when i move the camera under the water, i can see the edge from all the nodes, each time i cross a new waterNode with the camera.
Do some people have a solution with that ?
I really hope soo. I'm so close to finish a "Beta" version of my game. Thanks a lot

Here is the code i use for create the shape and add the waterNode:

var waterOcean = new Water
{
	SpecularColor = new Vector3F(20f),
	SpecularPower = 500,

	NormalMap0 = null,
	NormalMap1 = null,

	RefractionDistortion = 0.1f,
	ReflectionColor = new Vector3F(0.2f),
	RefractionColor = new Vector3F(0.6f),

	// Water is scattered in high waves and this makes the wave crests brighter.
	// ScatterColor defines the intensity of this effect.
	ScatterColor = new Vector3F(0.05f, 0.1f, 0.1f),


	// Approximate underwater caustics are computed in real-time from the waves.
	CausticsSampleCount = 3,
	CausticsIntensity = 3,
	CausticsPower = 100,
};
WaterWaves waterWaves = new OceanWaves
 {
	 TextureSize = 32,
	 HeightScale = 0.01f,
	 Wind = new Vector3F(40, 0, 10),
	 Directionality = 7,
	 Choppiness = 1,
	 TileSize = 10,
	 CpuSize = 32,
	 // If we enable CPU queries, we can call OceanWaves.GetDisplacement()
	 // (see Update() method below).
	EnableCpuQueries = true,
 };
 
 Mesh mesh = MeshHelper.Merge(tempMeshNode.Mesh, listVectorScaleOctree, listPoseOctree);
var shape_init = new TriangleMeshShape(mesh.ToTriangleMesh());

WaterNode _waterNode0 = new WaterNode(waterOcean, shape_init)
{
	SkyboxReflection = Window_Game.Scene.GetDescendants().OfType<SkyboxNode>().First(),
	DepthBufferWriteEnable = true,
	IsStatic = true,
	EnableUnderwaterEffect = true,
	Flow = _waterFlow0
};

_waterNode0.Waves = waterWaves;
Window_Game.SceneWater.Children.Add(_waterNode0)
```;`

Build instructions are not complete/project cannot be build as-is

Following the build instructions on the front page is not enough to get DigitalRune build:

what I have done:

git clone https://github.com/DigitalRune/DigitalRune.git
cd DigitalRune/
git submodule update --recursive --force
==> does nothing actually !
=> step 2 impossible to run

MonoGame fork source is not downloaded, so I did:
git clone https://github.com/DigitalRune/MonoGame.git

Source/MonoGame/Protobuild.exe
Build\Module.xml has been created.
==> ???
so:

cd Source/MonoGame/
./Protobuild.exe -generate

=> generate solutions.

this version (custom ? old ?) does not support -build command as opposite to main MG branch :(.
so, with VS 2015 com, open DigitalRune-MonoGame-Windows.sln

build command => 8477 errors, 153 warnings, no project can be built
there are a lot of ref missing for some projects (content.pipeline.windows: assimp, cppnet, freeimage, ...)

EDIT: after restoring nuget packages I got: 483 errors and 109 warnings. Still not good.

Build instructions are wrong/not detailed enough and/or not accurate.
(Not revealing build process used by DR for the commercial version of the engine is a big mistake IMHO).

So bonus questions:
does anyone actually succeed to build the engine from source ?
If yes, do you mind sharing your way of doing it ?

Is this thing Dead?

This engine looked promising, until I saw that not only can no one contribute to the source, but none of the original devs are supporting it. Someone tell me some actual contributors are coming in soon.

Confused about license

Hi,
First of all, thanks for the release, I have own game engine written in C#, would like to use some concepts about the Editor and WPF, can I use your own stuff in my commercial game engine?

Sorry for question

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.