Xj Conversion Notes

So some good news and some painfully obvious news that is going to surprise no one.

First the painfully obvious news. I went back to look at Sega's Ninja Chunk Model documentation in the Katana SDK to confirm that it is utterly and completely wrong. Go figure.

As far as good news goes, I looked at Kryslin's ExMLD.new application again to discover something I hadn't seen before. I had been using his scan functionality to double check what I was parsing out of the file. The problem is that his form leaves out a lot of information. It just says texture or mat with out giving away any clues and I had nothing to go on in terms of Sega docs.



Then I went to write out an obj file to see what was going on and I noticed there is a check box to write out debug information to the program's console. And it wrote out the offset's of the chunk sections which he didn't include in the scanner. So I actually have something to go off of for .NJ now.



The other bit of good news is I found the weapon models in PSO version 2 and they're in the same order as the ones for PSOBB. Which means that if I manage to parse and export nj, it might give me something to compare xj to. Getting a little ahead of myself there. I'm mostly writing this to assure myself that I'm actually making some progress.

Pastebin link for a full debug read out from Kryslin's program: Link. So I have something to refer to when I'm spacing out at work.
 

Attachments

  • no_offset.PNG
    no_offset.PNG
    83.3 KB · Views: 143
  • offsets.PNG
    offsets.PNG
    253.7 KB · Views: 131
This video turned out about as badly as I expected it. Haven't written up a readme file for the n.rel map files yet, but I wanted to try and make a quick tutorial, at least partially describing the format and how to go about breaking it down and analyzing it.



I think i should go back and make one for .nj and .njm, since those are a lot simpler and more straight forward.
 
wub.gif


If you want to figure out what some of that mystery data is, have you tried comparing the DC and PC files? I also did some experimentation with the Sil Dragon, since it's one of the smallest maps with animations, but it still has several on DC:

  • The aurora ripples
  • The dust scrolls in the distance
  • The floor has dust/snow plumes that blow by
  • Your feet leave snowprints that disappear after a moment

On PC, only the last two work. The aurora and dust are still present, but they're frozen in place, because the PC n.rel file doesn't tell them to move. I tried swapping the DC files into PC, and everything started moving (in all its horribly broken transparencies glory), but doing so causes terrible Z-fighting on the floor, with the white snow surface battling the dark blue ice layer underneath that gets exposed when the Sil Dragon burrows. The PC file clearly adjusts something to prevent the Z-fighting, as well as turning off several animations. If only it were possible to isolate individual animation instructions and to transplant them from the n.rel in one version to the n.rel in another, it would be possible to make everything move correctly without introducing bugs in the process. The n.rel also seems to be responsible for colouring the aurora, as the texture itself is just alpha.
 
My only interest in maps is parsing out and exporting the models. I'm trying to make videos and share information like this, so if there's any other modification or changes other people want to implement, the information, or at least a starting point is there.
 
Looking at the differences between the same area on two different versions that have two different sets of animations would help you to determine which data goes with what so that you could export the models and the animations that go with them is what I'm saying, which is within the realm of what you want to accomplish.
 
Not really no, if i can export the models, effects and animations for the maps can be implemented with Unity.

Next episode: NJ for anyone interested.

]
 
I watched the previous one, gonna watch this some time today or tomorrow as I have a lot of cleaning to do :P
I would like to ask you to write down stuff like you were showing:
Go to the end of the file, read the last 4 ints, the first int is the beginning of the header... etc

Maybe you could upload it this way with the files you are analysing and it would be way easier (at least for me) to catch up by reading instead of watching the videos. In case is not somewhere else already like the git or something else you have.
 
Yeah, I'll make a readme file for these. It helps me organize my thoughts by making a video trying to describe this to someone else, as opposed to trying to write a readme out of the blue. Also I wish i had a hex editor with a highlight function like in word (pink, blue, yellow, etc) to outline each area as I go along.
 
Some not very surprising but kind of encouraging. I've played around with nj and played around with xj. There are something aspects of each file type that I know more than the other, but I realized I haven't spent a lot of time comparing the two. So I parsed the saber.nj from pso v2 and saber.xj from psobb and the nodes have the exact same flags and attributes aside from different address. So maybe comparing the two might give reveal some more info on what's going on. Debug log here: http://pastebin.com/kM89aUFj
 
Some modest progress. I was messing around at work and I managed to copy&paste a NJCM chunk from one of the PSO version 2 n.rel maps into it's own .nj wrapper and displayed it in Noesis. So the proof of concept of exporting maps as .nj files works.



And I took some time tonight to try and write up a quick note for the map formats in PSO version 2. Not complete by any means, but it's better than nothing so here: https://github.com/seiche/Ninja-Lib/blo ... _FORMAT.md.
 
Back
Top