GithubHelp home page GithubHelp logo

nevilclavain / drawspace Goto Github PK

View Code? Open in Web Editor NEW
25.0 6.0 7.0 171.57 MB

Space-game oriented rendering engine

C++ 56.97% C 36.99% Batchfile 0.01% HLSL 2.55% GLSL 2.08% CMake 1.04% Lua 0.37%
3d-clouds c-plus-plus procedural-generation planets direct3d11 rendering-engine graphics-programming ecs shaders hlsl

drawspace's Introduction

DrawSpace

My C/C++ graphic rendering engine including features for 3D spaces simulation, especially procedural planets generation & rendering, including accurate atmospheric effects, 3D clouds, water rendering, etc...

Full GPLv3 text is available in the ./licenses directory

DrawSpace currently rely on some 3rd-parts libraries:

** Direct3D 9 SDK : 	      http://www.microsoft.com/en-us/download/details.aspx?id=6812
** Direct3D 11 SDK :          https://www.microsoft.com/en-us/download/details.aspx?id=6812
** FW1FontWrapper for D3D11 : https://fw1.codeplex.com                  
** Bullet physics 2.82 :      http://bulletphysics.org/wordpress/
** Assimp :                   http://www.assimp.org/
** Lua 5.1 :                  http://www.lua.org/
** PhysicsFS 2.0.3 :          https://icculus.org/physfs/
** CEGUI 0.8.7 :              http://cegui.org.uk/
** JSMN JSON parser	      https://github.com/zserge/jsmn
** RSA Data Security, Inc. MD5 Message-Digest Algorithm
** Wombat efficient texture-free procedural noise library for shaders : https://github.com/BrianSharpe/Wombat

1/ cmake -G"Visual Studio 16 2019" -A Win32

2/ duplicate 'config' directory to 'config_deployment'

3/ open project with visual studio : ds_engine.sln

4/ under VS IDE : compile all by right-click -> 'generate' on ALL_BUILD project and/or 'INSTALL' (Debug and/or Release)

5/ right-click on project 'rt' -> 'properties' : go on 'Debugging' section : -> 'Command' : set value to "<drawspace_install>\apps\Debug\rt.exe" -> 'Command args' : set to module to run : gameroom,waterdemo,impostorsdemo,nebulaeluademo,planetluademo,etc... -> 'Working directory' : set to "<drawspace_install>\apps\Debug"

Animated water rendering:

alt tag alt tag

Bones-based animations execution :

alt tag

Material shaders:

alt tag

Procedural planet:

alt tag alt tag alt tag alt tag alt tag alt tag

drawspace's People

Contributors

krakoukass avatar nevilclavain 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

drawspace's Issues

widget hierarchy

implement widget hierarchy in the aim to :

  • render children (regarding parent dimension)
  • intercept and transmit mouse events to children

renderingqueue 'not ready' exception blocking & masking lua scripts errors

when a lua script encount an error between node registration in rendering queue and a rendering queue update() call, this one raise an exception, stopping gameroom and preventing lua error text display. We shall change this behaviour by :

  • removing exception throw from rendering queue and replacing it by a error stored in a rendering queue class string member; in the same time rendering queue continues to loop but doing nothing, rather than throwing an execption
  • adding accessor to lua class to check rendering queue error status from lua

Enhance water rendering

current water rendering has only reflexion. Need to:

  • add refraction with water background
  • modulate reflexion/refraction with normale correlation

release configuration

configure 'release' version of MSVC2005 projects for:

  • DrawSpace core lib
  • D3D9 plugin
  • samples

Vertex textures missing in lua rendering data model

int LuaClass_Rendering::LUA_configure( lua_State* p_L ) method :
add and complete following structure :
std::vector<std::vector<std::vector<std::array<Texture*, RenderingNode::NbMaxTextures>>>> layers_vertextextures;

NB : LuaClass_RenderContext class already support vertex textures

'chunk' unused

