New Renderer (OpenGL 3.3)
-
Just wanted to drop in and thank you for working on this. It’s amazing work well beyond what I can do. Would love to be able to work on shader creation and implementing it one day. For now, it’s just creating more content, haha.
I’d like to learn about shaders, but how are you even getting it into the game? Are you having to write it and then inject a DLL into the game .exe so it can have those resources? Or is there another way you’re managing to get it loaded? Curious.
Hope you’re both well and progress is still going well, too.
-
Sorry I totally forgot to reply here (usually I write in FL discord nowadays).
Thank you! It basically is a Direct3D 8 dll which gets loaded by the game. But it does way more than just wrap the rendering calls to OpenGL. There is a lot of hooking into the game engine (which needed a lot of reverse engineering) in the background. The shaders are plain text GLSL, so you indeed can play with them if you are up to it.
I managed to do much progress and currently am working on getting the mod in a state where I can ship an installer (last minute fixes, clean up stuff, updating the installer etc).
I was able to increase the texture quality a lot (including normal and roughness maps). Here are some screenshots and a video:
-
No worries! I’m on the Discord too as 5anitybane/inhaledchaos. Trying to relearn all the modding knowledge I lost and make a set of videos for our community to try and draw some new blood in.
Holy frolicking spaceballs. Your work is AMAZING. I usually hate graphics update mods as they change the flavour entirely, e.g. Morrowind. For Freelancer, you’ve just made it feel like a graphical remaster while keeping the feeling alive. That’s special. Is this something you’re making publicly available or donation based? I’d like to donate at least a few coffees if you’re releasing that. The FL community has been dear to me for a long time (though I am relatively new to The Starport, I modded back in TLR days) and what you’re doing helps it in a BIG way. Modding FL again is already exciting, but I cannot wait to open up FL in your new renderer. Very, very exciting.
-
Thanks! I actually feel the same. It’s very hard to find mods which keep the original mood. So if you think I succeeded here it makes me very happy
I did not like the current normal maps (somehow it looked a bit like there were compression artefacts) and did some tweaking to the generating process. They are now way more clean. Here is an example:
Regarding donations: That is very kind of you. I still am not sure how to handle this, since I am not so fond of PayPal and do not plan on making an account there. Nevertheless the new renderer will be free for anyone as it should help keeping Fl alive. Donations would be completely optional.
-
@Schmackbolzen looks awesome, except old textures. Can you try this render with my 2k station textures? You can find it in Freelancer HD or I can send it directly.
Example:
https://media.moddb.com/images/mods/1/35/34380/Freelancer_2021-02-14_16-39-49-52.png -
Thanks! Sure I can try, but my textures are not the original textures. They are 4x upscaled with ESRGAN and the model I wrote a few posts before. I attached a texture as an example.
I will try the the same process for roughness and normal map creation to some of your textures and we will see. For the height maps I can use the same as I currently use (drawn by me and one by Freestalker).
If you want perfect results you would have to create metalness, roughness and normal maps for your textures yourself. Also you would have to convert the textures to albedo maps, as the details are in the normal / height maps. My method currently tries to do exactly that, but it only can do it for the fine details.
Edit: I had a look at the mods and it would be better if you can send me the original images in png/jpg format to avoid compression artefacts. The ones from the mat files in the SOLAR folder (no subfolders) are enough to get a good impression.
-
Hey Schmack ! I found Swinir Super res And it gives a nice look to straight line compared to ESRGAN Ground textures and it gives a subtle metalic roughness texture. It’s accurate and not that blurry compared to some ESRGAN pretrained models. I think you can try foolhardy remacry. Swinir removes random dithering too.
Here is another DXT compression reducer : https://drive.google.com/file/d/1WXBNdlqDWV10a3L1_U7zuNkSpN9aBF0M/view I gonna try to look how it behaves with Swinir and Foolhardy Remacry. I’m testing it curently [d]I gonna do a post to show the result with Swinir and foolhardy remacry.[/d] OK I tried ! So BC1 smooth used once or twice + Swinir or foolhardy remacry is better than these two other methodes.
For albedo creation, I can use Blender but as my PC isn’t powerful enough, it crashes if I have too much polys… -_- I already created te base material by doing some blender displacement tricks. I can use bump maps to do the displacement too. So I can have a good base by downloading free PBR materials and materials that have bump maps in it. There is this : Artomatix It can convert any diffuse to PBR. I think I will have to try it but if it needs CUDA cores or a powerful PC, I will not be able to use it.
Edit : System requirement for Unity ArtEngine : https://unity3d.atlassian.net/wiki/spaces/AR/pages/454426739/System+requirements+and+compatibility
Edit 2 : Here is an example of how to use the PBR material generation. https://unity3d.atlassian.net/wiki/spaces/AR/pages/454426727/Material+Generation
Edit 3 : Albedo Generation : https://unity3d.atlassian.net/wiki/spaces/AR/pages/454426754/Albedo+Generation -
Happy New Year 2023, Schmackbolzen! Hope you and family had a good holiday period.
I saw you posted another comment here on TSP and remembered this new shader project. How has the project fared across 2022? It was looking amazing in the last footage.
-
Thanks and likewise!
I actually have been pretty busy and used most of the free time to work on the renderer. Also we mostly write in discord nowadays. Turned out Swinir is really good for planets as you can see in the screenshots below.
I currently am testing with a very small group of players. I am fixing the last crashes and some more severe rendering issues. So far it mostly runs on other hardware than mine. The goal is to launch the public beta of the mod including the new renderer in the next 1-2 weeks! Expect some more screenshots and videos for the announcement (this time not done by me).
Here are some screenshots of the version we are currently testing:
-
Right click - open new tab
-
Thanks! I also am more than happy with the look. Now it mostly depends on the models and textures.
You can try the out the renderer yourself now! We are currently running a public beta test of our mod with the new renderer. The screens you see in the news post have some tweaked material settings and I also found some bugs during our initial testing which are fixed now.
@Traversal: The backgrounds are currently from “Freelancer: HD Edition” mod. What do you mean with “Will it require vanilla or also work in HD?”?
Here is a video from one member of our server team: https://www.youtube.com/watch?v=3H1NDFXbw8w
Some new screenshots with current version:
-
@Schmackbolzen - Very well done it has a good feel and I wish you luck on the upcoming mod. I also downloaded and testing it again very nice.
Here is my question to you what files do I need to get this working in mine? Please PM me for the information. -
Thanks! Give me some time to get the tools I wrote in shape so that I can upload the source code and binary files. Also I will explain to everyone how to use the new renderer in your mod. The latter will be some effort, though.
-
-
-
I wanted to give you guys a quick update after my last post. I still am working on the renderer and have fixed many bugs (mostly visible rendering issues) since the public beta release. Also there has been a lot of optimization work and I am currently working on some more optimizations for the shadow calculation/rendering. After that the list of remaining bugs is very small (and are minor ones). It should be out of beta once the last ones are fixed. Then I hopefully can start working on releasing the tools so that everyone can use it.
One recent change is the improvement of the light scattering. Now it knows where the suns are and only is enabled for them (before that it only used the first light source (not sun!) in the system). Also you now can have up to 8 suns with light scattering in one scene (the maximum limit actually is currently arbitrary set from me). You can reduce the maximum number in the settings window of the renderer (e.g. if you have a slower graphics card).
If no sun is visible light scattering is disabled now (before it was always on when in an asteroid field or nebula).Example screenshot of 3 suns with light scattering:
One bug that has given me trouble for a very long time is some weird memory behaviour. After some time the renderer just could not reserve any more memory resulting in missing textures and crash of Freelancer shortly after. On some PCs this even was after 15 minutes when switching between many systems (I finally was able to reproduce it after switching nonstop systems for about 45 minutes on my PC). For the technically inclined: Address Sanitizer using VS2022 (https://learn.microsoft.com/de-de/cpp/sanitizers/asan?view=msvc-170 and Visual Leak Detector using VS2017) do not find anything. Also lets just say I usually know how to avoid and also find memory leaks.
My current (also not so good solution) is to enable the Large Adress Aware flag for the Freelancer.exe. After I have had the registry setting “MEM_TOP_DOWN” on for some weeks I can at least confirm that Freelancer has no problem with the flag (while the registry setting funnily broke some windows 7 control panel applications, meaning they are not large address aware). For now that solved it for our players (unless you play for lots of hours).
I suspect memory fragmentaion going on here, but that remains to be seen. I will come back to this later and it also might have disappeared by then due to my optimization work and code cleanup process.
I was planning for some time now to post some sort of FAQ thread where I explain what the renderer can do and what you need to do to convert your mod, but (as always) I did not have the time to do that, yet.