• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Game Modifications › Custom Texture Projects v
« Previous 1 … 8 9 10 11 12 Next »

Dolphin highres texture format problem
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Dolphin highres texture format problem
02-20-2017, 08:57 AM (This post was last modified: 02-20-2017, 07:57 PM by CTCaer.)
#1
CTCaer Offline
Νostalgic gamer
***
Posts: 72
Threads: 2
Joined: Jan 2017
Exclamation 
Dear devs,

I have a question about some textures produced from the dump system.

I'm currently working on HD textures for Wario Land - Shake dimension in wii.
I noticed something strange though.

The game uses Luminace textures GX_TF_I4 for texture masks.
As I read in Nintendo's patent GC/Wii patent these textures are basically (Y)UV. The Y is in parentheses because the only information the texture has is Luma (Y). 
So normally the output should be greyscale with no Alpha.

But the textures come out like this:
[Image: tex1_260x320_d5fb0675a6221792_0.png] instead of this: [Image: tex1_260x320_d5fb0675a6221792_0_correct.png]

This is problematic, because when you edit some masks (or even save as new without editing), the output from photoshop breaks many effects.
Photoshop optimizes the PNGs and creates these hidden blocks. But the RGB info is still there.
So, for some reason Dolphin's PNG decoder takes into consideration this optimization, even though the new png is identical if you remove both transparencies and compare.
For example unedited mask:
[Image: wario1.png]   save as without edit (Photoshop): [Image: wario2.png].

Anyway I bought a plugin for photoshop that removes the alpha values and keep the RGB values.
But before I start to remove alpha from all *_0.png textures, it would be good to know if what I'm saying is correct.


Btw, this patent have complete info about textures formats and conversions between them. 
Also because of the patent date, I don't know if it includes GC/Wii or only WiiU. Patent site updated.
Win 10, Dolphin 5.0-1905.
i7-5820K, 16GB DDR4, AMD R9 280x DC2T.
Find
Reply
02-21-2017, 03:56 PM
#2
razius Away
This is how liberty dies: with thunderous applause!
***
Posts: 92
Threads: 4
Joined: May 2012
So glad you brought this up, i was about to make a similar thread.
You could make your pack for Ishiiruka. I had same issues with some SMSS particles and i was able to create hd versioms and to load them properly with Ishiiruka only.
Could the devs add same format as Ishiiruka for the single channel textures?
[Image: zScEJ0p.png]
Website Find
Reply
02-21-2017, 06:10 PM
#3
CTCaer Offline
Νostalgic gamer
***
Posts: 72
Threads: 2
Joined: Jan 2017
Hmm, I will compare the two and find what is changed in Ishiiruka.
Win 10, Dolphin 5.0-1905.
i7-5820K, 16GB DDR4, AMD R9 280x DC2T.
Find
Reply
02-24-2017, 05:04 AM
#4
CTCaer Offline
Νostalgic gamer
***
Posts: 72
Threads: 2
Joined: Jan 2017
So before some days, I found out why this happened.

Photoshop does some kind of an optimization to completely transparent pixels.
Actually this doesn't create smaller PNG but whatever.

There are many ways to avoid it.
But let's talk about the easiest:
Save as format plugin SuperPNG.
http://www.fnordware.com/superpng/

It's free. When you save as in photoshop, just select "Clean transparent".
This will make all fully transparent pixels black.
Only do this for _0.png textures. Because almost always the correct color is black.
You can check by Layers->New mask->From transparency, before changing the texture. This will show the real pixels color.


Still though, the I4 and I8 textures should be completely opaque.. I tried some things in Dolphin's source (texture conversion, cache, etc), but still came out transparent.
So I still didn't find the correct thing to change.
The problem is that currently Dolphin produces this for I4 and I8 textures:
Copy Intensity to R,G,B,A channels. This should be changed to copy Intesity to RGB (with the neccesary 4->8/8->4bits for I4) 
and make Alpha channel 16/0xF for 4bit or 255/0xFF for 8bit channels.
Win 10, Dolphin 5.0-1905.
i7-5820K, 16GB DDR4, AMD R9 280x DC2T.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma