Page 113 of 123

Re: Spotlight: Señor Casaroja's Noesis

Posted: Thu Oct 22, 2015 4:32 pm
by Devilot
has the KH plugin been updated for the 1.5 or 2.5?

Re: Spotlight: Señor Casaroja's Noesis

Posted: Fri Nov 06, 2015 1:40 am
by Snaz
I've been trying to parse xml, having seen the post on page 75, I've haven't gotten anything but import errors, having tried sax, dom, etree, even custom ones like untangle or beautifulsoup - I couldn't get a singlne one of them to work.

Errors I'd get were sometimes the same as the one found on page 75 (no module named expat; use SimpleXMLTreeBuilder instead), which would occur with the standard parsers- sax, dom and etree-. I'm guessing this has something to do with pyexpat, (which expat conveniently imports), of which there is not a single reference to in core321.zip.

other times there were invalid syntax errors when trying to use untangle or beautifulsoup.

someone. pls. halp.

Re: Spotlight: Señor Casaroja's Noesis

Posted: Sun Nov 08, 2015 1:51 am
by MrAdults
The Python implementation is static and stripped down. I've only been adding native libs as people (by people I mean chrrox) request them. That said, some scripts like this one are using bs4 without issue.

Re: Spotlight: Señor Casaroja's Noesis

Posted: Mon Nov 09, 2015 5:32 pm
by Snaz
Thanks that worked for me!

Re: Spotlight: Señor Casaroja's Noesis

Posted: Tue Dec 01, 2015 10:55 am
by Snaz
Hey a couple of questions:

Context: I'm working on dark souls.

1.
I'd like to be able to export animations, but I fail to understand how this is normally done in noesis. I've noticed you can drag files on top of the viewer and apply it to the current model. Is that the way to go? Even if it is not, what should I do to get that working? In other words, how is that case distinguished from say simply loading a file?

Being able to provide a path to all animations to export when exporting a model seems like a wiser feature to implement. Are there any examples of this I could use?

2.
Dark souls' animations are in a version of hkx, which I can convert to an xml or kf representation. However, the kf isn't compatible with my gamebryo script (dragging on top of the viewer). Here's a link to some sample files and my current script. I've tried finding more about hkaSplineCompressedAnimations (derived from the hkx->xml), and found the data is stored as NURBS. I'd love to learn more about how the animations are stored as NURBS, yet I can't wrap my head around the data. Any suggestions?

Thanks, hope you don't mind the off-topicness, you've had a go at the dark souls files once so I thought wth, might as well ask :D

Re: Spotlight: Señor Casaroja's Noesis

Posted: Wed Dec 02, 2015 2:14 am
by MrAdults
Snaz wrote:you've had a go at the dark souls files once so I thought wth, might as well ask :D
I have not. I guess you're confusing me with nyxo or whoever it was that did the Souls Noesis script floating around that's presumably based on nyxo's work. I enjoyed the Souls games a lot, but nyxo seems to have been thorough enough that I don't feel the need to turn my attention that way. I did use his specs for the Noesis Symphony of the Night support, though.
Snaz wrote:I'd like to be able to export animations, but I fail to understand how this is normally done in noesis. I've noticed you can drag files on top of the viewer and apply it to the current model. Is that the way to go? Even if it is not, what should I do to get that working? In other words, how is that case distinguished from say simply loading a file?
An animation is just a possible component of a "model" in Noesis terminology, so you can have your script auto-load corresponding geometry/etc. data for a given animation, or provide just an animation with no geometry. It's up to you and whatever makes the most sense for what you're doing. You can also provide multiple sequences for your animation or just have a big chunk of frames considered as a single sequence. The Gamebryo NIF script demonstrates a lot of animation functionality provided, including some keyframe expansion.
Snaz wrote:Dark souls' animations are in a version of hkx, which I can convert to an xml or kf representation. However, the kf isn't compatible with my gamebryo script (dragging on top of the viewer).
That seems to be a terrible Oblivion-era KF file, so the script can't parse over objects it doesn't care about. You should use a newer/better tool path for exporting Havok animations to something usable, like FBX, or at least a Skyrim-era KF. Having never done anything with Havok animations or converting them myself, I can't tell you what that path is, but I can tell you that it exists because I have at least, though barely, that much faith in humanity. Keep in mind that Noesis doesn't presently support KF bsplines either, so you'll want to use something that bakes out the evaluated transforms in the horrible event that you stick with KF. There's got to be a Havok animation->FBX converter already, it should be trivial to produce using the actual free Havok libs.

If you were feeling adventurous, you could just write a Havok animation importer for Noesis. This is the route I'd take.
Snaz wrote:I'd love to learn more about how the animations are stored as NURBS, yet I can't wrap my head around the data. Any suggestions?
Well, reading up on splines and drilling down into the associated fundamentals/mathematics would be a start. Noesis implements some basic spline types natively and in Python, which by default are set up to allow you to pass around Bezier splines. But there are so many forms a typical animation curve can take (including implicit and explicit tangents and a huge variety in evaluation formulae) that there is no simple one-size-fits-all way of looking at the data and it's a topic that relies on the presence of a lot of knowledge-building-blocks.

Re: Spotlight: Señor Casaroja's Noesis

Posted: Sat Dec 12, 2015 5:08 am
by ssringo
Would it be possible to add support for Lightning Returns PC? Tried extracting the PC version (by filelists) and just get an error "file could not be previewed" if I double click and "file type could not be determined" if I right click/export. I downloaded the PS3 version for comparison. Here is a screenshot of the two directories (I extracted the PS3 version no problem).

http://i.imgur.com/VESvhlJ.png?1

