Page 8 of 9

Re: ...is this the uncrackable one?? (.za and .za2)

Posted: Fri Jan 01, 2021 8:33 pm
by daemon1
Also note that non-square textures will require filling them up to square before applying to the model, or modifying UVs. Do whatever is easier for you.

Yet another image script, supports grey-colored images with alpha.

Code: Select all

from inc_noesis import *

def registerNoesisTypes():
    handle = noesis.register("whatever", ".wms")
    noesis.setHandlerTypeCheck(handle, noepyCheckType)
    noesis.setHandlerLoadRGBA(handle, noepyLoadRGBA)
    #noesis.logPopup(); 
    return 1

def noepyCheckType(data):
    bs = NoeBitStream(data)
    if bs.readBytes(2) != b'\x05\x80': 
        print("wrong sig!")
        return 0
    return 1

def noepyLoadRGBA(data, texList):
    bs = NoeBitStream(data)
    dataOffset = 40
    bs.seek(0x10)
    imgWidth = bs.readUInt()
    imgHeight = bs.readUInt()
    bs.seek(0x24)
    imgform = bs.readUInt()
    bs.seek(dataOffset)
    data = bs.readBytes(bs.getSize() - bs.tell())    
    if imgform == 0x8:
        data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "r8 a8")
    if imgform == 0xa:
        data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "b5 g6 r5")
    if imgform == 0xc:
        data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "b4 g4 r4 a4")
    if imgform == 0xd:
        data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "g8 a8")
    texList.append(NoeTexture(rapi.getInputName(), imgWidth, imgHeight, data, noesis.NOESISTEX_RGBA32))
    return 1

Re: ...is this the uncrackable one?? (.za and .za2)

Posted: Sat Jan 02, 2021 2:06 am
by Henchman800
Image
(Acid Bottle with corrected uv-map)

This is the uvmap for acid bath as of the extracted .smd file:
Image

After correction:
Image

Still some manual work to do but still very nice, thank you so much again :-)


For the noesis texture scripts:
Do I have to use this script for regular textures?

Code: Select all

from inc_noesis import *

def registerNoesisTypes():
    handle = noesis.register("whatever", ".wms")
    noesis.setHandlerTypeCheck(handle, noepyCheckType)
    noesis.setHandlerLoadRGBA(handle, noepyLoadRGBA)
    #noesis.logPopup(); 
    return 1

def noepyCheckType(data):
    bs = NoeBitStream(data)
    if bs.readBytes(2) != b'\x05\x80': 
        print("wrong sig!")
        return 0
    return 1

def noepyLoadRGBA(data, texList):
    bs = NoeBitStream(data)
    dataOffset = 40
    bs.seek(0x10)
    imgWidth = bs.readUInt()
    imgHeight = bs.readUInt()
    bs.seek(0x24)
    imgform = bs.readUInt()
    bs.seek(dataOffset)
    data = bs.readBytes(bs.getSize() - bs.tell())    
    if imgform == 0xc:
        data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "b4 g4 r4 a4")
    else:
        data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "b5 g6 r5")
    texList.append(NoeTexture(rapi.getInputName(), imgWidth, imgHeight, data, noesis.NOESISTEX_RGBA32))
    return 1
And this one for half square textures with corrected alpha?

Code: Select all

from inc_noesis import *

def registerNoesisTypes():
    handle = noesis.register("whatever", ".wms")
    noesis.setHandlerTypeCheck(handle, noepyCheckType)
    noesis.setHandlerLoadRGBA(handle, noepyLoadRGBA)
    #noesis.logPopup(); 
    return 1

def noepyCheckType(data):
    bs = NoeBitStream(data)
    if bs.readBytes(2) != b'\x05\x80': 
        print("wrong sig!")
        return 0
    return 1

