seedhartha

reone - KotOR engine recreation

Recommended Posts

Greetings,

I'd like to share with you the project I've been working on since summer 2020. Some of you may already have heard of it, as the development was public from the beginning.

reone is an open source reimplementation of the KotOR engine, similar to xoreos and KotOR.js, but with a number of key differences. It is developed with extensibility in mind, meaning that modding capabilities it aims to provide are on a whole other level compared to the vanilla engine. For example, the graphics have already been significantly improved with the addition of physically based rendering.

Current state of the project is such that the most fundamental engine subsystems are either complete or at least partially implemented, i.e. resource management, rendering, audio, GUI, scripting, conversations, combat and more. Given the current pace of development, I intend to finish the project by the end of 2021. My short term goal is to make the first Endar Spire module fully completable - a milestone, that will hoperfully bring more attention to the engine.

Technologically, reone is a custom engine based on SDL 2 and OpenGL 3.3, written in C++14. This alone makes it highly portable - reone is believed to be working on Windows, Linux and Mac OS.

Some background on myself: I'm a professional software developer from Russia and a prior contibutor to the xoreos project, responsible for most of its recent progress on KotOR.

Links:

GitHub Page

Project Roadmap

YouTube Channel

  • Like 8
  • Light Side Points 1

Share this post


Link to post
Share on other sites
3 hours ago, seedhartha said:

...the graphics have already been significantly improved with the addition of physically based rendering.

Most impressive! I'll take the initiative for a screenshot taken from the footage giving backing to a better look at it --

Spoiler

reone_PBRHDR_YTSS.thumb.jpg.9ab675cf90c7a50b4de63721659d2ae5.jpg

Don't have any questions regarding the project for now, only to give you my support on this. 🍻 Never thought I'd seen the day that KotOR can finally have dynamic lighting and stuffs -- so cool!

Oh! Actually there's one question -- graphics-wise, will/can you probably add something like post-processing effects with it? I know there's already an external program for that, though maybe you want to add yours that integrated with the engine. 😁

Share this post


Link to post
Share on other sites
Quote

 Oh! Actually there's one question -- graphics-wise, will/can you probably add something like post-processing effects with it? I know there's already an external program for that, though maybe you want to add yours that integrated with the engine. 😁

Since reone already uses multi-pass rendering, there's nothing stopping you from writing a post-processing shader. That's how self-illumination currently works, for example.

  • Like 2

Share this post


Link to post
Share on other sites

@seedhartha Wow this is unbelievable! 

Especially the PBR/HDR effects are truly impressive - those lights reflecting on the ground are giving tons of SW vibes: 

Reone PBR +HDR

Im not familiar how this  works exactly, but is  it  possible to play the game entirely in this engine (later)? And what about advanced texturing mods, which change the nomenclature to create more instances (e.g. TEL_wl01 -> JEL_wl01 etc. ) will  they work with this as well? 

 

Share this post


Link to post
Share on other sites
Quote

Im not familiar how this  works exactly, but is  it  possible to play the game entirely in this engine (later)?

Being able to play the entire game on a modern engine is kind of the whole point 🙂 Since this is essentially a one man project, I cannot promise to make an exact replica in terms of functionality, but it should be reasonably close.

Quote

And what about advanced texturing mods, which change the nomenclature to create more instances (e.g. TEL_wl01 -> JEL_wl01 etc. ) will  they work with this as well? 

Mod support is going to be hit-and-miss, but as a rule of thumb, most of them should work out of the box, as long as they add or modify vanilla assets, and do not fiddle with stuff on a lower level.

Edited by seedhartha

Share this post


Link to post
Share on other sites
20 minutes ago, seedhartha said:

Being able to play the entire game on a modern engine is kind of the whole point 🙂 Since this is essentially a one man project, I cannot promise to make an exact replica in terms of functionality, but it should be resonably close.

Mod support is going to be hit-and-miss, but as a rule of thumb, most of them should work out of the box, as long as they add or modify vanilla assets, and do not fiddle with stuff on a lower level.

That sounds great 😀

What about performance? When i added a lot of cubemap effects & animated textures to my Project its a real hussle even with MDL tweaks to get reasonable fluid FPS..

So out of curiosity, how will the game perform in the new engine? Are there tweaks e.g to increase VRAM  usage etc.?

Also, when giving e.g. Dantooine a facelift, the vanilla grass distance is horribly low. Is it possible now to  increase that distance?

