-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Texture writing overhaul #194
Conversation
…ormat from DPSetTextureLUT for each texture to part of othermode
I actually have a question about this. Do you know if having a single CI texture as both texel0 and texel1 works still? |
allImages = [] | ||
for flipbookTexture in flipbookProp.textures: | ||
if flipbookTexture.image not in allImages: | ||
allImages.append(flipbookTexture.image) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allImages = [] | |
for flipbookTexture in flipbookProp.textures: | |
if flipbookTexture.image not in allImages: | |
allImages.append(flipbookTexture.image) | |
allImages = list(set(flipbookTexture.image for flipbookTexture in flipbookProp.textures)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this does not work--the set will scramble the order of the items. For multiple materials using the same texture, it matters what order the textures are in the use list. Python is unfortunately missing a native list function to remove duplicates keeping the first instance of each.
existingFPalette = None | ||
fImages = [] | ||
|
||
palName = model.name + "_" + flipbookProp.textures[0].image.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was removing the _pal
suffix intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Names have since been completely overhauled (they're basically what they used to be, including the _pal
suffix).
This PR works with all kinds of texture formats as tested with the test scene (see the video). However, it needs to be tested with SM64, especially the TexRect feature. If someone who has a SM64 mod could export one of their scenes with this branch and confirm it doesn't break, that would be great. |
bozies exported the museum test scene in SM64 (in an emulator), and it worked fine. If someone could test TexRect that would be great, but otherwise this is reasonably well tested. |
…tureDLs go to a single gfx_list instead of separate ones per tile
fix merge conflicts from mat_bleed PR.
The mat bleed changes are now merged into this, and it is now up to date with top-of-tree. Needs review. Note that OoT scene exporting currently corrupts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly just requests for some small cleanup but nothing blocking in of itself. There seems to be an issue with mat bled textures, both with scrolling and large textures but i havent figured out exactly whats going on. I'll post a separate comment with info.
I can see some potential issues with some of the messaging to users. I think the large texture creator may be a little overwhelming in its language to some users. Not a blocker, but something we should respond to as we get user feedback on the feature.
bugfix for large texture mode during mat bleed
@@ -12,26 +13,27 @@ class TextureFlipbook: | |||
name: str | |||
exportMode: str | |||
textureNames: list[str] | |||
images: list[tuple[bpy.types.Image, FImage]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was made without updating a bunch of TextureFlipbook
instanciations such as
TextureFlipbook(arrayName, "Array", textureList)
which breaks a bunch of code
PR which overhauls F3D texture writing. These changes were originally started for the following reasons:
This turned into a full overhaul of the texture writing functions. This includes improved support for:
Functionality is now separated into the following steps:
This overhaul was necessary because with the existing code organization, the information needed to make the decisions with CI textures (e.g. whether the union of the colors used in two CI4 images was greater than 16 colors) was only available deep within the functions writing the textures. The new code is also often simpler and more modular.
This PR is not expected to conflict with the material bleeding PR, as I still use the standard GBI classes.