def noepyLoadRGBA(data, texList):
    bs = NoeBitStream(data)
    dataOffset = 40
    bs.seek(0x10)
    imgWidth = bs.readUInt()
    imgHeight = bs.readUInt()
    bs.seek(0x24)
    imgform = bs.readUInt()
    bs.seek(dataOffset)
    data = bs.readBytes(bs.getSize() - bs.tell())    
    if imgform == 0x8:
        data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "r8 a8")
    if imgform == 0xa:
        data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "b5 g6 r5")
    if imgform == 0xc:
        data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "b4 g4 r4 a4")
    if imgform == 0xd:
        data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "g8 a8")
    texList.append(NoeTexture(rapi.getInputName(), imgWidth, imgHeight, data, noesis.NOESISTEX_RGBA32))
    return 1
I've also tried to recreate your hambone rip:
Image
Download .blend file: https://cdn.discordapp.com/attachments/ ... -issue.zip

I had to flip all the uvs on the y-axe and they seem to be incorrect on some parts and single faces...i did a lazy job on putting them in place. I also converted the .smd to an .obj via noesis since blenders importer is a little restricted. Since the converted mesh came out as one object i seperated it by material....that also kinda kept a few supposedly individual meshes stuck together weirdly.

Re: ...is this the uncrackable one?? (.za and .za2)

Posted: Sat Jan 02, 2021 3:54 pm
by daemon1
Henchman800 wrote:
Sat Jan 02, 2021 2:06 am
(Acid Bottle with corrected uv-map)
You dont have to correct UV map for Acid Bottle, its already correct as original.
Henchman800 wrote:
Sat Jan 02, 2021 2:06 am
Do I have to use this script for regular textures?
you can use one (latest) script for ALL textures
Henchman800 wrote:
Sat Jan 02, 2021 2:06 am
I had to flip all the uvs on the y-axe and they seem to be incorrect on some parts and single faces...i did a lazy job on putting them in place. I also converted the .smd to an .obj via noesis since blenders importer is a little restricted. Since the converted mesh came out as one object i seperated it by material....that also kinda kept a few supposedly individual meshes stuck together weirdly.
Yes, some SMD importers flip UVs on Y. So once we decide what will be best way to import models, we know if they need to be flipped or not. I can flip them all during export in that case.

Next, "single faces" usually have non-square textures, and this is why i said they will require filling them up to square. Or you can do "lazy job" changing UVs, if you're sure this will be done well if you scale them exactly 2x times on Y.

Next, i really dont recommend seperating models by material, because this will break original composition of model parts, which makes separate object for each "skeleton bone", and this allows to easily connect them to a skeleton exactly in points where bones are supposed to be. Nothing was "stuck together weirdly", it was all in proper places. For example, cuffs of his wrists, his neck on the middle of his chest, etc.

As alternative, I can export SMD file as one object WITH a skeleton, where all parts will be weighted to their bones. Then you can move and rotate bones as you like, without the need to separate anything.

Re: ...is this the uncrackable one?? (.za and .za2)

Posted: Sat Jan 02, 2021 6:16 pm
by Henchman800
daemon1 wrote:
Sat Jan 02, 2021 3:54 pm
You dont have to correct UV map for Acid Bottle, its already correct as original.
Are you sure?...you never really get to See the acid bath Container from the side ingame:
Image
When i straight import the converted .smd the arrow-point-logo thingy on the ends isnt centered and cut off...but yeah sometimes game assets are like that :-p

daemon1 wrote:
Sat Jan 02, 2021 3:54 pm
As alternative, I can export SMD file as one object WITH a skeleton, where all parts will be weighted to their bones. Then you can move and rotate bones as you like, without the need to separate anything.
That would be awesome man!

Thank you again for doing this :-)

Re: ...is this the uncrackable one?? (.za and .za2)

Posted: Sat Jan 02, 2021 6:25 pm
by daemon1
Henchman800 wrote:
Sat Jan 02, 2021 6:16 pm
Are you sure?...you never really get to See the acid bath Container from the side ingame:
When i straight import the converted .smd the arrow-point-logo thingy on the ends isnt centered and cut off...but yeah sometimes game assets are like that :-p
yes, i'm sure. I checked it right before writing the message. the arrow-point-logo was properly centered.

