SomaZ Posted February 9, 2017 Posted February 9, 2017 Funny thing is, that the bsp stores the misc_cubemap and the misc_dlight entities as normal text. At least Notepad++ can show them. Maybe it is possible to save directly to the bsp, or? Is bsp streamed? I need to investigate. @@DT85 I have no idea how to handle UIs in the JK code. Your help would be greatly appreciated. @@Archangel35757 Why? Lights from the game doesn't get stored. It's just about dynamic lights.
Tempust85 Posted February 10, 2017 Author Posted February 10, 2017 The only reason we need dlights is because with just lightmaps, the normal/parallax maps do not show at all. @@SomaZ What I meant was that I can create the .menu files. Doom 3 from what I understand, compiles its maps at runtime. Might be worth having a look into that, but I'm thinking just using an external entity file would be best. minilogoguy18 likes this
Tempust85 Posted February 10, 2017 Author Posted February 10, 2017 @@SomaZ grab my latest commit please and give it a good test. I reverted the images pool that Xycaleth did in the hopes of doing away with the sun & flare crashes. That, and I'd like our code to match ioq3 where possible. SomaZ likes this
SomaZ Posted February 10, 2017 Posted February 10, 2017 I'll just drop this here. Horizon fading:left is without, right with a factor of 1.3 minilogoguy18, Tempust85, GPChannel and 2 others like this
Tempust85 Posted February 12, 2017 Author Posted February 12, 2017 @@Xycaleth Any ideas how to fix burn marks on ghoul2 models looking like this?
Xycaleth Posted February 12, 2017 Posted February 12, 2017 They're not implemented yet in rend2 so there's nothing to fix it's still on my todo
Tempust85 Posted February 12, 2017 Author Posted February 12, 2017 What would need to be done? Do something similar to the splash screen?
Xycaleth Posted February 12, 2017 Posted February 12, 2017 I haven't had a look to see how ghoul2 marks would work yet or how they even work in the vanilla renderer :/ so I'm not sure what needs doing.
SomaZ Posted February 14, 2017 Posted February 14, 2017 @@DT85 exporting the cubemap works fine. Don't know what's the problem. It saves them in Documents\my games\OpenDF2\base\cubemaps\map_name\. The file extension is wrong though.
Tempust85 Posted February 15, 2017 Author Posted February 15, 2017 Lol, didn't know you had to type something in the console - thought it just happened upon map load. Anyway, shouldn't it be 6 images output and not 3? EDIT: Opened in PS and I get it now. SomaZ likes this
Tempust85 Posted February 17, 2017 Author Posted February 17, 2017 @@AshuraDX few questions. What should your clone look like with PBR? Which gloss type would you think? GLOSSSMOOTHNESSROUGHNESSSHININESS Is the albedo map supposed to control reflection?
SomaZ Posted February 17, 2017 Posted February 17, 2017 @@DT85 Sry, to answer the questions for AshuraDX.It should look kind of like this: He used a roughness map. So glossType 2 (Roughness)The albedo map is kind of a diffuse map. Though it lacks every other shading like AO. This is because of the metal rougness workflow. Reflection color is controlled by the albedo map + metalness maps. AO is classicly applied after getting the reflection color from the albedo to get the diffuse color.For this video I used the diffuse instead, since ao map handling is not presend at this moment. minilogoguy18 and Maksman like this
ensiform Posted February 17, 2017 Posted February 17, 2017 I'm skeptical of using misc_dlight for real lights being stored in the map file.
Tempust85 Posted February 17, 2017 Author Posted February 17, 2017 @@SomaZ you did create an MTR shader using the albedo, normal and specular (not spec) textures? The shader that was supplied was for vanilla renderer. Reflection color sure, but should the albedo be used to set the reflection intensity? Just seems a bit stupid to me.
Tempust85 Posted February 17, 2017 Author Posted February 17, 2017 @@AshuraDX This is what I get using all of your PBR textures: Things to note about the map: - The cubemap has black areas in it- tone mapping is a bit too intense
SomaZ Posted February 17, 2017 Posted February 17, 2017 Reflection color sure, but should the albedo be used to set the reflection intensity? Just seems a bit stupid to me. Nonono. Reflection intensity is implicitly controlled by the metalness and albedo map. Sharpness of the reflection is controlled by the gloss or roughness map. Shader Code (a little bit simplified): specular.rgb = metal * diffuse.rgb diffuse.rgb *= 1.0 - metal; (metal objects have a black diffuse, but we get the reflection color from the albedo, see the line above) //code that is missing right now: diffuse.rgb += AO * aoStrength; (this is kind of the classical diffuse map) So, the only maps you need for the pbr metal roughness workflow are albedo, normal and a packed texture with grayscale metalness in the red, grayscale roughness in the green and grayscale ao in the blue channel. The specular textures AshuraDX supplied are the packed textures. With that you can build the .mtr { map models/weapons2/clonedummy/body_albedo rgbGen lightingDiffuse } { stage normalmap map models/weapons2/clonedummy/body_normal } { stage specularmap map models/weapons2/clonedummy/body_Specular } I hope that clarifies things a bit.
AshuraDX Posted February 17, 2017 Posted February 17, 2017 can we get a further zoomed out shot @@DT85? Somaz Tests showed some very wonky normals on the body.EDIT: Here are some pictures: From @@SomaZ test Video From MarmosetEDIT2:Could you also do me the favor and try inverting the red channel of the specular map? Archangel35757 and Tempust85 like this
SomaZ Posted February 17, 2017 Posted February 17, 2017 @@AshuraDX Are the hard edges split into two separate ones? If I recall correctly, every vertex normal is smoothed for shading. Maybe thats the problem?
Archangel35757 Posted February 17, 2017 Posted February 17, 2017 @@AshuraDX Are the hard edges split into two separate ones? If I recall correctly, every vertex normal is smoothed for shading. Maybe thats the problem?If you are smoothing all the vertex normals-- doesn't that defeat making custom normals in the XSI files (and its Carcass compilation into the GLM file)? SomaZ likes this
Tempust85 Posted February 17, 2017 Author Posted February 17, 2017 Could be an issue for other models, but Ashura's clone normal maps require the model to be completely smooth. @@AshuraDX I had to invert the normal map textures green channel. As-is: Body_Specular red channel inverted: Forgot to mention, this is an MD3 loaded using misc_model_static. @@SomaZ Just make the alpha channel of the diffuse the AO or if the specular blue is unused in PBR, use that. minilogoguy18 and AshuraDX like this
minilogoguy18 Posted February 18, 2017 Posted February 18, 2017 Is there anyway to maybe change the renderer to not need to invert any channels? Just so that it can say take a map generated from something like xNormal and have it usable. I know inverting isn't that big of a deal but there could be people out there who get confused and maybe don't know they have to adjust the maps. Also, having the render engine more in line with what most other software would render properly could help like say in Softimage I have the AT-ST set up so that the realtime shaders show the model with all the maps applied in the viewport. If I inverted a channel on the normal map it'll work in game but I lose the ability to make it viewable in Softimage and there are also sites like sketchfab.
AshuraDX Posted February 18, 2017 Posted February 18, 2017 Is there anyway to maybe change the renderer to not need to invert any channels? Just so that it can say take a map generated from something like xNormal and have it usable. I know inverting isn't that big of a deal but there could be people out there who get confused and maybe don't know they have to adjust the maps. Also, having the render engine more in line with what most other software would render properly could help like say in Softimage I have the AT-ST set up so that the realtime shaders show the model with all the maps applied in the viewport. If I inverted a channel on the normal map it'll work in game but I lose the ability to make it viewable in Softimage and there are also sites like sketchfab.Inverting channels is something you won't get around in the testing phase. Depending on the shader the definition for white on the normal maps green channel can be +y or -y.Your normal map has to match what the shader expects.Most dedicated render engines have a switch for this, so you can use both types of maps. I'm sure your Softimage shader has that option too. A switch like this could probably be added to the .mtr files.Here are the normal map settings on sketchfab: Same with a roughness/gloss map.A roughness map is created with the logic that white is rough and therefore not shiny. A gloss map does the inverse, white is smooth and shiny. Until we got this figured out, theres a bit of inverting to do.Once everything is figured out, we can write a guide on this. The main Problem with PBR will be, that barely any of our models for this game support it.And a conversion is not an easy, 1-click process, there are tools to convert Photographs to full PBR materials that could be tested on jka map textures - but it won't yield decent results on playermodels or weapons. Theoretically everything would have to be remodeled and retextured following the modern pipeline. @@DT85 I allready advised @@SomaZ to invert the normal maps green channel, and he did that. The screenshot was taken after the inversion, this is allready the better of 2 results he got.But he used the GLM version, maybe something about the normals on glm meshes ingame is screwed up. okay, invert the red channel again please. this made the cloth parts even more shiny.Also: I allready put the AO map in the specular maps blue channel. The Diffuse alpha channel is the Material alpha - used to define transparency.
Tempust85 Posted February 18, 2017 Author Posted February 18, 2017 You can flip the normal channels in the shaders. I'll try it with GLM, see how I go. I don't think @@SmileTheory added support for AO or transparency.
AshuraDX Posted February 18, 2017 Posted February 18, 2017 You can flip the normal channels in the shaders. I'll try it with GLM, see how I go. I don't think @@SmileTheory added support for AO or transparency.well, those will be required in a few cases. Tempust85 likes this
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now