GithubHelp home page GithubHelp logo

lragnarsson / emerald-engine Goto Github PK

View Code? Open in Web Editor NEW
65.0 65.0 21.0 339.65 MB

3D graphics engine using OpenGL

License: MIT License

Makefile 1.17% C++ 76.80% GLSL 16.19% Shell 1.55% MATLAB 4.29%

emerald-engine's People

Contributors

hansfilipelo avatar isakwiberg avatar lragnarsson 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emerald-engine's Issues

Rethink light source updating

Investigate different storing options (such as UBO and SSBO) and how to sync CPU and GPU representations more efficiently.

Lighting on grass does not look good

Flipping normal vectors creates popping effects. The reason is that light sources that "hit the backside" of a grass straw contributes with 0 light right now.

  • Disabling this check from deferred.frag solves the problem but this also means that light sources on the wrong side of objects contribute with light.

This image shows the problem. The whole area inside the red circle should get bright, because thats how grass works.
skarmavbild 2016-12-04 kl 17 34 39

These images illustrate the popping problem:
Notice how a few grass straws are almost completely dark in the first picture, while most are brightly green.
skarmavbild 2016-12-04 kl 17 24 35
skarmavbild 2016-12-04 kl 17 24 45

I am not sure how we should tackle this in our deferred fragment shader, since it cannot know that grass should be rendered differently from any other surface. One solution would of course be to run another fragment shader with just the grass, and keep the grass geometry in the normal pipeline for SSAO, but it would be quite performance heavy.

Prepare demo scene

With dead trees (since we do not support alpha)
Rocks
Larger heightmap
Flying model casting shadow along spline

Store g-buffer components in view-space

To optimize SSAO. The lighting pass in the deferred pipeline needs to be moved to view-space for this to work. We would save a matrix product per SSAO-sample, (around 16 per fragment), if this was done.

Generate positions from splines

Useful for camera movement paths and moving light sources around following set paths

Possibility to create splines in scene file and attach splines to models perhaps?

Add logging and profiling functionality

To be able to conveniently write data to file. Would be nice to introduce a #-LOG_TO_FILE to encapsulate such sections so it is completely removed from the program if not in use.

Upgrade this project

... from a course project to a named project for use in this course and more!

What are your thoughts?

Name suggestions?

Scripting Support

Would be nice in the future!

A first goal could be to expose some model and light functions such as move to a scripting language.

I found an implementation of Scheme which is made for this purpose called Guile

It would be nice to have script files which can move things, trigger animations and such. Could also have functionality triggered by user input. Seems simple enough to also support a REPL for calling functions at runtime :)

Enable anisotropic texture filtering

Like so:

float max_aniso = 0.f; 
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &max_aniso); 
glBindTexture(...) 
//...
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, an);

keep min and mag filters as is.

Design demo scene

Place models in the heightmap.
Design splines for light sources.
Design camera splines through the scene.

Design grass LOD shaders

Tweak for a specific planar scale on heightmap that looks good.
Maybe add LOD3 with even less grass.

Data from models accessed in rendering stage

On each model, in each render loop, we access these properties:

model->draw_me
model->mesh->diffuse_map->id
model->mesh->specular_map->id
model->mesh->normal_map->id
mesh->get_VAO()

We could probably increase our cache-hit-rate a lot by putting these properties in a struct and then the struct for each model i a vector. I'll work with this starting today - or is there anything else we should look at that's more critical?

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.