Page 12 of 34

Re: Granny .GR2 Reader plugin for Noesis

Posted: Sat Apr 24, 2021 9:08 pm
by jayn23
ithamar73 wrote: Sat Apr 24, 2021 8:22 pm Hi, I was looking at the game Carnivores Dinosaur Hunter Reborn, and it uses GR2 files as well, though they are the Big Endian kind. Are you interested in adding support for that, or accepting patches for those?
I've attached a sample in case you are interested.
Big Endian is already supported by my script, and your sample works - no work needed :D

Re: Granny .GR2 Reader plugin for Noesis

Posted: Sat Apr 24, 2021 10:30 pm
by ithamar73
jayn23 wrote: Sat Apr 24, 2021 9:08 pm Big Endian is already supported by my script, and your sample works - no work needed :D
Oh man, I now see I was not using the latest version of your plugin, I downloaded the one from this thread but there are 2 more versions linked below it (in other topics) :D

My apologies and thanks for your awesome work!

Re: Granny .GR2 Reader plugin for Noesis

Posted: Sun Apr 25, 2021 8:28 pm
by jayn23
Since i am taking my time with the new update i thought ill show some of the progress done in action.
Everything D2R is working excluding meshes that have multiple materials per polygroup which is a real pain in the ass to fix without breaking other things, if i dont get it soon ill just realse as is and update someday if ever :P

Image


Credit to Zee for providing texture format
https://github.com/CucFlavius/Zee-010-T ... Texture.bt

Re: Granny .GR2 Reader plugin for Noesis

Posted: Mon Apr 26, 2021 4:51 pm
by Ivenend
jayn23 wrote: Sun Apr 25, 2021 8:28 pm Since i am taking my time with the new update i thought ill show some of the progress done in action.
Everything D2R is working excluding meshes that have multiple materials per polygroup which is a real pain in the ass to fix without breaking other things, if i dont get it soon ill just realse as is and update someday if ever :P

Image


Credit to Zee for providing texture format
https://github.com/CucFlavius/Zee-010-T ... Texture.bt

for now here is the texture only script
fmt_D2R _texture.rar
Wow, that looks great!
Zee also provided information of D2R models, model sections and shader, would those help? https://github.com/CucFlavius/Zee-010-Templates

Re: Granny .GR2 Reader plugin for Noesis

Posted: Mon Apr 26, 2021 5:08 pm
by jayn23
Ivenend wrote: Mon Apr 26, 2021 4:51 pm Zee also provided information of D2R models, model sections and shader, would those help? https://github.com/CucFlavius/Zee-010-Templates
Well i already had models and models section so no need, and shaders are out of scope for the script.
I manged to get multiple materials set by polygroups, now my only issue is how to get Autotexturing for D2R to work with Autotexturing for BG3 as they both conflict in quite a few places.

Re: Granny .GR2 Reader plugin for Noesis

Posted: Tue Apr 27, 2021 6:20 am
by zelibobo
jayn23 wrote: Sun Apr 25, 2021 8:28 pm for now here is the texture only script
fmt_D2R _texture.rar
:keke: You can see what is wrong in your free time:
Image
data\hd\bvt\textures\default_thickness.texture
Image
It looks like you need to add exceptions.
app Raw texture cooker extracted this file offset 0x7c
Image

Re: Granny .GR2 Reader plugin for Noesis

Posted: Tue Apr 27, 2021 9:32 am
by Ivenend
zelibobo wrote: Tue Apr 27, 2021 6:20 am
jayn23 wrote: Sun Apr 25, 2021 8:28 pm for now here is the texture only script
fmt_D2R _texture.rar
:keke: You can see what is wrong in your free time:
Image
data\hd\bvt\textures\default_thickness.texture
Image
It looks like you need to add exceptions.
app Raw texture cooker extracted this file offset 0x7c
Image
Can’t open the images you posted :eek:

Re: Granny .GR2 Reader plugin for Noesis

Posted: Tue Apr 27, 2021 12:02 pm
by zelibobo
Can’t open the images you posted :eek:
:eek: Changed image hosting...

Re: Granny .GR2 Reader plugin for Noesis

Posted: Tue Apr 27, 2021 12:16 pm
by jayn23
zelibobo wrote: Tue Apr 27, 2021 6:20 am :keke: You can see what is wrong in your free time:
Image
Yup i know whats wrong, can you please upload a sample so i can test new version

Re: Granny .GR2 Reader plugin for Noesis

Posted: Tue Apr 27, 2021 12:20 pm
by zelibobo
Yup i know whats wrong, can you please upload a sample so i can test new version
default_thickness.zip

Re: Granny .GR2 Reader plugin for Noesis

Posted: Tue Apr 27, 2021 1:00 pm
by jayn23
zelibobo wrote: Tue Apr 27, 2021 12:20 pm
Yup i know whats wrong, can you please upload a sample so i can test new version
default_thickness.zip
Thanks,

