Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Granny .GR2 Reader plugin for Noesis

Post questions about game models here, or help out others!
Razzoriel
ultra-n00b
Posts: 3
Joined: Fri Feb 19, 2016 10:51 pm
Been thanked: 3 times

Re: Granny .GR2 Reader plugin for Noesis

Post by Razzoriel »

Just a heads-up for anyone that is still trying to work with D2R in all this thread. I was having the exact same error messages others were having, but everything was fixed once I installed a bundle in a website and used the tools provided by them. I am not affiliated by it through any means. The website is the first that pops up when you search on google the following: "jayn23's plugin". It is a dedicated D2R modding website which, again, I am not affiliated nor endorsing, simply spelling it out that it all worked for me and now I have this guy's Noesis copy and another that I use for others.
sirsmokalot
ultra-n00b
Posts: 1
Joined: Wed Jan 11, 2023 1:40 am
Been thanked: 1 time

Re: Granny .GR2 Reader plugin for Noesis

Post by sirsmokalot »

Thank you so much for your work, everything works fine with D2R (win10, py 3.8, JRE & JDK are last official).
Models converted to .stl succesfully - can't wait to print some of them :D
Jcbq
ultra-n00b
Posts: 1
Joined: Mon May 23, 2022 5:02 am
Been thanked: 1 time

Re: Granny .GR2 Reader plugin for Noesis

Post by Jcbq »

so i am trying to play with some of the Elder Scrolls Online Meshes and textures, and after acquiring these these tools and parts i can see the meshes but the textures will not load. The meshes can export fine, with rigging on it however it appears that the UVs are either broken or have a single point and Noesis upon model load returns errors like this:

Reading 'F:\Game\ESO Extract\Extract\Live Eso\Granny\Reconstructed\AYL Ayleid\\AYL_DUC_LightFixtureB001_0'...Failed.
Reading 'F:\Game\ESO Extract\Extract\Live Eso\Granny\Reconstructed\AYL Ayleid\\AYL_DUC_LightFixtureB001_1'...Failed.
Reading 'F:\Game\ESO Extract\Extract\Live Eso\Granny\Reconstructed\AYL Ayleid\\AYL_DUC_LightFixtureB001_2'...Failed.

i am at a loss as to where to proceed from here
leckock
ultra-n00b
Posts: 8
Joined: Mon May 04, 2020 4:48 pm
Has thanked: 3 times
Been thanked: 2 times

Re: Granny .GR2 Reader plugin for Noesis

Post by leckock »

Hello, i tried to load animation from Diablo 2 Ressurected (model : Tyrael), but the result seams strange like weird deformation, it's like the wrong animation is charged. i have 1.35 version of the plugin:
MULTIFILE = 2
SMART_DETECTION = 0
ANIMATION_TRACK = 3
ANIMATION_MODE = 0
SKELETON_LOAD = 1
MERGE_SCENE = 0
CRC_CORRECTION = 0
drunknmonkie
ultra-n00b
Posts: 1
Joined: Wed Mar 01, 2023 4:17 am
Been thanked: 1 time

Re: Granny .GR2 Reader plugin for Noesis

Post by drunknmonkie »

Hi and thanks for putting your time and effort in to this program.

Is there anywhere I can find a tutorial to help me figure out how to use it?

I am trying to get my character from BG3 and I am using noesis but have no idea where to start.

Any help would be awesome

Thank you!
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4286
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Granny .GR2 Reader plugin for Noesis

Post by shakotay2 »

drunknmonkie wrote: Wed Mar 01, 2023 4:32 amIs there anywhere I can find a tutorial to help me figure out how to use it?
This thread contains 471 posts. There should be enough infos for you - just read them, maybe searching by keywords (granny.dll).
Long story short: copy fmt_GR2reader121.py into Noesis' \plugins\python folder then start Noesis and open the sample of your choice.
I am trying to get my character from BG3 and I am using noesis but have no idea where to start.
How about reading the opening post? :wink:
31. Baldur's Gate III, seems to be supported
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Ifurzzar
ultra-n00b
Posts: 1
Joined: Fri Mar 10, 2023 12:37 pm
Been thanked: 1 time

Re: Granny .GR2 Reader plugin for Noesis

Post by Ifurzzar »

