Azaezel Posted November 11, 2015 Author Share Posted November 11, 2015 linearization turned over https://github.com/GarageGames/Torque3D/pull/1461there will be conflicts once that's rolled in to head. will resolve those as the issue arises.also fixed the accumulation textures: http://imgur.com/a/K39yqin addition, working with timmy to roll in dx11 https://github.com/Azaezel/Torque3D/tree/PBRDX11 cleaned up findings will be backported to the main working branch. Quote Link to comment Share on other sites More sharing options...
Azaezel Posted November 13, 2015 Author Share Posted November 13, 2015 Added a further demonstration/assistance model for artists that are unfamiliar with the system:http://i.imgur.com/3xf3yht.jpghttp://i.imgur.com/t8SK6qg.jpgSmoothness is X, metalness is Y.Edit: forgot AO:http://i.imgur.com/m6gC7vf.jpg Quote Link to comment Share on other sites More sharing options...
J0linar Posted November 13, 2015 Share Posted November 13, 2015 Starts to shape up pretty, might have to test this... Quote Link to comment Share on other sites More sharing options...
Chelaru Posted November 13, 2015 Share Posted November 13, 2015 Added a further demonstration/assistance model for artists that are unfamiliar with the system:http://i.imgur.com/3xf3yht.jpghttp://i.imgur.com/t8SK6qg.jpgSmoothness is X, metalness is Y.Edit: forgot AO:http://i.imgur.com/m6gC7vf.jpg To be sincere it look like a work in progress. I mean is PBR it should look ~like in the real world. Quote Link to comment Share on other sites More sharing options...
JeffR Posted November 14, 2015 Share Posted November 14, 2015 @ChelaruCan you clarify what looks WIP? Do you not like the demo model? Or does the PBR look incorrect to you? Quote Link to comment Share on other sites More sharing options...
Azaezel Posted November 14, 2015 Author Share Posted November 14, 2015 Should note the main point of that particular model was the eydroppable grid http://i.imgur.com/F5o7Bx0.png as a quickie analogue for http://polycount.com/discussion/comment/2096031/#Comment_2096031 so if the wood is crap, by all means blame me for being a bad artist. if the *balls* look off, then yeah, that'll be a code flaw. Quote Link to comment Share on other sites More sharing options...
Chelaru Posted November 14, 2015 Share Posted November 14, 2015 @ChelaruCan you clarify what looks WIP? Do you not like the demo model? Or does the PBR look incorrect to you? I was expecting some thing like this : http://www.marmoset.co/wp-content/uploads/microcompare05.jpg Quote Link to comment Share on other sites More sharing options...
JeffR Posted November 15, 2015 Share Posted November 15, 2015 Well, effectively, that's what the grid shows. It shows spheres with 0-1 roughness and metalness, one for each axis.Same idea as this display:http://i.imgur.com/Gt7VoVn.jpg Quote Link to comment Share on other sites More sharing options...
oXYnary Posted November 19, 2015 Share Posted November 19, 2015 @ChelaruCan you clarify what looks WIP? Do you not like the demo model? Or does the PBR look incorrect to you? I was expecting some thing like this : http://www.marmoset.co/wp-content/uploads/microcompare05.jpgChelaru, roughness=microsurfacemetallic=colored spec from albedo/base texture.There are different ways of doing PBR, these guys are using the Disney/Unreal method. You can read up more here:https://www.allegorithmic.com/pbr-guide(Have to make an account to download I believe)Is this what you are questioning? Quote Link to comment Share on other sites More sharing options...
Chelaru Posted November 19, 2015 Share Posted November 19, 2015 @ChelaruCan you clarify what looks WIP? Do you not like the demo model? Or does the PBR look incorrect to you? I was expecting some thing like this : http://www.marmoset.co/wp-content/uploads/microcompare05.jpgChelaru, roughness=microsurfacemetallic=colored spec from albedo/base texture.There are different ways of doing PBR, these guys are using the Disney/Unreal method. You can read up more here:https://www.allegorithmic.com/pbr-guide(Have to make an account to download I believe)Is this what you are questioning? I don't know pbr to well. After seeing what other are doing i was under the impression that the PBR from Torque 3d will look almost the same.I was looking closely to this development branch, because in the original post from gg forum, images like the one from above where shown to be what pbr in T3d should look in the end. Quote Link to comment Share on other sites More sharing options...
JeffR Posted November 19, 2015 Share Posted November 19, 2015 So what part of it doesn't look correct, to you?Not saying you're wrong, just trying to understand what you feel is off about it. Quote Link to comment Share on other sites More sharing options...
Azaezel Posted November 19, 2015 Author Share Posted November 19, 2015 Were you expecting it to be a single value, and not 2 controls (reflectivity aka metalness and smoothness/roughness aka bluriness)? That's the only takeaway I'm getting from tossing up that line of balls and not a grid without some elaboration...Also for what it's worth, re-comparing AO at least did show a miscalc, which just got corrected. Quote Link to comment Share on other sites More sharing options...
Chelaru Posted November 19, 2015 Share Posted November 19, 2015 The glossy factor is a bit off. With the AO even the most left ball is reflective. Every thing has a whit look, like is no contrast in the image. It might be because of the light, i don't know. To be sure i think you should create the exact light conditions like the ones from http://i.imgur.com/Gt7VoVn.jpg or http://www.marmoset.co/wp-content/uploads/microcompare05.jpg . It just looks a bit off from my perspective. It might be the light. Quote Link to comment Share on other sites More sharing options...
Azaezel Posted December 22, 2015 Author Share Posted December 22, 2015 Bit more BRDF cleanup courtessy of haladrin/Zefiros with a few tweaks to fit lights not embeded in cubemaps leaves us at:http://imgur.com/a/x6AS6vs http://imgur.com/a/C5tWd Quote Link to comment Share on other sites More sharing options...
Azaezel Posted December 25, 2015 Author Share Posted December 25, 2015 Fixed that black overlay on the editors, so those grid backgrounds et-al work again. Merry Christmas. Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 26, 2015 Share Posted December 26, 2015 Merry xmas :mrgreen: . Coming along well az, nice work. Quote Link to comment Share on other sites More sharing options...
Mud-H Posted January 11, 2016 Share Posted January 11, 2016 I have a problem using the SkyLine object with the PBR branch. I think there's something changed in the PBR branch shaders that cause an issue. I tried different shaders mix from the SkyLine object and the PBR but got no luck. I got the SkyLine object to work on PBR branch with one of those mix but then the direct lighting was not working only the ambient lighting was there so the PBR materials were not reacting to any light).I'm giving up for now but I'd really like to be able to use the SkyLine with the PBR, maybe someone who understand more how shaders works can help. Here's screenshot showing the issue:http://mud-h.com/miscweb/t3dforum/Misc/SkyLineIssueOnOff.jpg(I know the road stones PBR is not set correctly)http://mud-h.com/miscweb/t3dforum/Misc/PBRWithSkyLine.jpgAs you can see, it's like the SkyLine skybox is shrinked and got the alpha disabled... Quote Link to comment Share on other sites More sharing options...
Azaezel Posted January 12, 2016 Author Share Posted January 12, 2016 This with the latest? Just added DX11 Quote Link to comment Share on other sites More sharing options...
Mud-H Posted January 12, 2016 Share Posted January 12, 2016 This with the latest? Just added DX11It's with the code from last week, I will update it and try again.EDIT2: By just added, you mean last week, right? Because I have pulled both branch into my PBR branch and nothing changed. So yes, those images are with latest code.Btw, I'm not familiar with how DirectX work really, does the new DX11 stuff affect hardware that are not compatible with it? or do all hardware are compatible with DX11 using their limitations?I'm asking because I was wondering if it could be "usefull" to have a PBR branch without DX11 stuff, I was suspecting the new stuff to cause the problem but like I said, I really don't know much about GFX coding. Btw, I do know it's a good thing to have T3D use DX11...I do like how the PBR looks now, seem better :)Edit: Well I just found out that there's a new PBRDX11 branch, should I use it or the PBR one? Quote Link to comment Share on other sites More sharing options...
Azaezel Posted January 12, 2016 Author Share Posted January 12, 2016 This with the latest? Just added DX11It's with the code from last week, I will update it and try again.EDIT2: By just added, you mean last week, right? Because I have pulled both branch into my PBR branch and nothing changed. So yes, those images are with latest code.Btw, I'm not familiar with how DirectX work really, does the new DX11 stuff affect hardware that are not compatible with it? or do all hardware are compatible with DX11 using their limitations?I'm asking because I was wondering if it could be "usefull" to have a PBR branch without DX11 stuff, I was suspecting the new stuff to cause the problem but like I said, I really don't know much about GFX coding. Btw, I do know it's a good thing to have T3D use DX11...I do like how the PBR looks now, seem better :)Edit: Well I just found out that there's a new PBRDX11 branch, should I use it or the PBR one? DX11 is pretty much guaranteed to go into head before the PBR end, since that 'just' takes shader authoring (flat file and shadergen) revisions to account for the new macros vs art pipeline changes. So no, beating up incompatibilities is pretty much mandatory. As to the temp branch, that was for working out all the kinks I could find prior to shoving it into the main working fork.Speaking of which, 1) any console log output related to inability to compile shaders?(see conversion notes http://forums.torque3d.org/viewtopic.php?f=40&t=473#p4049 and samples https://github.com/Azaezel/Torque3D/commit/e13a235f6f98afcee38effd8be38f9d978f268fd (flat file) https://github.com/Azaezel/Torque3D/commit/1e32c48664072e801fc66c940bcc9ea3d04c6d31 (shadergen)and a few more https://github.com/Azaezel/Torque3D/commits/deferredDX11Check from Oct 23, 2015 )2) does running a debug version spew any unlogged info? Quote Link to comment Share on other sites More sharing options...
Mud-H Posted January 12, 2016 Share Posted January 12, 2016 Thanks for the infos! I think my main issue was that the SkyLine shaders weren't converted for DX11 with Timmy macros. I have manually convert the files and now at least the SkyLine Alpha Cubemap work but still not right. I see some transparency but the SkyBox is still very small.I don't understand how the SkyBox is sized... (Not sure if it could be related to shaders)So I Changed:uniform samplerCUBE cubeMap : register(S0); TO TORQUE_UNIFORM_SAMPLERCUBE(cubeMap, 0);texCUBE( cubeMap, IN.reflectVec ); TO TORQUE_TEXCUBE(cubeMap, IN.reflectVec);float4 hpos : POSITION; TO float4 hpos : TORQUE_POSITION;float3 position : POSITION; TO float3 position : TORQUE_POSITION;I'm realizing now that one of the POSITION change might not be correct if I compare with some other shaders... The float3 position should stay POSITION, right?Also compiling a debug build to see if it output something. In release, the only error I get is those 3 lines:ShaderData((null)) sampler $diffuseMap not defined ShaderData((null)) sampler $diffuseMap not defined ShaderData((null)) sampler $diffuseMap not definedNot sure where they are coming from, I will try to find out. Is there a efficient way to debug shaders? Quote Link to comment Share on other sites More sharing options...
Mud-H Posted January 12, 2016 Share Posted January 12, 2016 Nothing new by running the Debug build, got the 3 same error in console.log as above.I gave a try to a standard SkyBox and found something interesting. If I set the FogBandHeight > 0, I get the same issue as with the SkyLine so maybe it's not related to the SkyLine object at all but to something not working with the new shader stuff. Here's a screenshot of what happen if I set the fogBandHeight > 0:http://mud-h.com/miscweb/t3dforum/Misc/PBRAndSkyBoxFogIssue.jpgMaybe you could give it a try and see if you have the same issue.EDIT: I had a quick look at SkyBox code and here's the part I guess is causing the issue:// Draw render band. if ( mFogBandHeight > 0 && mFogBandMatInst ) { const FogData &fog = state->getSceneManager()->getFogData(); if ( mLastFogColor != fog.color ) { mLastFogColor = fog.color; _initRender(); } // Just need it to follow the camera... no rotation. MatrixF camPosMat( MatrixF::Identity ); camPosMat.setPosition( worldMat.getPosition() ); sgData.objTrans = &camPosMat; mMatrixSet->setWorld( *sgData.objTrans ); while ( mFogBandMatInst->setupPass( state, sgData ) ) { mFogBandMatInst->setTransforms( *mMatrixSet, state ); mFogBandMatInst->setSceneInfo( state, sgData ); GFX->setVertexBuffer( mFogBandVB ); GFX->drawPrimitive( GFXTriangleList, 0, 16 ); } }I'd dont understand what the code do really but maybe someone can see something that might be the cause...Edit:Also found out that using basic Lighting both SkyBox and SkyLine are working fine. I'm pretty sure it was not fine before the conversion so I guess I'm on the right track. When I set the advanced lighting I get a console error:Using Advanced Lighting GFXD3D9Shader::_compileShader - Error compiling shader: E_FAIL: An undetermined error occurred (80004005) game/shaders/common/particlesP.hlsl(87,67): error X3004: undeclared identifier 'prepassUncondition' Quote Link to comment Share on other sites More sharing options...
Mud-H Posted January 12, 2016 Share Posted January 12, 2016 I think you forgot an update to gfxDrawUtill.cpp, there's still some reference to the removed GFXTriangleFan, I tought it was missing from gfxEnums.h at first, but I found that it have been completly removed from the D3D11 branch.https://github.com/Azaezel/Torque3D/blob/d3d11/Engine/source/gfx/gfxDrawUtil.cpp Quote Link to comment Share on other sites More sharing options...
Azaezel Posted January 12, 2016 Author Share Posted January 12, 2016 Just did a clean checkout and recompile. Only remaining references to GFXTriangleFan are in a few comments in Engine\source\gui\worldEditor\terrainEditor.cpp, though that does bring up a notion... Converting from fan to strip requires a re-alignment of verticies... Sample: https://github.com/Lopuska/Torque3D/commit/bcc41c211774f64dc2f74de07659db41bd539b3f#diff-b23928a4f51b948ce21b6b298da60becR1042 Quote Link to comment Share on other sites More sharing options...
Mud-H Posted January 12, 2016 Share Posted January 12, 2016 Converting from fan to strip requires a re-alignment of verticies... Sample: https://github.com/Lopuska/Torque3D/commit/bcc41c211774f64dc2f74de07659db41bd539b3f#diff-b23928a4f51b948ce21b6b298da60becR1042But this commit is already in the current D3D11 code and I shouldn't worry about it or should I? And is there somewhere explaining what are those GFX draw types or a good documentation about how the GFX works in T3D or common engines? I really need to improve my knowledge in this area... Anyway, out of topic, might post about it somewhere else... 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.