Updated script in original post

Re: Granny .GR2 Reader plugin for Noesis

Posted: Wed Apr 28, 2021 9:03 pm
by jayn23
Version 1.3

Changelist:

New/Improved Features:

MULTIFILE - Completly rewrote code to load and combine multiple .gr2 files.
  • New version now works with paired animation and paired skeleton options.
  • Weight and Bone Binding Auto correction - if a bone bindings refers to a bone that dosent exist or weights are 0 for the only bone that
    exists script will automaticly find the closest bone that exists and assign it to vertcie.
  • Will now load files in selected directory only, old code unintentionally also loaded files in any existing sub directories.
New option when merging multiple files:
SMART_DETECTION = 0 - What old script did, just combines everything Blindly.
SMART_DETECTION = 1 - Check and remove any duplicate bones by name only (should be used for files containing similar skeletons)
SMART_DETECTION = 2 - Check and remove any duplicate bones by name and comparing InverseWorld transform matrix.

Script now loads meshes properly when a polygroup has multiple materials.
Multiple small bug fixes

Baldur's Gate 3:
Upadted .PAK extractor to work with texture.pak archive post Patch 4 update.
Using a new Version of noesis seems to have fixed the old issue where file would load multiple time during extraction.

Added Initial Support for Auto Texturing - Currently only loads Albedo and Normal Maps.
Requierments:
GAMETAG_BG3_TEXTURES = 1 must be set to 1 in order to load textures
BG3 PATH must be updated in script
Shared.pak and Textures.pak must be unpacked

Known issues:
  • When Extracting texture.pak it will show a false error, just press OK and it will continue exporting archive.
  • Auto Texturing is still very buggy and dosent always find and set the correct texture.
    its also very slow and could take up to 15 seconds to load.
    I am currently rewriting the enire Autotexturing script to be both faster and more effective but it will take some time.

Age of Empires 3/ Online:
Games are now fully supported.
Added Support for FD format based on source code by kangcliff
https://github.com/kangcliff/Age-of-Empires-III


Diablo II: Resurrected
Added Support for .model;.skeleton;.animations; .texture formats.
for Auto Texturing to work files should be in textures directory or it wont find them.
Only Normal and Albedo maps are loaded.
For each Creature there is one file that contains all animations, you can use the ANIMATION_TRACK option to choose which track to load.

Example use for new MULTIFILE and BG3 Features
with the following Option set:
MULTIFILE = 1
SMART_DETECTION = 1
ANIMATION_MODE = 1
GAMETAG_BG3_TEXTURES = 1

Placed the follwoing .gr2 files in chosen folder.
MINOTAUR_ARM_Bracers_A.GR2
MINOTAUR_ARM_Chest_A.GR2
MINOTAUR_ARM_Footwear_A.GR2
MINOTAUR_ARM_Skirt_A.GR2
MINOTAUR_Body_A.GR2
MINOTAUR_Body_A_Fur.GR2
MINOTAUR_Head_A.GR2
MINOTAUR_Head_A_Fur.GR2
MINOTAUR_Head_A_Horns.GR2

In Seperate location placed:
MINOTAUR_Rig_DFLT_LOCO_Sprint_F_CMBT_01.GR2

Now when running script we choose the folder with all of the MINOTAUR parts, it will merge all meshes and bones into a single Model seperated by sub mehes and a single skeleton, by turning on SMART_DETECTION = 1 any bones with duplicate names are deleted.
ANIMATION_MODE = 1 will now allow us to pair the new combined model with an animation file.
GAMETAG_BG3_TEXTURES = 1 will attempet to auto texture model.

And here is the Result:
Image

Re: Granny .GR2 Reader plugin for Noesis

Posted: Thu Apr 29, 2021 10:07 am
by zelibobo
I apologize. Take a look in your spare time. Thank you.
Image

download ~86kb

Re: Granny .GR2 Reader plugin for Noesis

Posted: Thu Apr 29, 2021 12:00 pm
by jayn23
zelibobo wrote: Thu Apr 29, 2021 10:07 am I apologize. Take a look in your spare time. Thank you.
Image

download ~86kb
This isnt a problem with the script just a noesis limitation for loading to many models at once.
To bypass this issue simply set option MERGE_SCENE = 1 and it will merge all models and allow file to load.

Re: Granny .GR2 Reader plugin for Noesis

Posted: Thu Apr 29, 2021 12:28 pm
by Ivenend
Thanks for your hard work, the new plugin generally works fine. But there is a small issue:

the normal (UV?) seems kind of broken on some models, like this:
Image

The normal of the same model looks fine if I export the model to DAE with LSLIB(https://github.com/Norbyte/lslib):
Image

The sword model I shown above is this one: https://drive.google.com/file/d/1jWXzVm ... sp=sharing

BTW, would you like to join our D2R modding discord? We have many discussion of D2R model and texture there: https://discord.gg/fXpPPd6fUm