Comments (14)
Which game is it from? In order to test it, I need a sample asset (the raw Texture2D asset is enough) + the .resources file (if existant)
from uabe.
I can send you the asset file if you like and point you to the problematic Texture? Do you have a email or something I can contact you on?
from uabe.
You can also upload the raw data as an attachment here.
Here's a test file with a ETC_RGB4 compressed texture. I found no issues exporting it. If it does have an issue on your system, double-check if you have the Visual C++ 2013 Redistributable installed.
test.zip
from uabe.
I had no trouble exporting your test asset either, must be something else wrong with it. Looks like I have it installed as well...
Below is the asset file. There are a lot of images in there but the one I'm having issues with has the Name 'face_ab' and Path ID '247599808996...'
Assets.zip
from uabe.
Found the bug. It was because the mipmap count was set to -1 because that engine version has no m_MipCount field. The negative value was then passed like a positive value, resulting in the number 4294967295. Theoretically, it might complete somewhen but instead here's a small fix :
from uabe.
Awesome! Thanks mate, you're a legend :)
from uabe.
I have just noticed an issue with the extracted ETC_RGB4 images though. The backgrounds should be transparent but they are coming out all strange. Here are some examples...
Not sure why those strange lines are showing up, I have no issue with the DXT5 textures.
Try a face_ab texture from this file..
CAB-ee7232b2f4b570f5081d9068e0ec5f51.zip
from uabe.
ETC_RGB4 has no alpha channel. I think it also isn't needed because Unity creates sprite meshes so the "transparent" area won't be displayed.
Possibly the meshes are in another bundle or .assets file.
EDIT : There are some _mask files that seem to contain the alpha channel. Open the file from the bundle to know which one is which.
from uabe.
@DerPopo Hi, This tool is really great! I have one question. The following attached unity3d file should contain a image with color data, but when extracted it's converted to the alpha8 transparent image, and color data is lost.
- I tried another texture format, but the result did not change.
- I doubted that sprite has a color table, but I could not convert sprite data to color table.
- Is this a bug of UABE related to Texture2D?
http://assets.mirror.hekk.org/v3/ios/units/illust/5001_1705630752.unity3d
env: UABE v2.1c, Win7, VC++2013 installed
from uabe.
It does only contain a 8 bit (1 byte) texture. The image size of 2097152 is exactly 2048*1024, so there is not more data than what UABE extracts.
Looking at the texture, it seems like the game has its own way to map the color data on top of the grayscale texture. The left half is a high resolution grayscale and there are three 1/4 size images, likely representing two different color channels (left half) and the alpha channel. The third color channel can be calculated from the grayscale and the two other channels.
As UABE extracts the image data into the alpha channel, I recommend using a tool such as paint.net and adding a black layer behind the extracted .tga or .png to view the grayscales. Editing may become a bit cumbersome as it needs the same data in the alpha channel of the imported texture (and most editing programs aren't able to do that out of a normal grayscale).
from uabe.
@DerPopo That make sense! It was not a bug. I'm sorry.
I wrote the convert script based on your advice and succeeded in generating colors. But the output image is a little different in color. Please give me a clue 🙏
import cv2
img = cv2.imread('texture2d.png', cv2.IMREAD_UNCHANGED)
height, width = img.shape[:2]
for w in range(0, width):
for h in range(0, height):
if w < 1024 and h < 1024:
G = img[h, w][3] # left grayscale
B = img[h/2, 1024+(w/2)][3] # right top
R = img[512+(h/2), 1024+(w/2)][3] # right bottom
A = img[512+(h/2), 1024+(1024/2)+(w/2)][3] # alpha
img[h, w] = [B, G, R, A]
cv2.imshow('image', img)
cv2.waitKey(0)
cv2.destroyAllWindows()
UPDATE: I found out that it was YCbCr. Sorry for off-topic. 🙇 Thanks!!
from uabe.
I couldn't find out the actual method either, the conversion you have is the best I could find so far.
from uabe.
i have issue with UABE with the exporting the textures i get the message "error Unable to create a Texture2d template field"
i followed a youtube tutorial step by step and tried on 2 different games and i get the same error
from uabe.
Found the bug. It was because the mipmap count was set to -1 because that engine version has no m_MipCount field. The negative value was then passed like a positive value, resulting in the number 4294967295. Theoretically, it might complete somewhen but instead here's a small fix :
Hey, I was having the same problem. I wanted to try your fix but I don't know what to do with .dll file you attatched. Please can you guide me where to put it?
from uabe.
Related Issues (20)
- does not save the .png pls help me HOT 3
- Hello im new to uabe but can someone help me where to find the bundle extractor in uabe 3.0?
- Exporting meshes as .obj breaks UV
- Asset Bundle Extractor cannot change audio .npk files?
- Importing Images and Sprite Packing Issue
- .assetbunble files not open
- cant export dump (unable to extract type information) HOT 1
- assets
- Crash when importing Texture2D Sprite Atlas
- Exports not saving
- Failed :XXX.bundle (Compressed Bundle)
- DLL error
- File is "corrupted"
- Crashed when open .unity3d files
- BATCH IMPORT
- Uabe Lite for exagear emulator
- Selecting asset don't work
- I don't know how to build this...
- 3.0 doesnt open "split#" files HOT 1
- Error exporting an asset - Unable to deserialize the asset.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uabe.