Re: ...is this the uncrackable one?? (.zm and .zm2) Carnevil Arcade

Posted: Sat Jan 02, 2021 6:38 pm
by Henchman800
Alright man cool! Thanks :)

Edit:
Do you also Happen to have a decent .smd-importer for blender?

Re: ...is this the uncrackable one?? (.zm and .zm2) Carnevil Arcade

Posted: Sat Jan 02, 2021 6:58 pm
by daemon1
ok, try this one.
it will export SMD file as one object WITH a skeleton, where all parts will be weighted to their bones
all you need to do is parent bones, and move them to their proper positions

i'm using blender source tools, and they work fine for me.

Re: ...is this the uncrackable one?? (.zm and .zm2) Carnevil Arcade

Posted: Sat Jan 02, 2021 7:05 pm
by Henchman800
Awesome!!! I will look into it after work, thanks :-)

Re: ...is this the uncrackable one?? (.zm and .zm2) Carnevil Arcade

Posted: Sun Jan 03, 2021 1:13 am
by Henchman800
Thanks for the tip with source tools, this is great!
I've been using your new extractor, buit it seems like it created super tiny bones for hambone that are all in the same location....is that intended?
Image

EDIT:
I think I got it working :-)
Image

Re: ...is this the uncrackable one?? (.zm and .zm2) Carnevil Arcade

Posted: Sun Jan 03, 2021 8:24 am
by daemon1
Henchman800 wrote:
Sun Jan 03, 2021 1:13 am
it created super tiny bones for hambone that are all in the same location....is that intended?
yes
only animations is what makes these bones move
this is how games were done around 2000

Re: ...is this the uncrackable one?? (.zm and .zm2) Carnevil Arcade

Posted: Sat Jan 09, 2021 9:15 pm
by Henchman800
daemon1 wrote:
Sun Jan 03, 2021 8:24 am
yes
only animations is what makes these bones move
this is how games were done around 2000
Crazy...so the bones actually moved and were just treated like empties/Dummies that connect submeshes?

Re: ...is this the uncrackable one?? (.zm and .zm2) Carnevil Arcade

Posted: Sun Apr 18, 2021 7:16 pm
by ddadd
I know this is probably the most nube question you've ever heard, but how do I import the model into blender with textures? In noesis I can see the textures on the model just fine, but in blender the textures are all gone. If I go to material preview the whole model just turns purple. I'm probably really dumb and missing out on a super easy step, but I don't know what to do.

Re: ...is this the uncrackable one?? (.zm and .zm2) Carnevil Arcade

Posted: Sun Apr 18, 2021 7:37 pm
by OPR23b
I'd assume that you would be using 2.8+, so this is for those versions

1. Select the model.
2. Go to the materials section (checkered sphere).
3. Switch the material from whatever Noesis exported to "Principled BSDF". (depends)
4. Locate the "Base Color" section.
5. Click the yellow dot, and switch to "Image Texture".
6. Press the folder icon and navigate to the texture.
7. Double click and you should have the texture loaded in.

That should be all.

Re: ...is this the uncrackable one?? (.zm and .zm2) Carnevil Arcade

Posted: Sun Apr 18, 2021 7:44 pm
by ddadd
Also I noticed that the actual model files of deaddy and the skeleton are missing from the extracted files. Not that the skeleton is particularly interesting in any way, but yes some of the models and stuff are missing.

Re: ...is this the uncrackable one?? (.zm and .zm2) Carnevil Arcade

Posted: Mon Apr 19, 2021 1:21 pm
by ddadd
Image
Here's the bat model from carnevil. However, it seems that some models are messed up like the maggot and topsy turvy. Also it only allows me to move the parts of the body when I converted the model to fbx. Is this normal? Also working on the zombie
[img]file:///C:/Users/derri/Downloads/Blender%20Zombie.png[/img]