Hi, first of all, thx for the effort in making this tool, I just wanna report an issue I found when exporting some D2R models, here is the model for a weapon called khalim's flail, but as you can see in my screenshot there is only a handle, the real flail head part is missing, while its full shape is like the second screenshot. I did some research and found this issue is somewhat common in items that has a chain to connect different parts of the item, for example screenshot 3 shows a shield where only the chain is rendered(and the chain itself looks not quite correct), while it actually looks like screenshot 4.
May I kindly ask do you have time to fix this issue? If you do not have time, can you pls give me some directions on how to start parsing the D2R .model file? I am a programmer as well, I can try to learn write a plugin(ideally I want to write a blender plugin to directly read the model into blender!)
thx very much!
You do not have the required permissions to view the files attached to this post.
User avatar
05SpeedMaster
veteran
Posts: 127
Joined: Mon Feb 10, 2020 9:24 pm
Has thanked: 18 times
Been thanked: 41 times

Re: Granny .GR2 Reader plugin for Noesis

Post by 05SpeedMaster »

Can you link me to those files shown in the photo?

And I haven't seen jayn23 here since August last year.
He was kind enough to send me a Custom version that allows me to remove unused bones from animation files.
:wink:
Moonstrewn
n00b
Posts: 11
Joined: Tue Mar 22, 2022 3:40 pm
Has thanked: 5 times
Been thanked: 3 times

Re: Granny .GR2 Reader plugin for Noesis

Post by Moonstrewn »

With BG3 - I have no issues running the script to extract models, however, when I try to extract textures in the same way I get met with an error.

I have also tried extracting textures using Norbyte's lslib tool, as well as an older quick BMS script I've had tucked away for BG3. None of those are allowing me to extract all of the textures, just parts of the first texture.pak. Has anyone else run into this and, if so, how did you solve the problem?
You do not have the required permissions to view the files attached to this post.
User avatar
05SpeedMaster
veteran
Posts: 127
Joined: Mon Feb 10, 2020 9:24 pm
Has thanked: 18 times
Been thanked: 41 times

Re: Granny .GR2 Reader plugin for Noesis

Post by 05SpeedMaster »

I'm not sure what you mean by 'Extracting the texture'
Are you just trying to get the textures without the model?

And what Granny2.dll file version do you have.
Moonstrewn
n00b
Posts: 11
Joined: Tue Mar 22, 2022 3:40 pm
Has thanked: 5 times
Been thanked: 3 times

Re: Granny .GR2 Reader plugin for Noesis

Post by Moonstrewn »

05SpeedMaster wrote: Mon Jul 10, 2023 9:43 pm I'm not sure what you mean by 'Extracting the texture'
Are you just trying to get the textures without the model?

And what Granny2.dll file version do you have.
Granny2.dll version is 2.11.8!

And I mean extract the files from the texture .paks. It throws me the error in my previous post when I try to extract everything from the textures.pak, and a different error on _2 and _3. On the first textures.pak it gets through about 44 files before that error stops it from doing anything else.

Editing to add - I'm looking for the textures specifically for the Nightsong outfit model. When extracting the models.pak I do have the meshes, but none of the textures related to that mesh! So I figured I needed to dig through the texture .paks to try and locate the relevant files.
You do not have the required permissions to view the files attached to this post.
salzwer2
ultra-n00b
Posts: 1
Joined: Wed Jul 19, 2023 12:37 am

Re: Granny .GR2 Reader plugin for Noesis

Post by salzwer2 »

Some D2R-related utilities I've made for myself, but others could find useful:

------------------------------

First of all, some D2R items directories have inconsistent structures: some have the *.model and the *.texture files in the same folder, and some others have the *.model in one place, and the *.textures in a subfolder. The ones with the first structure load as "white" items into Noesis, while the ones with the second load correctly, with their textures and so.

For example, right after extracting the stuff with Cascview, "ancient_armor" loads this cool:
Image

However, "axe" loads this naked:
Image

So I've made a Python script you can run before opening Noesis in order to fix that structure, and ensure all *.texture files are in a subfolder:

Code: Select all

#!/usr/bin/python
import os
import sys

### CHANGE THIS!!! ###
# Replace with the path to the folder where you've extracted your data
walk_dir = r'C:\Users\username\Documents\01_extracted_items_folder'

print('walk_dir = ' + walk_dir)
print('walk_dir (absolute) = ' + os.path.abspath(walk_dir))