Ninja Edit: I actually tried renaming the files to correlate with the PS3 naming scheme and it actually extracted the files. However, the .TRB files don't load and can't export. I once again tried renaming the files and Noesis just crashed (I did tell it to submit a crash report).

I'm happy to upload any files that could help.

Re: Spotlight: Señor Casaroja's Noesis

Posted: Sat Dec 12, 2015 11:03 pm
by MrAdults
Were you the one that submitted the crash report on the .win32.trb file? I saw that some releases back and changed Noesis to recognize the .win32.trb extension. Now when you try to export it, you'll get this helpful message: "This is not a supported TRB platform, and you're probably some kind of terrible furry for owning it."

But no, I don't own Windows ports of any of the FF13's, and don't plan to support them.

Re: Spotlight: Señor Casaroja's Noesis

Posted: Sat Jan 02, 2016 3:17 am
by MrAdults
I haven't been working on Noesis much over the holiday, but I decided to wrap up what I had in progress before I go back to the unending torment of wage-slavery on Monday, so there's a new release up with a new R3000A CPU emulator. I wrote it with a mind toward making it easily-debuggable and very easy to customize from an external API user standpoint, and it's great if you want to just execute some code from a native PSX game on the fly to assist in extracting/converting/etc. I fully expect I'll be the only person to ever use it, but it does drop into new codebases quite easily and it's been live-tested with SotN in a PSX emulator.

Full source for the emulator is also available here:
http://www.richwhitehouse.com/fullsnipp ... R3000A.cpp
http://www.richwhitehouse.com/fullsnipp ... oeR3000A.h

Re: Spotlight: Señor Casaroja's Noesis

Posted: Sat Jan 09, 2016 10:48 pm
by 1nfern0
Anyone knows how I can print out animation names and a lot of other anim. attributes for the loaded model?

I have overwritten the "Get material info" tool script to do the same stuff for animations, but when I want to access the .anims for the NoeModel the list is empty.
I'm mostly interested to read out a few animation frame matrices for debug reasons.

Code: Select all

from inc_noesis import *
import os

def registerNoesisTypes():
        handle = noesis.registerTool("&Get anim info", gmToolMethod, "Prints out animation info")
        return 1

def printInfo(mat):
        pass

def gmToolMethod(toolIndex):
        selFileName = noesis.getSelectedFile()
        if selFileName == "":
                noesis.messagePrompt("No file selected.")
                return 0

        noeMod = noesis.instantiateModule()
        noesis.setModuleRAPI(noeMod)
        if rapi.toolLoadGData(selFileName) is not True:
                noesis.freeModule(noeMod)
                noesis.messagePrompt("Could not load selected model.")
                return 0

        noesis.logPopup()
        for i in range(0, rapi.toolGetLoadedModelCount()):
                mdl = rapi.toolGetLoadedModel(i)
                print(mdl.modelMats)
                print(mdl.meshes)
                print(mdl.bones)
                print(mdl.anims) # no objects in the animations list

                if mdl.anims is not None:
                        print("Animations for model", i)
                        print("=====================")
                        for noeanim in mdl.anims:
                                print(noeanim.name)

        rapi.toolFreeGData()
        noesis.freeModule(noeMod)
        
        return 0

Re: Spotlight: Señor Casaroja's Noesis

Posted: Wed Jan 13, 2016 2:55 am
by MrAdults
I've got the animation translation disabled for the Python layer by default (outside of the export path), because processing all of the data into flat matrices represented as Python objects gets awful in terms of processing time and memory usage pretty quickly. I can add an option to load the model with animations via Python if you need it. What are you using it for?

Re: Spotlight: Señor Casaroja's Noesis

Posted: Thu Jan 14, 2016 4:12 pm
by 1nfern0
Well, I've already seen that I can print out these informations within the exporter. So it's not needed any more thx :)

Re: Spotlight: Señor Casaroja's Noesis

Posted: Sat Feb 06, 2016 12:59 am
by Acewell
MrAdults i know you are a busy guy but i am hoping for your input on SWBF3 x2t textures. :D
We have 30k headerless and swizzled textures, some of them have footers with some data but it may not be accurate, the thread is here and Wobble has done a great job getting us half way there but we are stuck now. :(
viewtopic.php?f=18&t=13868

My other question is how can i make a script to read data similar to the way TextureFinder does and be able to enter options and flip switches in the script such as image type and width or height while taking advantage of the unswizzle functions in Noesis?
I'm thinking something that looks like this non working example would be useful for non programmers like me to convert swizzled textures from games

*nevermind fixed*

:D

Re: Spotlight: Señor Casaroja's Noesis

Posted: Sat Feb 06, 2016 4:57 pm
by MrAdults
You've got all of the tools you need to do that, take a look at tool_windowtest.txt in the Python directory for ctypes-based windowing system examples. You can just pop up a gui that lets people set all of the parameters, then generates and auto-loads an image from the parameter-based interpreted data. There are lots of image processing scripts of this nature to use as examples over on the old Google Code depot.

The Gamebryo NIF script shows how to do all kinds of untiling including 360-style and straight up Morton order. Use rapi.swapEndianArray to quickly endian-swap DXT blocks as commonly needed on the 360, this is demonstrated in the BulletWitch script in cprLoadTexture. BC6H and BC7 are also now available as decoding targets.

Re: Spotlight: Señor Casaroja's Noesis

Posted: Sun Feb 07, 2016 12:39 am
by Acewell
Thanks for replying, the idea of a GUI that mimics TextureFinder in Noesis sounds cool and convenient but i don't think it will ever happen because someone would have already done it by now. I am not a programmer and have no idea where to go here, i was hoping you could fix my example above so it works, i would settle for changing values in the script and reloading it each time just to keep things simple. :oops: