Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Gregouar

Pages: 1 [2]
16
SFML projects / Re: ALAGEngine - 2.5D Isometric Shading Engine
« on: February 27, 2018, 09:32:37 pm »
So I decided to try to implement some Screen Space Reflection, but as expected it's quite slow.

Without SSR:


With SSR and normal map for the ground:


With SSR and flat ground:

17
SFML projects / Re: ALAGEngine - 2.5D Isometric Shading Engine
« on: February 26, 2018, 08:01:05 pm »
Quote
What do you mean with messy high poly things?

I mean that making a model ready to be put in a real-time rendering engine is an art that I do not master. I can only play with displacement maps and smooth modifiers to get something that look not too bad. But then I end up with a messy stack of polygons.

Quote
Do you mean costly on development time or at runtime for rendering ?

Well it depends; can be both. But I had in mind at runtime. What I'm still not sure if how it would compete with the same scene rendered in 3D with low poly mesh (buth high poly enough to give the same kind of look), keeping the same shading methods.

18
SFML projects / Re: ALAGEngine - 2.5D Isometric Shading Engine
« on: February 26, 2018, 02:28:36 pm »
Quote
Nice ! It's a good idea to create an engine, separated from the game project. When i start making a game with low level tools like SDL/SFML i always end up spending all my time creating the engine, then I have no motivation left for the game itself. Just be careful about the project size, a man can't compete with 100-people studios !  ;)
Sure, but I don't want to end up like with Holyspirit, where my architecture was a complete mess and nothing could be really used outside of the project. Here, I would like to do something at least a bit reusable and that will simplify my life afterward. But really, I'm not trying to make a full engine, with lots and lots of functionnalities and a perfect architecture. I'm just trying to make something that I hope I will be able to use correctly.  :P