# For each folder...
for root, subdirs, files in os.walk(walk_dir):
    print('--\nroot = ' + root)
    
    hasTextures = False
    hasModel = False
    hasTexturesSubdir = False
    
    textureArray = []

    # ... check if it has both models and textures mixed
    for filename in files:
        file_path = os.path.join(root, filename)
        file_name, file_extension = os.path.splitext(file_path)
        
        if file_extension == ".model":
            hasModel = True
            print('\t- file %s is a Model (full path: %s)' % (filename, file_path))

        elif file_extension == ".texture":
            hasTextures = True
            textureArray.append(file_path)
            print('\t- file %s is a Texture (full path: %s)' % (filename, file_path))

    for subdir in subdirs:
        if subdir == 'textures':
            hasTexturesSubdir = True
            print('\t- TEXTURES subdirectory ' + subdir)

    # ... and, incase the folder has both models and textures mixed...
    if hasModel and hasTextures:
        texturesPath = root + '\Textures'

        # ... create a "Textures" folder (if it doesn't exists)...
        if not hasTexturesSubdir:
            os.mkdir(texturesPath)
        # ... and move all the textures to the "Textures" folder
        for textureName in textureArray:
            destination = texturesPath + '\\' + os.path.basename(textureName)
            print('\t- %s will be moved to %s' % (textureName, destination))
            os.rename(textureName, destination)
After running the script, "axe" will load like this:
Image

Incase you want to run this, ensure you have Python installed (https://www.tomshardware.com/how-to/ins ... -10-and-11). Also ensure you have set the PATH variable, and do this (yeah, pretty sure that if you're here, you don't need this degree of detail, but whatever):
1. Copy all the code and paste it into a text editor (notepad or NP++).
2. Modify the walk_dir to the folder where you've extracted the stuff.
3. Save the file with "*.py" extension somewhere in your hard drive. For example, "moveTextures.py".
4. Open a command prompt in the path where you've saved the *.py file (just browse to the folder and type "cmd" -without quotes- in the address bar).
5. In the black window that pops, write "python3 moveTextures.py".

The script will start running and putting the textures into the place they should be for Noesis GR2 being able to autoload them.

-----------------------------------------

Second: given that the "Export" feature only gives the albedo and normal textures, I've done a slight retouch to the GR2 reader file:

This is how the original 1.35 file is at line 661 and ahead:

Code: Select all

        if baseName[-3:] == 'alb':
            if flag != 1: 
                texList.append(tex)
            material.setTexture(TextureName)
            
        if baseName[-3:] == 'nrm':
            if flag != 1:  
                rgba = rapi.imageGetTexRGBA(tex)
                #swap red and alpha channels
                rgba = rapi.imageNormalSwizzle(rgba, tex.width, tex.height, 1, 1, 0)
                tex.pixelData = rgba
                tex.pixelType = noesis.NOESISTEX_RGBA32
                tex.mipCount = 0                        
                texList.append(tex)
            material.setNormalTexture(TextureName)
            
    return texList ,material
And this is my version:

Code: Select all

        if baseName[-3:] == 'alb':
            if flag != 1: 
                texList.append(tex)
            material.setTexture(TextureName)
            
        if baseName[-3:] == 'orm':
            if flag != 1: 
                texList.append(tex)
            
        if baseName[-3:] == 'nrm':
            if flag != 1:  
                rgba = rapi.imageGetTexRGBA(tex)
                #swap red and alpha channels
                rgba = rapi.imageNormalSwizzle(rgba, tex.width, tex.height, 1, 1, 0)
                tex.pixelData = rgba
                tex.pixelType = noesis.NOESISTEX_RGBA32
                tex.mipCount = 0                        
                texList.append(tex)
            material.setNormalTexture(TextureName)
            
    return texList ,material
This way, despite not being loaded at the preview, Noesis will export the *.orm file along the *.alb and *.nrm
Sinesters
ultra-n00b
Posts: 1
Joined: Wed Aug 23, 2023 5:20 am

Re: Granny .GR2 Reader plugin for Noesis

Post by Sinesters »

Do any of you know where are the characters body/heads in the nightmare of Baldrus gate 3 file structure i already found all the creatures armors weapons etc but i cant find the main characters.

Help would be appreciated.
Canyougiant
ultra-n00b
Posts: 2
Joined: Fri Aug 25, 2023 11:40 am

Re: Granny .GR2 Reader plugin for Noesis

Post by Canyougiant »

Hi,
I am using this script to import the gr2 models and animations from Age of Empires 3: Definitive Edition, but animation isn’t correct, only the whole body is moving. It works in legacy version of the game, which is Age of Empires 3. Apparently, something has changed. Have you ever tested it with Age of Empires: Definitive Edition?
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: Granny .GR2 Reader plugin for Noesis

Post by Tosyk »

it works pretty well with Baldur's Gate 3 characters. I must also note that this is the only tool that converts BG3 models properly with skeleton.

Image

Image

Image
Thank you for all you do here
my blog | my forum
Post Reply