Closed CrosRoad95 closed 4 years ago
Is it worth?
This would be the equivalent of embedding Unreal Engine inside Unity - the real solution is to just use Unreal Engine.
I really respect the amount of work you've put into this so far, but I don't see any obvious benefit in embedding another game engine into MTA. Please correct me if I am wrong.
embedding latest version of unreal engine inside 16 years old unity - worth. And this is not game engine, it just render graphics. it took me under 2 weeks to make it, while saml1er spent half a year to make custom animations and he spent a lot of time by fixing issue with "setTexture" while i don't have to face with such things.
instead of adding another layer, duplicated functions, i could make function to switch between old renderware, and ogre and get effect like that https://www.youtube.com/watch?v=kTedftJc96U
getCameraMatrix = OGREgetCameraMatrix (or something like that)
This would be the equivalent of embedding Unreal Engine inside Unity - the real solution is to just use Unreal Engine.
Technically you are correct but practically this is an elegant solution to many issues we are facing, the possibilities are endless (new effects, infinite render distance, new shaders). I am trying to make my server looks as good as possible but the performance of MTA is currently beyond abysmal, even a very simple map and very simple shaders can cause absurd CPU load and it is just not fun at all to play with 40 fps while using an i7 6700. My goal for my next server is stable 60 fps, i dont know yet how to achieve this with the things that i planned. Outsourcing effects and some other stuff to a more performance-friendly and better-looking OGRE variant seems like a start.
Ogre
prefix before functions will looks ugly, i'm looking for better names
getCameraMatrixOgre the word "ogre" should be inserted in any case, one question, where?
or just put all of these functions into some namespace?
ogre.functionName eg ogre.getCameraPosition
. qaisjp help
If we did this (which I think we should not, and which I am confident we won't merge), yes, I think it should namespaced underneath an ogre
module.
Well, i created minimal example of working ogre in mta, here's result ( debug build ) https://www.youtube.com/watch?v=S0hXvpUcRN0
general idea:
make it in CEF style, but restrict to single instance, user could create it and manipulate with functions. it creates regular texture which can be draw with any current dxDraw function, example at full screen.
adventages
Ogre is still supported, has huge base of users, games based on ogre you can download at steam ( look at ogre website ). its stable, supports everything people want: lights, shadows, infinity draw distance, multiple cameras, multiple views. many variants of shaders. it uses directx11 saml1er want to add. has a lot of cool plugins like: particles, procedural meshes, material editor http://wiki.ogre3d.org/Ogre+Procedural+Geometry+Library http://wiki.ogre3d.org/HLMS+Editor
it is multithreaded, so if you load models/textures/shader it will not cause lag spike at all.
overall information:
even if it is minimal example, branch is massive https://github.com/multitheftauto/mtasa-blue/compare/master...CrosRoad95:ogre?expand=1 it introduces 8 new projects:
ogre
- main ogre projectOgre Core
- interface between mta and ogre, decrease amount of new headers in main mta projects.Ogre test
- for standalone quick tests without needed to start mtaSTBICodec
- support for textures in formatsjpeg,jpg,png,bmp,psd,tga,gif,pic,ppm,pgm,hdr
+ default DDSRenderSystem_Direct3D11
- directx11 render systemogreRTShaderSystem
- runtime shaders compilerogrePluginParticleFX
- particlesogrePluginAssimp
- to make possible load model in any format, generate ogre .mesh and .material file in flyproject will not compile for you, i set for now fixed pathes in some files.
my questions:
createLight
returns string ( identifier eg "light_id" ) ?other
example how looks shaders/materials, you can put multiple in single file
i'm waiting for feedback