In fact, from my experience, the two things that made me drop Holyspirit was the production of assets (it requires a lot of time and it's not really my cup of tea, even if I was helped a lot by my brother at that time) and the messy code (at some point it was not bearable to do bug chasing and add functionnalities, so I would like not to fall in this trap again).


19
SFML projects / Re: ALAGEngine - 2.5D Isometric Shading Engine
« on: February 26, 2018, 12:46:52 pm »
Quote
Looks neat. But maybe a stupid question: Why don't you just use multiple `sf::RenderTexture`s in the first place?
Thanks ! If I'm not mistaken, it should be faster to do multiple render in one pass than to do multiple passes. Especially when it comes to bloom where you would need to redo all lighting computations.

Quote
Btw, don't be shy: you don't have to hide images under spoilers. People are more likely to see them if they're not hidden. Plus, add w=480 or something like that in [img] tag so that images are not cropped in your post.
w
Okay, thanks for the advice !  ;D

20
SFML projects / ALAGEngine - 2.5D Isometric Shading Engine
« on: February 25, 2018, 05:50:02 pm »
Hi everyone,

First of all, let me introduce myself: my name is Grégoire, I'm a PhD student in mathematics. I spent most of my teenage years developping video-games (well, at least prototypes). Maybe some of you knew me from the French section for Holyspirit, which used to be my main project:


After a while, the motivation left me and I kind of stopped developping things (mainly to do more mathematics).
However, I'm now nostalgic of that time, and I recently decided to start again doing stuff (which is not good for my thesis, but heh). So, here I am to tell you about my new project !

The project

Origin

Six years ago, I started working on a some kind of 2.5D shading engine (i.e. old-school prerendered 3D assets but with dynamic, "mordern" lighting effects), using the SFML. It looked like this:

Not very good looking, alright.

Hence, in order to do video-games again, I decided to start by first developping a new 2.5D shading engine, still with the SFML and OpenGL. So here I'm to present what I'm working on, hoping to get some feedbacks and ideas how to improve it.

Generalities and progress

Technical specifications:
  • C++
  • SFML/OpenGL
  • Deferred Rendering
  • PBR Shading
  • Isometric/2.5D assets
   
Before going into technical explanations, let me put some nice looking screenshots, so that you can see what it looks like right now:



And moving:

https://youtu.be/jwHon2FViTk

Basic concept

The idea is very simple (and not original, there are other examples on youtube, also Pillars of Eternity use some kind of similar technology) and is the following: a lot (well at least I think) of 3D engines use a method called "deferred shading". It consists in doing all lighting computations in the final step of rendering, so that we do not need to compute lighting for obstructed fragments (i.e. pixels hidden by other objects). Concretly, what they do is to render all geometry of the scene in 4 differents buffers which will contain all the necessary informations to compute lighting of the final visible fragment (the one closer to the camera if you want). Those buffers consists in the albedo (i.e. diffuse color), orientation of the surface (some kind of normal map for the whole screen), material (like specularity) and position. I invite you to go take a look here for more explanations : https://learnopengl.com/Advanced-Lighting/Deferred-Shading

Now, what we have to do is replace the part we render the scene in the 4 buffers by rendering 2.5D isometric prerenderred assets. Of course, it means we have to prerender all 4 passes, like this:


Then in the scene, we get something that look like this:

Albedo:

Normal:

Heightmap (in 2.5D we only need the height, the position being given by the coordinnate of the fragment and the camera):

Material:

Note that the asset I use for the building is not PBR, so I just putted an uniform roughness.

Moreover, I use OpenGL depth buffer to determine if a fragment is obstructed by another, so that I can intersect 2.5D objects like if they were in 3D. This will allow me to render complex scenes without having to cut things in multiple parts (like I used to do with Holyspirit for example).

Then, using those 4 buffer, I can dynamically light the scene, add SSAO (Screen Space Ambient Occlusion, i.e. shadowing the corners using the screen geometry), add bloom, etc. In order to make the engine as modern as possible, I decided to implement PBR Shading (i.e. Physically Based Rendering). Those are methods more advanced than the classical Bliin-Phong model, inspired by the physic of our world. They were mainly developped by Disney (for their animation movies) and Epic Games (for the UT4), I think. They allow to get a really nice realistic result and they make the creation of assets more intuitive (material are defined by their "roughness" and "metallicity"). Just by playing with those 2 parameters we can get these kind of results:


I invite you to read the following tutorial to learn more about it: https://learnopengl.com/PBR/Theory

What the engine can do now:
  • Render the geometry of the scene with 3D intersection of objects using their heightmap
  • Lighting of the scene using PBR methods
  • Directionnal shadow casting using the visible geometry of the assets
  • Dynamic shadow casting for omni lights using invisible simplified 3D geometry added to the scene (good for buildings, wall, ...)
  • SSAO
  • SSR
  • Bloom
  • Two layers of rendering, allowing basic transparency (mainly for antialiasing)
  • Optimization for static objects using tiling (I'll explain this in another post)
   
Most of the "classical effects" were done by following and adapting the content from here: https://learnopengl.com/

Goals

In the short term
There is still a lot of things to do to improve the architecture of the engine, add basic fonctionnalities (animated objects for example) and optimization (e.g. optimize lighting and shadowing). I also plan to do rain, with wetness effect for exposed zones (with a similar tech than what I do for directionnal shadows). I'm also thinking about adding 3D mesh in the scene (maybe for the characters, because prerendering all animations is really costly in terms of textures, eating a lot of ram and disk space) and for animated foliages. I'll add screen spaces decals, for blood rendering for example, and particles for smoke. I would also like to add terrain editing using heightmaps. I'm also thinking about adding screen space physics simulation for particles.
And if you have other ideas, I'm listening.

In the long term
I plan to use the engine in an indie open-source game (not Holyspirit 2). But the project is not mature enough for me to talk about it right now.

And why not 3D ?

The first answer that comes to my mind is very simple: I can't do low-poly 3D mesh. But I can do messy hight-poly things. Hence it means I can make my own assets.
Moreover, I really like the old-school look that the 2.5D iso gives.
Finally, it's really fun to develop, and it allows to do interesting optimizations (but it's more costly than simple 3D or classical 2D).


What about the sources ?
You can find them here https://github.com/gregouar/ALAG. However, they are still a bit messy so you should be careful before using anything from there. Also, I must warn you that I use a modified version of SFML where I add a new class: MultipleRenderTexture, allowing me to do multiple render targets in an SFML-like framework (but it's probably not really well done and maybe Laurent will be mad to see what I did  ::) ).

21
SFML projects / Re: Screenshot Thread
« on: February 17, 2018, 11:19:36 pm »
Thanks guys ! =D

I added a bit of bloom and tested something for dynamic shadow casting:



The problem here is that since I'm using only prerendered 2.5D assets, I do not have access to the full information about the geometry of the objects. It was not too much of a problem for the directionnal shadow casting since I assume the sunlight to be oriented with a direction close from the view. But for dynamic lights that move in the scene, it is clearly not enough (and also, it need to be recomputed quickly, which is not possible with the way I'm doing it).
Hence, I decided to add some invisible "3D objects" to the scene, that act only as shadow casters. The idea would be in the game to add only those for big, simple geometric entities (like walls, pillars, barrels, etc).

22
SFML projects / Re: Screenshot Thread
« on: February 07, 2018, 06:33:25 pm »
Hi everyone !

It's been a while since I went here (maybe some of you remember me from Holyspirit), but now I'm back with a new project in mind (I'll tell you more probably in a couple of months). Here are the first screens of the PBR 2.5D isometric engine I'm developing for this projet:




Note that I puted the sarcophagus as metallic, also remark that the leafs on the tree are translucent.
 
Technically, it's deferred shading using PBR equations from https://learnopengl.com/, SSAO and prerendered 2.5D assets (4 passes : albedo, normal, heightmap and material). I'm using almost exclusively SFML, I just had to add a MultipleRenderTexture class to improve performances for the deferred rendering (wich is only compatible with system supporting FBO).

23
General discussions / A new logo for SFML
« on: June 17, 2011, 05:33:27 pm »
Do you like my Holyspirit's style SFML logo ?  :lol:




I test something in Cpl.Bator style :


Pages: 1 [2]