Atvaark / FtexTool

Fox Engine Texture (.ftex) to DDS converter
MIT License
32 stars 9 forks source link

Does not support 3D LUT. #9

Closed Joey35233 closed 7 years ago

Joey35233 commented 7 years ago

texture0\Assets\fox\effect\gr_pic\reflection_planes_nomip_rgba32.ftex unpacks to a DDS instead of a volume texture.

Atvaark commented 7 years ago

Are you sure it isn't a DDS with volume flags?

Joey35233 commented 7 years ago

Not sure. According to the Fox shader source code the BRDF uses 3 LUTs, one labeled a Texture3D and we believe with decent certainly that LUT, aka g_lut2 is that reflection_plane texture. What is the difference between a 3d texture and a texture with volume flags?

On Sun, Aug 20, 2017, 6:36 PM Atvaark notifications@github.com wrote:

Are you sure it isn't a DDS with volume flags?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Atvaark/FtexTool/issues/9#issuecomment-323616481, or mute the thread https://github.com/notifications/unsubscribe-auth/AM3QQ9gzIhUQQmvsS_KtNx0L_YsBErmeks5saLTXgaJpZM4O8sq5 .

Joey35233 commented 7 years ago

Oh, I see what you mean. Sorry, it should be a dds but it doesn't seem to have all of the slices, just one. That's what I mean.

Atvaark commented 7 years ago

Would you mind uploading the files somewhere? Maybe the ftex file doesn't have depth values set or isn't of type 0.

Joey35233 commented 7 years ago

Sure. Here is the code. Not sure if you know HLSL or not, but this shows it should be this one and it should be a 3D texture.

half lookupSpecularPower( float HN, half roughness, half anisoRoughness ) { float3 uv ; uv.x = saturate( HN ); uv.y = roughness ; uv.z = anisoRoughness ; uv.xyz http://uv.xyz = uv.xyz http://uv.xyz uv.xyz http://uv.xyz ; float4 correctParam = float4( 63.0/64.0, 15.0/16.0, 0.5/64.0, 0.5/16.0 ); uv.xyz http://uv.xyz = uv.xyz http://uv.xyz correctParam.xyy + correctParam.zww ; half2 value = TFetch3DH( g_lut2, SamplerLinearClamp, uv.xyz http://uv.xyz ).xy ; value.xy = value.xy value.xy ; return value.x / value.y ; }*

On Mon, Aug 21, 2017, 2:39 AM Atvaark notifications@github.com wrote:

Would you mind uploading the files somewhere? Maybe the ftex file doesn't have depth values set or isn't of type 0 https://github.com/Atvaark/FtexTool/blob/83e7c25f9f9f7d485d2ffbae0953aac473aa5919/FtexTool/FtexDdsConverter.cs#L30 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Atvaark/FtexTool/issues/9#issuecomment-323658860, or mute the thread https://github.com/notifications/unsubscribe-auth/AM3QQ4reFi3kALUP5XWq6qmzPMqZDerLks5saSYfgaJpZM4O8sq5 .

Atvaark commented 7 years ago

I was talking about the ftex/ftexs files that are apparently missing dimensions when converted to DDS.

Joey35233 commented 7 years ago

Yes. They were attached.

On Mon, Aug 21, 2017, 2:01 PM Atvaark notifications@github.com wrote:

I was talking about the ftex/ftexs files that are apparently missing dimensions when converted to DDS.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Atvaark/FtexTool/issues/9#issuecomment-323811350, or mute the thread https://github.com/notifications/unsubscribe-auth/AM3QQ_48WpeMveQ69RpwKbHXEWYFQXL6ks5sacXmgaJpZM4O8sq5 .

Atvaark commented 7 years ago

Github drops email attachments. You have to either host them somewhere externally or attach them when replying directly on Github.

Joey35233 commented 7 years ago

Sorry this has taken so long. Here is the .ftex and here is the .ftexs

Joey35233 commented 7 years ago

Didn't mean to close it.

Atvaark commented 7 years ago

The ftex files is actually just 128x128x1. But the converted DDS file should have the volume flag set and the A8R8G8B8 pixel format.

Joey35233 commented 7 years ago

So it's a volume texture with 1 slice? Odd.

On Mon, Aug 21, 2017, 2:58 PM Atvaark notifications@github.com wrote:

The ftex files is actually just 128x128x1. But the converted DDS file should have the volume flag set and the A8R8G8B8 pixel format.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/Atvaark/FtexTool/issues/9#issuecomment-323823765, or mute the thread https://github.com/notifications/unsubscribe-auth/AM3QQ3dlVf9l4VpTTAxZa6HOoGttUJLyks5sadNtgaJpZM4O8sq5 .

Chuny-PES commented 7 years ago

Hello everybody! I'm new here.

I just registered here because I seem to have a similar problem. Let me try to explain this as briefly as I can.

Here's the default original file, from the game (PES 2018) : http://www19.zippyshare.com/v/YO2wksv1/file.html

I converted it to DDS, edited in Photoshop, but I don't know which options to select when I want to export it back to DDS in order to then convert it to FTEX.

In the previous year version, I could save the LUT as DDS with the following format: 32.32.32.32f ABGR 128 bpp | floating point Volume Texture Generate Mipmaps

And the game would simply read that DDS by itself. But this year they changed the file formats to FTEXs so I need to convert the DDS to FTEX in order for the game to read the LUT file.

I hope you can help me out!

THANKS A LOT!

Atvaark commented 7 years ago

Please see the other issues for PES related problems.