Anyway, keep up the fantastic work!

 

Share this post


Link to post
Share on other sites
1 minute ago, Jorak Uln said:

What about performance? When i added a lot of cubemap effects & animated textures to my Project its a real hussle even with MDL tweaks to get reasonable fluid FPS..

So out of curiosity, how will the game perform in the new engine? Are there tweaks e.g to increase VRAM  usage etc.?

I keep a tab on performance and try to use modern OpenGL functions and optimization techniques whenever it makes sense. As it stands now, reone pushes hundreds of FPS in a typical module on my machine, noticeably more than I have using the vanilla engine. And yet, there are still ample optimization opportunities I can think of. You can expect reone to outperform vanilla, if only due to advancements in OpenGL.

Quote

Also, when giving e.g. Dantooine a facelift, the vanilla grass distance is horribly low. Is it possible now to  increase that distance?

Grass is currently not implemented at all, but I see no reason, why you wouldn't be able to increase the grass distance or crank any other graphical setting up.

  • Thanks 3

Share this post


Link to post
Share on other sites
On 2/23/2021 at 6:39 PM, Magnetiicz said:

Looking good the main feature i always wanted was working normal maps for all textures and models.

With this mod, normal maps will be the least of your concerns, there is much more possible like AO, infinite grass distance, YES: Custom REAL Time Combatbetter performance and more, as Seedhartha assured me. Also the games functionalities will be the same as before, that means mods should work as usual.

To illustrate the capablities of this baby i did some comparison screenshots from the PBR HDR vid above: 

Before:

1158407619_1before.thumb.png.8d2e74f57fe9b5f542aa463e4dfd65d0.png

After:

1690891688_1after.thumb.png.25e4a846058fad3a2715c6cc0355e3cf.png

Before:

1843421106_2before.thumb.png.bf4bcb3503dd658744ceff09f68cb9bd.png

Here the benefits of dynamic lighting are well visible, as you see. the illuminated spots at the floor are colored differently due to its unique lightsources in realtime:

558682964_2after.thumb.png.10eff069e1505eec93c9b011a8943f94.png

Before:

1998849749_3before.thumb.png.8510cf3cea285ac70caa9c88452b4c15.png

After: the scene isnt always that dark depending on the incoming light:

844249105_3after.thumb.png.7b947820864458602ba17c0eb04ac7c3.png

Before:

897794090_4before.thumb.png.60c287f58c81dcdeb7d03211001b4379.png

After:        And now my favorite ones - note, how much more it feels like Star Wars with those ground reflections:

711809296_4after.thumb.png.72aff380cf8707794c5d381de14eb189.png

493928344_5after.thumb.png.c9eb9836daf330d6fe03e640db89eab6.png

383889636_7after.thumb.png.601c81911616b3ec23ce09ebf4dcaf32.png

1520360456_8after.thumb.png.141d60efb92baae1df3068b858f1bf25.png

719189913_9after.thumb.png.d23973590c9a7cbae66945aca6f86edd.png 

Btw, these are vanilla textures, that means the look can be further improved dramatically by quality texture mods.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Hey @seedhartha your work is truly amazing.

The youtube videos are very impressive. I downloaded the release version 0.15.0 from the Github. However, I have a little trouble getting it to work.
I wanted to try my lightsaber mod with your amazing engine and dynamic lightning effects.

So I downloaded the zip unziped it. Changed the path in the cfg file to my K1 game folder. And run the .exe. But the game did not launch. DO I need to run it as admin or did I made a mistake when setting up the config?

So regarding changes to the engine itself. I guess there is no more the limit that a model can only be effected by 3 lightsources at the same time right? This would enable us to soooo much more. Would it be possible to write a ray tracing shader using the vulkan or dx12 api?

Keep up the amazing work! Cheers and stay safe.

Share this post


Link to post
Share on other sites
3 hours ago, Crazy34 said:

I wanted to try my lightsaber mod with your amazing engine and dynamic lightning effects.

So I downloaded the zip unziped it. Changed the path in the cfg file to my K1 game folder. And run the .exe. But the game did not launch. DO I need to run it as admin or did I made a mistake when setting up the config?

So regarding changes to the engine itself. I guess there is no more the limit that a model can only be effected by 3 lightsources at the same time right? This would enable us to soooo much more. Would it be possible to write a ray tracing shader using the vulkan or dx12 api? 