Remove unused 'chunk' object (replaced by 'chunk_node')

Meshe update in renderer

Add a method on renderer plugin to update registered meshe data (vertex position change, new vertex added, etc...)

VS project name

Visual studio project solution is still named drawspace_msvs2013 -> choose drawspace_msvs2013 or are neutral name

FPS Camera

implement camera support, and FPS-style moving for camera

Lua models : bad things

encountered some ugly things in lua models files :
1 - [model].createmodelview -> one 1 pass args (p_pass_id) is not enough : need an array with all rendergraph passes
2 - [model].createmodelview -> node attachment in entitygraph is hardcoded !! ( p_entitygraph:add_child('root',p_entity_id,entity)) : need an argument for the entitygraph node we want to attach

apply transformation matrix to N, T and B vectors at model loading

-Meshe class must host 3 matrix to apply to N, B and N.
-Those 3 matrix are retrieved by resources system at meshe loading time (assimp)
-resources system applies those 3 matrix to T, B, N vectors generated after model load
-Those matrix are identity by default
-those 3 matrix can be modified from lua script

more plugins...

CBFG font importer and AC3D meshe importer must be provided as plugin

button widgets

implement some button widgets:

  • pushbutton
  • 2 states buttons

Shader cache events

resource system shall send notifications (texture loaded, meshe loaded, shader loading and/or compilation,...)

long double

experiment with dsreal = long double (128 bits)

Tab vs spaces

I forgot to configure my Visual C++ IDE to replace tabulation with n spaces...
The result is a indentation misalignments in a lot of .cpp and .h files

Meshe::VertexAverage not finished

method VertexAverage of Meshe class only compute average of x component (y and z
not done)
BTW, should rename this method to 'VerticesAverage'

coords conversion methods

regroup all coordinates conversion methods in a single utility class

  • virtual from viewport
  • pixel windows from viewport
  • etc...

alpha blending

Implement alpha blending operation in the D3D9 plugin (method D3D9Renderer::SetRenderState)

lit shader : work with bump vectors textures

add possibility to manage bump mapping in lit shaders with textures containing direct bump vector information (actually bump information is computed from height map gray textures)

renderingnode meshes management

Meshe system adressing through simple index in the rendering plugin is inadequate.

Rendering plugin allow renderingnode to register one ore more meshe. When the renderingnode queries the plugin to render one meshe of his own, the index (integer) for the desired meshe must be provided to the plugin. But what happens if one of the others meshes is deleted ? all other meshe indexes prior to the deleted one will be invalid :(

Replace this simple integer index by a map with a string id key

misc functions are HLSL dependent

Some misc utils functions (pacebox, text) have intrisic shader code, provided as string; those hard-coded shaders in HLSL; this is very very bad; to solve that

on renderer interface, add the following enum:
{
HLSL_SHADER_LANG,
GLSL_SHADER_LANG,
}

on renderer interface, add a method to get current shader langage from the renderer plugin (HLSL_SHADER_LANG, GLSL_SHADER_LANG)

call this method in the concerned misc functions, and initialize shaders with the corresponding langage (hlsl or glsl)

resource system : T,B,N vectors managed

for each meshe, we can select one computation mode for Normales, and T,B vectors with following enum :

  • NORMALES_DISCARDED, TB_DISCARDED : ignored, not setted in meshe vertices
  • NORMALES_AUTO, TB_AUTO : try to load from model, if not available in model, computed with Meshe::ComputeNormales() and Meshe::ComputeTBs()
  • NORMALES_FROMLOADER, TB_FROMLOADER, try to load from model, if not available in model, computed from assimp
  • NORMALES_COMPUTED, TB_COMPUTED : computed with Meshe::ComputeNormales() and Meshe::ComputeTBs()

This mode is stored in Meshe class
This mode can be modified from lua script

fast & easy text display

request for a function that allow easy creation of text display through a fast static+text widget setup

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.