New Renderer (OpenGL 3.3)
-
This is really cool. This reminds me of what ichiru is doing. He is currently rewriting the entire of FL to use the OpenGL engine if I’m not mistaken.
https://github.com/CallumDev/Librelancer/
If I may, how does this actually work? I’m assuming that this is still basegame freelancer.
-
Yeah, I know what he is doing. But it is not so much comparable as he has way more work to do than I have (even though what I have to do is a lot).
Basically I create an own d3d8.dll which wraps every call from FL to d3d8 and translates it to OpenGL. I chose OpenGL because I am not a DirectX fan plus you don’t have that restrictions of the specific DirectX version. I can just mix e.g. OpenGL 4.5 ( which is dx11 equivalent) with the old fixed function pipeline from the 90s and don’t have to worry about the version. The graphics card only needs to support it. This saves me a lot of trouble.
There is also injecting own code into FL done to get the texture names, model names etc.
-
Oh cool. So you’re pretty much telling the game to change how it renders objects altogether?
-
Yes plus I am also adding new stuff which is being rendered. Otherwise you would not see a difference.
-
Very interesting project. Spectacular results so far as well applied to vanilla Freelancer. I’m not much of a graphics programmer but I would be very interested in it and its internals for a project I’ve had floating around the back of my head for a while, and I’m sure it would absolutely shine with something designed around it.
-
Thanks! I don’t know if you’ve read my reply, but I solved the latter last Sunday: http://the-starport.net/freelancer/forum/viewtopic.php?post_id=62352#forumpost62352 From what I gathered it is a windows problem since I had the same low res textures with my wrapper. I added it to the Limit Breaking 101 wiki entry.
@Kazinsal: Not sure what you have in mind but not that you get any ideas: I won’t have the time and I don’t plan to write another wrapper Also it will only work with Freelancer (I don’t translate every d3d8 call plus you need some hooks to get the textures etc.).
-
I can tell you it’s not a Windows problem because our D3D9 implementation doesn’t have that issue. As far as I know, it’s a weird interaction between AMD GPUs and D3D8 games.
-
If you use my wrapper there are no d3d8 calls anymore and the problem still remained. So my conclusion was that it must be another problem, since it did not matter which maximum texture size I returned. I even found the return value while I was reversing FL and changing it in memory has no effect. But maybe we should continue this discussion in the other topic.
-
Schmackbolzen wrote:
@Kazinsal: Not sure what you have in mind but not that you get any ideas: I won’t have the time and I don’t plan to write another wrapper Also it will only work with Freelancer (I don’t translate every d3d8 call plus you need some hooks to get the textures etc.).Oh, no, not another engine. Something I’ve been thinking of proof-of-concepting in Freelancer. I can’t seem to tear myself away from this engine…
-
Hehe, I see. Well I am curios what people will do with it, once it is released. But it is still a long way until that
-
Here is a video of the current state: http://www.flnu.net/downloads/fl2603_q20.mp4
With the new knowledge from reverse engineering the rendering pipeline of FL I was able to render the starsphere into a cubemap und use that for environment mapping. I also experimented with different lighting models and added bicubic texture filtering.
At the end of the video you can see the scene with disabled environment mapping.
I still need to fix the calculation of the normal, tangent and binormal vectors which are stored in the models. This is the reason you see bad lighting at some locations.
If you have any suggestions, constructive criticism or already like the look let me know!
I still need to add a material system, change the shadow rendering technique, fix the remaining bugs and a lot more stuff.
Edit: Exchanged the video with a better encoded one.
-
That looks stunning mate! Really nice graphics, would make good in a mod
-
Thanks! I still am not quite satisfied with the look. We will see what I’ll come up with
Btw. here is the video encoded with h265: http://www.flnu.net/downloads/fl2603_x265q20.mkv I made it for testing purposes and it is less blurry.
-
Thanks!
So here is a video of the current state: http://www.flnu.net/downloads/fl0906.mp4This is a graphical level of which I think it is ready for release (minus the shadows! I definitely need to change the technique!). Lighting is about two third PBR plus a few tricks I used to make it work with the old FL lighting and materials including textures.
I recalculated all the normals and don’t weight in the original ones yet so the geometry is less round at some places. But all the wrong lighting is gone now.
What’s left is fixing more bugs, a material system, some optimizations and different shadows. If there is time I’ll try to render better planet atmospheres, but maybe that comes for later versions.
Also I have been working with .Nx from this thread to create better models and textures, but this will take some time.
At this point feedback would be helpful, negative and positive. Things you like and you don’t etc.
-
Id be interested in how it renders the more “exotic” textures.
e.g. Nomads, effects, semi-transparent stuff, nebulas, etc. -
Besides for models this is untouched for now. It basically uses the old fixed function pipeline from d3d8 wrapped to OpenGL. I plan to use shader for effects etc. in later versions to to neat stuff.
Here is a nomad BS spawned at the station:
Edit:
And here a station in a nebula:
P.S.: The lightning flashes do cast shadows!
Here is the same scene in Vanilla FL:
-
cool
Id be willing to jump in with texture work.
Eventhough I have only little time due to a large mod update I still believe I can afford a bit time on that. -
Sounds good! .Nx has contacted you regarding the texturing work.
No one really has commented on the video. I would like to know whether you noticed a change compared to the video before. Is it better, worse or the same? What did you notice? I realize it is a matter of taste and I had to make a choice regarding the look. If the video is too blurry I can encode it with a better quality.
Edit: .Nx noticed me that some browsers (like chrome) have buggy video players and in that case mine look way better if you download them and watch them with a normal video player.