Thanks! 

PBR is not available in 0.15, hence "feature preview" in the video title. Currently, you either want to build reone from source or wait until I release the next version (which will take some time, as I intend to make Endar Spire completable with it).

Regarding launch: specifying the game path should be enough, yes. Did you install the VC redistributable, as the readme suggests? Other than that, you want logs to diagnose problems: either start reone from the command line, or add "logfile=1" to the config file and look for "reone.log".

Regarding graphical capabilities, current light limit is 16 lights (easily extendable). There is also an experimental feature to convert self-illumed models to actual light sources, which does spice interiors quite a bit.

Ray tracing is not entirely out of the question, but the engine would need to be rewritten to replace OpenGL with Vulkan. Definetely not something I'm interested in for the time being.

Also, keep in mind that to fully utilize PBR, vanilla assets need to be augmented with additional data: metalness and roughness parameters, per each diffuse texture, which I setup by hand for the preview video.

  • Like 3
  • Thanks 1
  • Light Side Points 1

Share this post


Link to post
Share on other sites

I have to wonder how dark the Ebon Hawk is now with the dynamic lighting. Mind posting a video of that?

Share this post


Link to post
Share on other sites
Posted (edited)

I wouldn't bother making another video of this, but here's some screenshots to give you an idea:

eh_before1.jpg.694d2bb154d040565d184dd7b7044c45.jpgeh_after1.jpg.a740f79ac0c80461ed5c338fcf937e45.jpgeh_before2.jpg.00f99b78e0fb991aaf884a0c690affdc.jpgeh_after2.jpg.b12dd55a6262cdaba8ced830042ee3f1.jpgeh_before3.jpg.551457971f80bbea68f2e983eb9447b5.jpgeh_after3.jpg.b58dd62bdf13db0d17d625c21e1e976a.jpg

Edited by seedhartha
  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites
3 hours ago, seedhartha said:

I wouldn't bother making another video of this, but here's some screenshots to give you an idea:

I really like how different the surfaces are reacting to the light, especially the diffuse Lightspots on the Hawk  as well as those on Dantooine are spot -on!

However, in the following picture the cyan lightspot at the ceiling looks a bit out of place. Its a bit confusing since you have a white light directly below.  So is that dynamic  lighting process automatic or could you tweak them and adjust the color a bit?

Light.jpg.303129b56c91e1905c7630f156628053.jpg

Share this post


Link to post
Share on other sites
Posted (edited)
17 hours ago, Jorak Uln said:

However, in the following picture the cyan lightspot at the ceiling looks a bit out of place. Its a bit confusing since you have a white light directly below.  So is that dynamic  lighting process automatic or could you tweak them and adjust the color a bit?

Lighting in these screenshots consists of both dynamic lights and self-illuminated meshes converted to light sources - no changes were made to the vanilla assets. What exactly is causing the cyan lightspot there is hard to tell.

I'll stress once more that in order to fully utilize PBR, modders would have to provide additional data: either separate metallic/roughness/AO maps per each diffuse texture, or at least a lookup table of metallic/roughness parameters. Here I've set metallic at 1.0 and roughness at around 0.3 across all surfaces - ideally all of those would react differently to light. 

Edited by seedhartha
  • Like 1

Share this post


Link to post
Share on other sites
On 3/1/2021 at 2:13 AM, seedhartha said:

Regarding launch: specifying the game path should be enough, yes. Did you install the VC redistributable, as the readme suggests? Other than that, you want logs to diagnose problems: either start reone from the command line, or add "logfile=1" to the config file and look for "reone.log".

Regarding graphical capabilities, current light limit is 16 lights (easily extendable). There is also an experimental feature to convert self-illumed models to actual light sources, which does spice interiors quite a bit.

Thanks for the assist. It was the VC now its working fine. Its really impressive what you achieved so far. Keep up he great work 👍.

On 3/1/2021 at 2:13 AM, seedhartha said:

PBR is not available in 0.15, hence "feature preview" in the video title. Currently, you either want to build reone from source or wait until I release the next version (which will take some time, as I intend to make Endar Spire completable with it).

Ah I see. Maybe its time for me to learn github and compiling c++ code. Regarding the lights: I am really curious how the new ambient light of my lightsaber mod would look in the PBR version. If you find the time could you take some screenshots. If you don't find the time, I will happily wait for the next release version.

19 hours ago, seedhartha said:

