#List of useful tools to Convert Assets (3D and 2D)
1 messages · Page 6 of 1
You can't avoid nesting loops
but if you pre-process it you can do it in a single move almost...
Don't, do it in the same way SC/retail do
You're prematurely optimizing and you're gonna cause problems for yourself
because of the Matrices...
yup... anyway i'm taking the long way to actually have a deep understanding of the code at that level... so maybe we could improve it somehow...
for now I will again halt my own code, re-take the code translation... take my time and fully translating Battle.java...
maybe I could have more answers from that place...
Monoxide, how correct is this documentation about GameVarParams?:
GameVarParams:\n This class depicts the parameters related to Game Variables.\n Can Get or Set Parameters inside the Variables of different parts of the Game Engine.
some of the cases I will be not implementing... because are not on my code scope, some examples:
get() -> case 61 -> Scus94491BpeSegment_800b.totalXpFromCombat_800bc95c;
Yes, it's just engine variables that are accessible from the script engine
what would happen if I divide an AtomicInteger?... I will have a reaction chain of Integer Fission that ended into a nuclear overflow?
Guess you'll have to try and find out
What's the worst that could happen?
doommetal has left the chat
Integer Atomic
I went too far into the rabbit hole... I wanted the framework to only execute the script... ending in other place that I don't need to... hahaha
I feel like I'm in a script that is endlessly looping... but not because I want... but because I need to literally translate from the Main(){} of SC to get what I want to... there is no other way...
is not fun re writing the code for something that I have already the code for doing the same in a single step... even if a Wall of Code...
and if I use my way the code from SC will be not usable to what I want.... because I have to replicate the exact same behavior in the exact same way
well I think... will take the coward approach... just convert the Models and Particles from DEFF... but the user will be on charge of setting up all the scene...
also this means the timing
congratulations, I have successfully enthralled you. You will never escape LoD. It is in your DNA, just like mine...
at least until two things happens:
1.- I will study and became a Software Engineer, so will understand the problem from other perspective.
2.- SC DEFF Code and Script in general came a little bit more easy to manipulate (for some unknown reason).
3.- Somehow I got illuminate with some godlike idea that will solve this mess.
I think that's reasonable, imo you're trying to do something extremely difficult and time consuming and it would be a better use of your time to work on other tools
I've halted the Sound conversion and Mapping... A LOT...
I promised two years ago to Drew to get my tool doing at least the basic of that... still didn't read a single class from SC to know specs from sound and soundbanks
But I will not fall like a tree making noise and get rotten... I will be defeated like a person who received a cannon ball in it's chest but still died standing
I will rename in my code the thing as "DEFF Object Conversion"...
@wicked gulch I was having issues running the python version of the asset manager, however after some debugging and small patching, it works. It seems there were some syntax issues:
time_now = f'{'='*50}\nWork finished at: ' + str(datetime.datetime.now())
^
SyntaxError: f-string: expecting '}'
It was incorrectly using brace syntax for f-strings, and in a few areas as well, mostly in conversion_interfaces.py
if you'd like I can share with you the py scripts i updated
Im also not sure why the color data is coming out different on extracting the textures, trying to match up any of them with the retail color and sadly doesnt match up. Unless there is some color conversion with the deff file type that I'm not aware of
I had some issues with matching in the past, but I couldn't say if it was the same issue or not.
Are you a programmer in addition to modeling and animation?
I dabble around, I do web dev and have done some stuff with C#/C++ and python
I've learned a ton of skills in the hopes to eventually create my own game, long term goal :b
From what I've seen so far, character colors closest to retail are Texture 0, however, there is a a strange thing happening with Reds and Blues specifically
I'm manually fixing the UV maps, but some of them were already fine. I'm going to investigate a bit more and see if I can come up with a solid answer for it.
Okay, so TLoD uses multiple CLUT's per atlas, and often PS1 era was often BGR555 and we use RGB888 these days, so there is a bit of a color swap as I thought.
so there is a couple things that are/could be happening:
The indexed texture is interpreted as direct color
ORRRR
The wrong CLUT is being applied.
So, since the character uses the same texture atlas for every part of the character, each mesh of the character is running different CLUT's.
Which means that each material needs to be decoded for the indices of colors, apply the correct CLUT's (Color LookUp Table), and then export/output RGBA format
I havent looked at the export logic yet for the asset manager, if anyone knows how its being done atm for the asset manager I would love to know
Wow, apparently I should ask you for help with other community projects! I've learned many skills myself and am opening a studio for gamedev, so that's relatable.
When he is available, DooM will be happy to provide answers.
Awesome! In the meanwhile, I'm going to try and convert the color encoding, and then sleep.... finally >.>
i'll check this... which model was?
nice 💪🏻
its all of them, its a color decoding issue i figured out
but i was testing on meru
Alright, it seems that the only exports RGBA, but PS1 uses BGR555 and not RGB888; RGB888 is capable of 16,777,216 colors (2^256)
(i.e.: BGR555 is a 16bit color encoding system with its bits are flags. R = 0-4, G = 5-9, B = 10-14, and a semi-transparency flag for bit 15, able to render 32,768 colors (2^16). TLoD uses 4 and 8bpp. @4bpp (bits per pixel) and has only 16 colors (2^4) (index starting at 0) @8bpp (index starting at 0) and has 256 colors (2^8).
Format Bit structure Levels per channel Total colors 4bpp 4-bit index N/A 16 8bpp 8-bit index N/A 256 BGR555 5+5+5 32 32,768 RGB888 8+8+8 256 16.7M
Since TLoD uses both 4bpp and 8bpp, BGR555 happens anyway, since the PS1's GPU runs the BGR555 algorithm.
So if 4bpp is 2 pixels per byte, then
byte = tex_bytes [y * (width//2) + (x//2)] #since 1 byte holds 2 pixels
if (x & 1 ) == 0:
index = byte & 0x0F #low nibble (pixel 0)
else:
index = (byte >> 4) & 0x0F #high nibble (pixel 1)
#REMEMBER INDEX IS 0..15
in my end is working just fine
I think you are using an old converter 😬
in which format/tool are you converting?
oh snap i hope im not using an old one
im using the Asset Manager, convert battle models in single mode
hmmm which version?
pulling the gltf into blender, this shows v0.2
binaries from the gltf?
sorry wasnt sure what you were referring there haha
hmmmmm
weird thing...
In my end I have the correct textures for meru
except you are converting from mini models...
whaaa
minimodels are a... thing to say something hehehe
are you meaning like world map models? cause I exported battle models
ahh, nevermind, i was the big dumb
it appeared I was on the old version...
I still am having texture import issues on blender still
its getting animations, buffers, meshes, but not imaging textures/assigning materials into the gltf for some reason
is there a way to have it pack into a glb rather than a gltf?
some shennaniry
yup yup
ye ye thats what i was thinking
idk If they change something about how the glTF works...
i know stuff was getting legacied idr what
well Collada was one of the file formats
maybe from a BSDF change? not sure if that could do it
im gonna install 4.5.2 LTS and see
oh? what i miss
you didn't check the convert texture checkbox hehehe
check it...
or select the "Single Model Mode" from above and will check and convert everything
but.... i did click texture check box...
sure?.... hmmm try again but simply tap the Single Model Mode
should be a bug in the GUI pretty much sure of that.... because that is controlled using some 'under the hood' values that if not reset properly from my code sometimes get bugged... I found that bug but I think forgot to upload the fix...
Or if you can just try the batch mode...
anyway if you close the window and re open it should be working normally
ahhhhhhhhhhhh
that should be
you are right
but... how it worked before?
that's weird
technology :b
in any case try to reload the tool and see if converting as intended...
either way, it was a good dive into it! Still plan to make a custom model for each at some point.
yeah i'll try batch this time
maybe had some weird bug going on, in my code... since I was working all alone this (coding and reverse some file formats from old games it's my hobby) so time to time I ask real coders like Monoxide, TFZ, Zychro, Icarus, Ink... how my tool is going....
well on import this is what im brought with, rather than the materials having the images already assigned/packed in
sometimes some people contribute in here too obviously... but most of the times we face some bug reporting hehehe
haha yeah, if i find something I'll for sure let you know! the project is still coming along great man!
im having a lot of fun in the community here, and I'm glad I can be of some help to people when I can anyway :b
thanks a lot!
if not problem... try with Blender 4.5
rn i'm checking how the nodes should look like hehehe
yeah i will check for ya for sure! i have a feeling it is the bsdf
can you show me your nodes from 4.5.4?
yeah thats what i thought, blender 5.0+'s stricter pbr/bsdf rules are killing the pack im thinking
yep
take the base color as a color attribute node
and the Texture now goes to another Node
since my tool do the automatic assigment to the base color node... this is a thing
oh yeah i know how to setup nodes, i just mean blender isnt allowing the assignment
ya ya
a real incompatibility
thats for future implementation prolly
yep have to be
at least we got it down to blender version... I hope >.>
it's good knowing that someone tested on 5.0... which is very good... rn I will add it to the TODO list
for now will be the recommended
thanks a lot for posting this... This save me real several hours* of finding out-coding and headaches hahaha
yup!! i had nothing else to do today so it was productive for me nontheless
also I was checking what you told about the color config from textures... you are right but also keep in mind that PSX Textures had several configurations
4bit*, 15bit, 24bit (real color?)
oh yeah CLUT
for Characters textures the configuration is 8bit...
64 CLUTs for coloring the model texture
the BGR555 format to RGB888*
ahh yeah did that conversion because need RGBA... because in PSX the fully black it's considered to be Alpha
so need to convert the colors to add the alpha value and then convert into RGBA888(value) to export into png
ya ya, if you want I can try to put together the algorithm
even I achieve some speedup thanks to the ideas Monoxide give me about the texture processing... and speedup a lot hahaha
yeah monoxide is cracked haha, im not that great at coding but I can get around
this is also very important... I need to clean-up the code...
nesting is a nightmare for me, i never go more than 3 deep if i can help it
In TLoD Engine you'll find at least 10 nesting deep
that are forked around several functions that works if they are connected by the Engine
If you read my previous post I was doing some shenanigans to get Visual Special Effects to be converted as a single scene... that is taking me forever lol
so converting their instance vector with spellID and assigning textures
something like that?
hmmm a little more complex...
i can imagine, that was a... simple approach
if you look the Effects code in TLoD you'll understand why is not so simple that I would like to be... the main problem it's the auxiliary processing engine that TLoD had... the infamous Scripting Engine...
DooM and the others have been admirable in their efforts to parse the meaning of LoD's code. 
also we always try to simplify the code and the things so people won't get crazy in the future hahahaha....
we are the madman gatekeepers somehow lol
tell me how it works with that change... and also it's very good that you have solid knowledge on how psx system works and also some stuff about coding... awesome!
time_now = f'\nWork finished at: {datetime.now()}' in my code looks like this
are you parsing the code with some AI or something?
Unrelated: Would you like me to advertise "Help Wanted" on the lod.org front page? Whether for Linux support or anything else. I want to signal-boost this project and get more eyes on it.
{'='*50} that string shouldn't be in the code hehehe
sure! obviously the more people the fastest we could lead this tool to a better state...
Tell me what's at the top of the priority or "stuck" list.
and what skills are required.
I'll add it to the right-hand blurb on front page, and link here.
i was using vscode and running via terminal, was getting syntax errors, but turned out it was on an old build anyways
current code is fine for sure, but when I was on the old build i had to fix the syntax issues to get it to run
I followed the trail of debug logs
I added {'='*50} as a log indicator, just for easier spotting for myself, but I also didn't check my own
shows up like this, but I made a syntax error myself, but fixed it in the longrun, however, there was no need to continue on that track as you had added a lot from v0.2 to v0.2.7, which visually I tricked myself into thinking they were both the same build at first
==================================================
Work finished at: 2026-02-18 15:42:01
original syntax issue i ran into on the old build:
self.change_sc_folder_view.setText(f'{self.init_config.get('SC_Folder')}')
^^^^^^^^^
SyntaxError: f-string: unmatched '('
ahhhhh sorry hahahaha
I was a little more unexperienced in that time and the GUI code was created very much on the fly... in the next build I made (v0.2) I took more attention and rewrite almost all the logics behind the tool hehehe
also, suddenly I understood the OOP real meaning hahaha... well after I red Clean Code.... even doing that my code looks pretty amateur... and I'm aware of it... hehehe sorry 😅
It's alright. As you know we're all on the wacky journey of life, skills, etc. You have come a long way!
you certainly have, coding is one of those things that is always changing, as long as you are able to understand where improvement is needed, you will do great!! which you already are!!
@wicked gulch bump
popping in to see how the new tools is coming still can't wait to play with it
currently works great, however, right now there is a color conversion we have to work out from BGR555 to RGB888
sorry... about this... some desirable knowledge: Python, 3D/Animations principles, Binary and Data Structures Principles... anyway this is not 'exclusive'... any person*with guts and some good ideas also are invited to participate hehehe... but at least 1 of the skills is necessary... if not will be a little complex to get until I'm right now 😬
Update from the Mac Side:
Sorry for the 3 month delay. Real life work took a priority and I have not had a chance to test the Mac Python Executable. I should be able to install Severed Chains and the asset manager to test the Mac Executable. It'll be available for use soon. I just need to play catch up on the messages in here.
Thanks RamenRider... well in my case I'm in a similar situation, but also I get a little mad to some stuff that I've tried and didn't work, so also trying to relax my mind hehehe
Successful test! It works good on other Macs. Turns out that when zipped, the python application is a 58 MB from 148 MB. So a better compression than I thought.
oh yeah hahahaha... there are a lot of reasons that happens... first the background image is an uncompressed PNG... all the code is text... some of the loaded modules (libraries) are way to much (even for me)...
but if I have to bet, the heaviest module it's PyQt, since it's a whole implementation of C++ libraries hooked using python...
What do you mean by uncompressed png? All pngs are compressed with zlib
I selected compression == 0
so would be a compressed 0 zlib png or uncompressed png hehehehe
Any reason why you did that?
PNG is lossless
yeah... but why the compression?
To make it smaller
if lossless, but compressed* something it's taken hahaha
No it's not, that's like saying zipping your files loses data
zlib is lossless compression
well tomorrow will compress the file to maximum
and pull the fix
Hey Monoxide
are you here?
From a look at the directory:
PyQt6 at about 55 MB
scipy at about 36 MB
numpy at about 6.7 MB
So it is definitely PyQt6 and scipy being the biggest contributors to the size.
as I thought hahahaha
I will need a little guidance in some stuff I will be doing ok?, so I will start (again, duh...) to do some of my silly questions... it's
% related to conversion of TLoD Resources...
Go for it
Time is taken when compressing/decompressing the image, but not an amount that matters here
Before I add this to the fork, I'm curious if the Python executable works on Windows and Linux. Any volunteers? I can provide the zip file.
I had some help on this. It seems like my app works when the zip/tgz file is transferred through HDD to another device instead of being downloaded. I need to reproach how this would work..
Thanks @vestal halo!
Hey @wicked gulch I added a ticket here with a task for you that would be very helpful to us, if you don't mind doing it https://github.com/Legend-of-Dragoon-Modding/Severed-Chains/issues/2602
answer in the issue.... at I have listed the Dragoon Transformations and some other DEFF, anyway I will do it DEFF By DEFF
Thanks, we're basically looking for this list so that we can easily check a bunch of LMBs or CMBs if we have to change that code to make sure we didn't break anything
Sorry it's been awhile since ive checked here so i missed a lot of the convo, but do you have a specific method yall use when fixing the colors on textures? I wanna check before I commit to my pixel by pixel method lol
hmmm you mean how my tool get the correct texture for the face that it's being filled with that texture?
it's a little complex in code but in the explanation it's quite easy...
My tool what it does it checks the properties of the data in the face (Triangle or Quad) (since the original model have several properties written inside of each face, including the CLUT to be used), so what my tool does is matching the each CLUT of each face from the model to the corresponding CLUT of the Texture... it's very inefficient in speed but this 99% sure that you will get the correct texture for that face...
there is an 'speedy way' to do this too... what is 'assuming' that in an Object only 1 CLUT is used, in other words, 1 object == 1 CLUT assigned (and more of one objects could be assigned to the same CLUT) but this prove to be wrong, since some models uses different CLUTs for different faces in the same Object...
the classic "fidelity" vs "speed" fight hehehe
so if you use the TLoD Assets Converter (the last version) this should be done automatically (except a new bug raised hehehehe)...
I’ll get the latest update! Thank you!
you are welcome!
What version of blender are you using? Did you get the colors?
Downloaded 4.5.4, Kongol is gray but the animations work. I don't really know what I'm doing I guess
you selected the viewport shading at the 3D window?
at material preview
or Rendered
both of those are working well
if you have solid selected will look without any material/color/texture
I clicked the button that said rendered, I see shadow affects but no colors... Haven't used blender before...
I was following a youtube video and got this far:
ohhh
you are using the old way
hehehehe
use TLoD Assets Converter instead...
this new tool will allow doing everything in a single click hehehe
Yah, I'm using TLoD assets manager python script, in linux...
that's weird... you should have the textures and everything on the character already
what?... you are right
this is not only interesting... but very weird
let me check something really fast
@wind veldt have you use multiple models for converting them?...
I Have the same issue right now...
but it's the tool I think
found it... for some reason is not taking the textures
I wonder why?... even it's happening to my tool on windows...
hmmmm
🙄
sorry Wall Crash but I'm resting from code just now... hmmm were like 16hs of pure coding and reading code... In any case tomorrow will find out what's happening and release a fix for it!
No problem, have a good night
thanks a lot!
this is an early draft of the new version... since the project get delayed because some faults from my side I totally forgot to update the GitHub code... anyway here it is... this should do the trick hehehe
Kongol learned Rollout:
it's working!
now you have to go into the NLA track of Blender and select the proper animation for each of the Objects...
sorry but that was the better and only way that Blender uses to import this format hehehe 😬
That worked:
Do you have a list of what each animation does?
I will start watching your youtube videos
Did you make an armature for him?
I don't know how to use blender, I was just importing the file
Ah ok. I was thinking if you’re gonna do custom animations it might be easier to add a basic human armature and pair it to the model.
Eventually I will try that
I’ve only done it once but I’ll probably try again at some point
wow for some reason didn't read this wth? xD... sorry... I should do a list but actually will be very large... if you want to... you could try
Updates on the MacOS side. I got the application working and figured out the Gatekeeping mechanism preventing the MacOS app from opening. The app is not signed with an Apple Developer ID certificate and notarized by Apple. Which can be rectified via a $99 with the Apple Developer Program membership.
Which I don't plan to get at this moment... it would make others feel safer but I don't find justification enough to do for just one application. Say if I did more applications outside of TLoD Asset Manager, then it would make sense.
There is a workaround to get the app working on MacOS to allow the app to be opened by the user discretion instead.
I'll add instructions to the Read Me. And I can now say that there is now an official MacOS port of the tool. I'll add a releases page for it sometime later.
Surely Apple doesn't require all software developers to pay $99 for their software to work on the system, right?
well that would explain quite a bit what's going on...
Here is the release! It's on the MacOS fork.
I still encourage users on MacOS to let me know how this is working. I've only got 1 other MacOS machine. More feedback is appreciated!