Release: Advanced Renderer v. 1.1 beta 1
-
Here is the promised version for everyone to test: Download beta 2
Update: Version 1.1 Beta 1 is here: Download.
Screenshots what it does can be seen here (or if you want to know how it started read from the beginning)
All my videos and screenshots are from our mod: https://www.flnu.net
You can try the renderer out yourself there.You will need the 1.1 patch installed (including server.dll) as the renderer loads it (might change later on).
For showing the renderer menu you need to add this entry to your keymap.ini in DATA\INTERFACE\
[KeyCmd] nickname = USER_RESET ids_name = your id (add entry in your resource dll) ids_info = your id (add second entry in your resource dll) state = keydown
and pretty far down in section
[KeyMap] nickname = IDR_ALWAYS_PRESENT
you also need to add
key = USER_RESET
Also add this to your keylist.ini (same folder)
[key] id = USER_RESET
The group under which you insert it decides the page on which it appears. Also the order matters here. E.g. if you put it right under group 0 it will be on top on the first page.
Then you can choose a key for opening it in the controls menu of Freelancer.
For converting your models if you want to use normal maps etc. I uploaded a modified UTF editor (including source) here: https://github.com/Schmackbolzen/UTFEditor. You need to add Tangent/Binormal data to a model (there is a button) or use the mass processing in the Tools menu (last menu item). I also added a tool to scan your models for errors (the menu item above).
Important: Do not add Tangent/Binormal data to asteroids/mines etc. (ASTEROIDS\MODELS folder). It will crash FL. For them this data is automatically calculated by the renderer when loading the models.
I have written some documentation here: https://the-starport.com/forums/topic/6276/advanced-renderer-documentation-question-answer-thread
Other tools (with source) e.g. for mass converting textures etc. will follow. I did not have the time yet.
I also will add to the documentation later what I used to upscale the textures. A good starting point is https://github.com/ptrsuder/IEU.Winforms and https://github.com/JingyunLiang/SwinIR.
Feedback is highly appreciated! You can also write found bugs here.
Looking forward to some nice screenshots / videos!
P.S.:
You will probably have to adapt your light sources in the system ini files. Range and color play a role for the new lighting. You also can have color values larger that 255 if you want very bright light sources (original FL does not allow that).
Note also that point lights are ignored for now. Only directional lights work (and will be converted internally to point lights).The default materials is metal. This means If you have custom planet/atmosphere textures those planets appear metallic . You have to add those textures to the materials.json (I already added the default ones there at the first entry). Same applies to any other texture you don’t want to be metal. If you have mixed materials where a constant value is not enough, then you have to create special metalness/roughness maps. More details are in my documentation thread. Also for bases when docked this might not work yet (FL uses different rendering for most geometry there).
Also Freelancer has this weird bug that on some PCs it detects the maximum texture size as very small resulting in every texture being really blurred. For this reason the renderer applies my offset hack: https://the-starport.com/wiki/fl-binaries/limit-breaking/visibility offset 01AD6F in Freelancer.exe.
Known issues:
- Planets outside the light range of a light source can have bugged lighting
- Planet rings can have artifacts looking like gaps
- Light sources too close to objects can bug out the shadows
- Planets and static asteroids currently do not cast shadows (dynamic ones do)
- Planets currently do not occlude sun for light scattering
- There seem to be some weird shadow bugs in Vanilla FL sometimes (e.g. Starflier shadow on itself if you fly it)
- Currently only directional light sources (in system inis) are enabled. They are being converted to points lights internally. The rest will follow soon. This means spot and point lights in space do not work for now.
- I did not do much for bases yet (meaning when you are docked)
- Some nomads ships do not use new shading yet
- If the envmapbasic.txm is not a cubemap this will break the old lighting (e.g. the one from HD Edition mod)
- Rendering of distant objects is currently different due to how FL manages them
- Light scattering can sometimes be enabled erroneously
- Distant dynamic asteroids can quickly appear and disappear when e.g. you rotate the view quickly
- (Stuff I forgot and will add later )
-
First off, thanks for all the effort developing this new renderer. I think this has much potential to keep FL relevant and interesting for the players.
I’ve read through that other thread and also tried to get the beta 2 running.
In both cases I have questions.- Credit is of course given where credit is due. But the way how stuff is credited also might matter (or maybe not). What I mean is, would it be sufficient to write “Advanced Renderer by Schmackbolzen” or would you prefer maybe a more detailed reference… maybe with link to a project website or a link to this thread so people can actually find the original source and also know how to easily get in contact with you if required. Maybe a text snippet to use for the credit. Just a thought.
- Like I mentioned I just downloaded the beta 2 and wanted to give it a quick try. Everything done so far more or less was based on assumptions… so I copied the content right over test version of my mod and launched it. The game loaded, main menu appeared flawlessly and lighting changes instantly were visible. So far so good. However, moving the mouse just one pixel did lead to an instant crash. I tried this 5-6 times always with the same result.
Since there could be some unknown incompatibility with my mod and the new renderer I tried it with vanilla FL (fresh install + no-cd exe). Vanilla FL loads fine, there are visible changes on the main menu, mouse movement does not cause a crash. However, clicking on new game instantly crashes the game.
While potential issues with heavily modified FL mods are not that surprising the vanilla FL crash is. Even more since the crash while launching a new SP game always happens in server.dll (at offset 0x0001b300).
Maybe I am doing something wrong (clearly can not be excluded at this point).
Are there further ways to debug stuff with the new renderer?
-
Thanks I really hope so!
Regarding point 1:
It might actually be a good idea to link here. I will think about it. But currently it is up to you
As for point 2:
I added some more things I forgot to my original post. That includes instructions how to get the menu of the renderer open. Also I mentioned that the 1.1 patch is necessary. Do you have it installed? Plus I never tested whether SP works. Will do that later. -
Thx for the quick reply.
I did not use the 1.1 patch. I’ll try that later tonight.
Maybe it would be worth to include the 1.1 patch right into the renderer download to simplify it for the players? Again, just an idea.
If I get it working with the 1.1 patch I probably can try to figure out why the modded game crashes as soon the mouse cursor moves. I’ll share the results as soon available. Maybe that might help others if they run into similar issues. -
Amazing work! I plugged this into BMOD with zero configuration on either end and did a quick fly-through: https://www.youtube.com/watch?v=mzCYwa0ACuY
Out of the box it looks great. Looking forward to seeing how this develops further, incredible work
-
The 1.1 patch indeed did the trick with vanilla FL.
I also narrowed down the issue with the mod incompatiblity to two custom plugins. One plugin that altered some keymapping stuff (apparently conflicts with your keymapping code) -> in the end not a big deal. The other plugin is a custom anticheat version. This needs some further investigation.
In the end probably nothing that would cause troubles for other mods/players. -
That is good to know! Can you give me the name of the plugin with the keymapping problems? Maybe I can fix the issue. It probably is one from adoxa, right?
@IrateRedKite: Thanks! I am very happy myself that it works so easily. Was expecting it to be more difficult. Also watching videos from others using it is very interesting. Very curios what people will do with the renderer.
-
The keymapping plugin was a custom one, not created by adoxa. I don’t have the source code but I contacted the creator of the dll. It might take a few days to get a reply.
-
@Schmackbolzen said in Release: Advanced Renderer public beta 2:
ids_name = your id (add entry in your resource dll)
ids_info = your id (add second entry in your resource dll)I would like to know how to add entries in my ressource dll
Btw an amazing renderer you made here ! I installed it in SP and everything seems to be fine.
EDIT: Nevermind I left the ids blank and the shortcut work !
-
Some surfaces are very bloomy (overbright) - how to mute them down? (Gamma won’t work)
-
Probably by creating fitting specular maps (MetalnessMaps)
-
Yes, if a constant value is not enough, then you need to craft special roughness/metalness maps. Otherwise just create a new entry in materials.json or use an existing one which is working for that.
Since a lot people asked about that (especially custom planet textures) I added some text about it to my release post.
@NeoTendar: Thanks! Yeah you can leave them empty if you do not need any text.
-
So only metal textures having overbloom effect?
-
For PBR rendering this also depends on your light source. With old lighting, the light intensity was in range from 0-1. With PBR you can have 0-infinite (or rather max float, due to hardware limitations). This is why I added tonemapping. It makes it look more like film (yes, analog film) would behave. I will try to explain this later in more detail in my documentation.
In short if you don’t want to have it so bright:
- Change roughness of material
- Reduce light color intensity of light source or reduce its range
Note that the viewing angle also plays a role.
-
I use vanilla FL - not modded. Yes. Old lightning works well.
Why not to release these short answers directly for vanilla?Tried other settings: much better
-
The default settings in materials.json are more a rough orientation. They are used in our mod, where I have proper roughness and normal maps.
Note that I released the beta also so that people can understand better how PBR works. You will have to adapt your mod if you want to use it.
Also what you disabled there is the tonemapping, which just caps the maximum light value to 1. It is not a fix.
There will be another factor you can change soon: It is the exposure value, which already is used and currently set to a fixed value. I did not add this on purpose yet, because I am afraid people will use it wrong.
The idea is that you can change it in the config, or that I allow a value to be set per system. I also will experiment with automatic exposure control later. -
Used recommendations!
All Materials.json settings just not more than 0.2
As you can see - no more overexposure (over local contrast).
P.S. Btw i have used graphically patched freelancer.exe before - sooooorry -
About photography - there is fun feature at Reshade = LUT.
You may use LUTs from Photoshop, Lightroom, etc
Might do add something similar to tonemapping option? -
Final variant for Vanilla Freelancer:
"Roughness" : 0.6 "Metalness" : 0.2
Now there is no local overexposure at all.
-
Light sources and headlight are not working at my mod.
And i have only Directional lightsources.With: https://i.imgur.com/JnVNG1J.png
Without: https://i.imgur.com/VX1MzAd.png