I'll stress once more that in order to fully utilize PBR, modders would have to provide additional data: either separate metallic/roughness/AO maps per each diffuse texture, or at least a lookup table of metallic/roughness parameters. Here I've set metallic at 1.0 and roughness at around 0.3 across all surfaces - ideally all of those would react differently to light. 

Yeah, so if you provide a engine which is pbr capable I thin there are so many talented texture artist in the communtiy which will other time provide all the different texture mods including the pbr channels. So with a functional PBR engine ready I think the MOST difficult part would be done. So thank you once more for your great work.

Share this post


Link to post
Share on other sites
Posted (edited)

This is amazing! I love this! Great job! 

Will it support tessellation, volumetric lighting and whatnot? It would be amazing if it is possible.

 

Either way, I love how Ebon Hawk looks. It is more beautiful than I could imagine. Even without bumpmaps and whatnot, which would enhance it even further.

 

One thing I will note though. I know it is too early to even consider this, but it is a pet peeve of mine and I need to mention it.

Can you please somewhere along the line make it possible that player and NPC's can holster / sheath their weapons when they are not using them? People using computer, piloting ships or having a friendly conversation while holding pistols and swords always looked weird to me. 

Edited by joshjonasone

Share this post


Link to post
Share on other sites
12 hours ago, joshjonasone said:

This is amazing! I love this! Great job! 

Will it support tessellation, volumetric lighting and whatnot? It would be amazing if it is possible.

 

Either way, I love how Ebon Hawk looks. It is more beautiful than I could imagine. Even without bumpmaps and whatnot, which would enhance it even further

Thanks!

Talking about possible - anything is, this is an open-source project after all. Do I have plans to add anything graphics wise? Not for the time being. I find it much more important to focus on the gameplay - particularly making the first game completable, minus the minigames.

Quote

One thing I will note though. I know it is too early to even consider this, but it is a pet peeve of mine and I need to mention it.

Can you please somewhere along the line make it possible that player and NPC's can holster / sheath their weapons when they are not using them? People using computer, piloting ships or having a friendly conversation while holding pistols and swords always looked weird to me. 

Changing vanilla behaviour is kind of a grey area, but that certainly sounds doable. Things like these could work as a feature toggle, I think.

  • Like 1
  • Light Side Points 1

Share this post


Link to post
Share on other sites
23 minutes ago, Salk said:

Would current mods be fully compatible with reone?

Most should, if not all of them. There are things in the engine that we hard-code as opposed to reading them from the game assets, e.g. new animations cannot be added at the moment, but we'll sort it out. As a rule of thumb, mods that create or modify *assets* should work (this includes new areas and scripts). Anything that relies of less studied files, or fiddles with vanilla executables, will not.

  • Like 1

Share this post


Link to post
Share on other sites

Version 0.16 of the engine has been released, which achieves a major milestone: the Endar Spire has been made completable. This is among many other things, such as lip sync and PBR. As always, if you're interested in checking reone out, you can download the latest release from GitHub, or build it from source.

https://github.com/seedhartha/reone

 

  • Like 1
  • Light Side Points 1

Share this post


Link to post
Share on other sites
45 minutes ago, seedhartha said:

Version 0.16 of the engine has been released, which achieves a major milestone: the Endar Spire has been made completable. This is among many other things, such as lip sync and PBR.

Looks promising, and congratulations for reaching the milestone! 🍻

Just a question though the answer might provide anyone here with insights as well -- did you utilize modular setup for objects like they did in Odyssey or something more real-time?

Share this post


Link to post
Share on other sites
5 minutes ago, ebmar said:

Looks promising, and congratulations for reaching the milestone! 🍻

Just a question though the answer might provide anyone here with insights as well -- did you utilize modular setup for objects like they did in Odyssey or something more real-time?

Could you define "modular"? reone reuses most of vanilla assets and does its best to recreate behavior of the vanilla engine. This means that modules are constructed from the same IFO, ARE, GIT, LYT and VIS files.

Share this post


Link to post
Share on other sites
18 minutes ago, seedhartha said:

Could you define "modular"?

I mean if it's more like -- let's say someone edits a creature object/UTC or any template objects inside one module; so for the change to take place immediately that specific module should need to be loaded the first time before entering, and won't work if the change made from a load of an already saved game [inside that module]. But if you say it does its best to recreate behavior of the vanilla engine then it's pretty much similar I'd gather. 🤔

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.