brother_david Posted March 27, 2019 Share Posted March 27, 2019 Its a far stretch but in BeamNG (which is based on T3d) after an update of the engine which i guess is from d3d9 to d3d11, PostFx encountered problems. HDR not working as it should, specifically Tonemapping (bloom has some problems, or atleast isnt the same as far as i can tell). A far stretch as i mentioned but has anyone else encountered the same or have an idea of what might be causing the problem?They have a Techdemo from 2015 which it looks like its still using d3d9 and there Tonemapping works (and bloom is slightly different). Quote Link to comment Share on other sites More sharing options...
Duion Posted March 27, 2019 Share Posted March 27, 2019 Well a little more information would be helpful. PostFX settings are meant to be adjusted individually. Ideally you post a screenshot on what you want and one of where you are currently at. Quote Link to comment Share on other sites More sharing options...
brother_david Posted March 28, 2019 Author Share Posted March 28, 2019 Well a little more information would be helpful. PostFX settings are meant to be adjusted individually. Ideally you post a screenshot on what you want and one of where you are currently at. Thank you for your reply.Ill try and get those screenshots, not at that comp now though.Basicly its an issue where nothing happens when adjusting the Tonemapping Contrast slider in PostFx.In BeamNGs (running directx11 now afaik) case it worked on their earlier releases (as can be seen in their 2015 Techdemo which uses directx9) but, and this hasnt been confirmed yet, after adding directx 11 support the whole HDR part stopped working. They have got it partially working now but seems to pay no attention to it (they have other things to focus on ofcourse) so thats where i am trying to see if i can fix it since i personally think its a big part of the gfx.Going through their hdr files (hdr.cs and so on) and various PostFx files i can see that theres some minor differences compared to the T3d engine files.What i guess might help would be if someone could push me in the right direction of where to look, in those PostFx files (which have the same hierarchy as the T3d equivalents) and/or which of the postFx files are effected when adding Dirtectx11 support. A shot in the dark as i stated so im prepared that this is a dead end but spent hours yesterday evening going through the files, trying to see something that looked off. Quote Link to comment Share on other sites More sharing options...
Duion Posted March 28, 2019 Share Posted March 28, 2019 Yeah that slider is broken, I fixed it though, it is waiting as a pull request:https://github.com/GarageGames/Torque3D/pull/2140It was an on/off button before, I turned it into a slider, since the default value was way too strong, now it can be adjusted very smoothly. Quote Link to comment Share on other sites More sharing options...
brother_david Posted March 28, 2019 Author Share Posted March 28, 2019 Yeah that slider is broken, I fixed it though, it is waiting as a pull request:https://github.com/GarageGames/Torque3D/pull/2140It was an on/off button before, I turned it into a slider, since the default value was way too strong, now it can be adjusted very smoothly. Looked at it, youre talking about the Colorshift right? I really like the colorshift slider option of yours, its definitely a good thing since on/off limits it too much and i dont use it at all.Im talking about the Tonemapping Contrast though, not working at all (after adding directx11 support afaik):http://docs.garagegames.com/torque-3d/official/content/documentation/World%20Editor/Basics/images/postfx_hdr_bright.png Quote Link to comment Share on other sites More sharing options...
Duion Posted March 28, 2019 Share Posted March 28, 2019 That one always worked for me and probably always worked in Torque, maybe BeamNG broke something or whatever version you are using. Quote Link to comment Share on other sites More sharing options...
brother_david Posted March 28, 2019 Author Share Posted March 28, 2019 That one always worked for me and probably always worked in Torque, maybe BeamNG broke something or whatever version you are using. Im guessing this too and it has probably something to do with adding support for directx. Therefore im trying to find what is needed to get post that works with directx9 to work with directyx11, then i might be able to backtrace what they have done in order to fix it.I really have had no success in my search. Sat last night and used a comparison tool for the HDR.cs between BeamNG and T3d to see it theres something obvious but no luck yet.Looking at their hdr.cs from the tech demo shows a difference compared to their newer hdr.cs.Tech demo seems to use pure T3d postfx. This line in HDR.cs reads "addGlobalShaderMacro( "TORQUE_HDR_RGB10" );"As in the newer fullversion its "addGlobalShaderMacro( "BGE_HDR_RGB10" );" Quote Link to comment Share on other sites More sharing options...
Duion Posted March 28, 2019 Share Posted March 28, 2019 Torque3D also has DirectX11 support for a while now. Their techdemo is probably very old. If you cannot find the difference, the causing change is probably in the engine source code.But I don't really know what you are trying to do here. Quote Link to comment Share on other sites More sharing options...
brother_david Posted March 28, 2019 Author Share Posted March 28, 2019 Torque3D also has DirectX11 support for a while now. Their techdemo is probably very old. If you cannot find the difference, the causing change is probably in the engine source code.But I don't really know what you are trying to do here. Im trying to get Tonemapping to work in BeamNG again. Im a noname gamer that likes good looking games and have very minor coding experience :PIll take some more time and try to find the differences but im afraid its as you say, something in their source code.Thank you for your answer, i appreciate it. Quote Link to comment Share on other sites More sharing options...
Duion Posted March 28, 2019 Share Posted March 28, 2019 Just tell them to update their engine, I don't know what they broke, but it is probably no big deal to fix it. Quote Link to comment Share on other sites More sharing options...
brother_david Posted March 28, 2019 Author Share Posted March 28, 2019 Just tell them to update their engine, I don't know what they broke, but it is probably no big deal to fix it. I have a thread running at their forums but have yet to get an answer from a dev. They usually respond and kind of quickly so ill hang in a while more and meanwhile try to find a solution myself. Quote Link to comment Share on other sites More sharing options...
brother_david Posted April 2, 2019 Author Share Posted April 2, 2019 Got my answer, doesnt really sound promising but figured it was something along these lines:"Yep is a know issue :pHDR was broken some years ago, but no one realized until was a bit too late.Fix it will make all the content look different and is something i want to avoid as artists invest a lot of time trying to get the most from the engineIs in my ToDo to check what are our alternatives in the next months, but i cant promise anything."Kinda sad to hear. Looks are (in my opinion) a huge part of modern car sims/games so not being able to have that without external PostFx solutions kinda sucks. Can understand them though. Dont see why they cant 'fix' it and bring back the HDR On/Off option for those who think it looks bad. If its not really bad and effects more things than pure resources such as textures, then i can see why ofcourse. Weird thin g though that the gfx in the tech demo are alittle more on point with example speculars even with PostFx off.Anyways, I reinstalled Reshade after this, in order to get alittle more updated gfx. Quote Link to comment Share on other sites More sharing options...
Duion Posted April 2, 2019 Share Posted April 2, 2019 HDR is not going to make things that bad, it has actually the most potential to improve visuals if used right. If you just use it slightly it is hardly going to make anything worse, but better. Quote Link to comment Share on other sites More sharing options...
brother_david Posted April 4, 2019 Author Share Posted April 4, 2019 I agree, sounds abit off to me but i do not have enough insight to actually say anything about it. Just trying to make the most out of BeamNGs gfx cause overlay programs arent going to be as good working with the game gfx as the in engine postfx. Quote Link to comment Share on other sites More sharing options...
brother_david Posted May 21, 2019 Author Share Posted May 21, 2019 Some sort of status report, i keep on digging here. The HDR Enable tick box didnt work before, got it working after comparing Beamngs postFXManager.gui files to the latest T3d files. Also think i got something more working.Found one oddity, in Beamngs HDR.cs which seems to relate to Gamma.This code (from techdemo BEamng and T3d engine): new PostEffect() { allowReflectPass = false; shader = HDR_DownSampleLumShader; stateBlock = HDR_DownSampleStateBlock; texture[0] = "$inTex"; target = "$outTex"; targetScale = "0.25 0.25"; // At this point the target should be 1x1. targetFormat = "GFXFormatR16F"; };is this in the current Beamng version: new PostEffect() { allowReflectPass = false; shader = HDR_DownSampleLumShader; stateBlock = HDR_DownSampleStateBlock; texture[0] = "$inTex"; target = "$outTex"; targetScale = "0.01 0.01"; // At this point the target should be 1x1. targetFormat = "GFXFormatR16F"; };If i change that the screen gets way bright. I did also find some line, cant remember which, that i think was gamma related too which was different. Quote Link to comment Share on other sites More sharing options...
brother_david Posted May 22, 2019 Author Share Posted May 22, 2019 Got tonemapping working!To not say too much before i talk to the devs; i have made changes to hdr.cs, the postfxmanager files BUT also another file which is the one i think did the trick. Im not gonna state which one it is cause theres some code in it that looks like WIP or was left when it didnt function. But i can say this, its the file that combines bloom and tonemapping.Bloom is still not looking as it does in T3d and the Beamng Techdemo (which uses older T3D stuff) so somethings slightly off there but im happy atm and might leave it there :)About the code above; Beamng has its own gamma so that number (0.01 0.01) is probably due to that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.