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

Spotlight: Señor Casaroja's Noesis

General game file tools that are useful for more than one game
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Spotlight: Señor Casaroja's Noesis

Post by MrAdults »

Yeah, there are some examples on the repo (which is apparently readonly now with the rest of Google Code), like the triangle picker:

https://code.google.com/p/noesis-plugin ... lize02.cpp

The picker also makes use of the "visualizer" interface to append rendering of selected triangles and some shitty font rendering that's only there to give some sample code for spline evaluation.

You can also create context-based tools (that show up on the right-click context menu for the file browser pane) which filter based on format capabilities (model import, image import, etc.) or extension or whatever you want to do there. There are some functions in the Noesis API that also allow you to instantiate a new RAPI instance with a loaded file (be it a model or whatever else), and get at/manipulate data within that instance, then export it out. So that's useful for tools that want to do some kind of generic geometric processing, manipulate materials, etc., then reexport the data.

It's also worth looking through some of the tool scripts on the repo, even though they're in Python, they'll all have an analog in native code land.
RoadTrain
advanced
Posts: 54
Joined: Wed Dec 12, 2007 5:57 pm
Location: Russia
Has thanked: 29 times
Been thanked: 4 times

Re: Spotlight: Señor Casaroja's Noesis

Post by RoadTrain »

Thanks, I've examined vizualizers before, they looked pretty straightforward. Now I've also looked at python tools. I believe most of them use userprompts for input.

What if I want user input on export that's hard to implement using parameters or userprompts? Let's say I want user to set up mesh hierarchy with a tree manipulation (a la data viewer tree).

Is it safe to create windows (or dialogs) over the Noesis main window handle to implement this kind of a feature? Or are there more elegant ways?

On a side note, how do I feed morphs to Noesis? Is the data supposed to be 1-to-1 vertex positions? I mean, in 4DS I have morphed vertices positions, followed by indices of corresponding mesh vertices. Should I just take mesh vertices, then replace some with corresponding morphed ones, and then feed the resulting data to rpgFeedMorphTargetPositions/rpgFeedMorphTargetNormals?
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Spotlight: Señor Casaroja's Noesis

Post by MrAdults »

Yeah, there's no problem putting your own dialogs over Noesis, that's what the unpleasantly platform-specific function NPAPI_GetMainWnd is there for. The Binary Find in Files plugin uses it too.

Yeah, the morph data has to be 1:1, and yeah, that's how you'd feed it in. Just fair warning - the vertex morph stuff isn't too well-tested, since only a small handful of importers have used it in any capacity. But hopefully it works. :)
RoadTrain
advanced
Posts: 54
Joined: Wed Dec 12, 2007 5:57 pm
Location: Russia
Has thanked: 29 times
Been thanked: 4 times

Re: Spotlight: Señor Casaroja's Noesis

Post by RoadTrain »

So I managed to get morphs working, but there's an issue.

How do I support multiple morph channels? Each channel corresponds to a different anim (e.g. brows raising and mouth opening are in separate channels), and contains several morph targets (frames?). I do suppose channels aren't compatible, because if I commit them all, Noesis crashes and closes instantly with c0000005 (AFAICT from logs). Might've missed something.

As I'm mostly counting on FBX export, I guess I badly need those channels. AFAICT from FBX SDK, they are supported.
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Spotlight: Señor Casaroja's Noesis

Post by MrAdults »

The morph support is very primitive, so the only way to accomplish what you're after is to submit a complete vertex buffer for every frame for every channel.

There's no reason that should be crashing Noesis, though, unless it's actually just enough data to blow out the 32-bit address space. You're sure the data you're submitting all matches the vertex buffer 1:1?
RoadTrain
advanced
Posts: 54
Joined: Wed Dec 12, 2007 5:57 pm
Location: Russia
Has thanked: 29 times
Been thanked: 4 times

Re: Spotlight: Señor Casaroja's Noesis

Post by RoadTrain »

I've experimented a bit and I believe I've isolated the issue.

My test model has 3 morphed objects: head and 2 hands.
Head has 3 channels (mouth, eyes, eyebrows), each having 5 targets (frames)
Each hand has only 1 channel with 3 frames.

So it works only if:
1) I commit only one channel with the head and hands. So the head has 5 frames and hands have 3 frames each, OR
2) I commit all 3 channels with the head and none with the hands. This way the head has 15 frames.

And it crashes if I commit all 15 frames with the head and 3 with each hand. I can see it starts animating and then crashes. The debugger says the Access Violation is caused by 0x536456d4.

Here's how I commit morphs with the first approach (effectively committing only the last channel)
https://github.com/RoadTrain/noesis-plu ... t.cpp#L313

And is it right that Noesis doesn't export morphs to FBX?
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Spotlight: Señor Casaroja's Noesis

Post by MrAdults »

I guess there could be something bad happening with multiple rpgCommitMorphFrameSet calls in turn with geometry commits. I don't remember how I set that up, but it seems pretty questionable in terms of how committed morph sets associate with committed geometry.

Yeah, FBX morph target support has been on the todo list for a while. Like I said, the morph target support is pretty crappy, so I've been putting off the FBX support because I know I'm going to have to implement a whole herd of new functionality for morph targets internally (probably including a morph+skeletal+etc. animation state machine to make the preview not-useless) while I'm at it. So, unfortunately, this probably won't get done until I need it to integrate morph targets into the content pipeline for something I'm actually working on.
RoadTrain
advanced
Posts: 54
Joined: Wed Dec 12, 2007 5:57 pm
Location: Russia
Has thanked: 29 times
Been thanked: 4 times

Re: Spotlight: Señor Casaroja's Noesis

Post by RoadTrain »

Unfortunately, Noesis isn't open-source, and no one can make a pull request :keke:

Seems like I'll have to make a standalone 4ds<->fbx converter in order to fully support animations :[
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Spotlight: Señor Casaroja's Noesis

Post by MrAdults »

If exporting morphs to FBX is important to you, yeah. Normally I'd be more responsive to the needs of someone who's trying to actually make something for Noesis, but I've got too much other-project stuff going on at the moment. So, good luck.
RoadTrain
advanced
Posts: 54
Joined: Wed Dec 12, 2007 5:57 pm
Location: Russia
Has thanked: 29 times
Been thanked: 4 times

Re: Spotlight: Señor Casaroja's Noesis

Post by RoadTrain »

No worries, that's ok. I'll finish the import plugin anyway, just not the export.
People on one of Mafia forums are already happy to have it for Noesis. :wink:
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Spotlight: Señor Casaroja's Noesis

Post by MrAdults »

On an unrelated note, here's the Noesis DICOM loader source:

http://www.richwhitehouse.com/snippets/ ... _dicom.cpp

This was written from thousands of pages of terrible DICOM specs, and some of the particulars for certain transport syntaxes are poorly or not at all documented. It has handled all of the DICOM data I've come across without necessary modification for quite a few months now, so I'm releasing the source. I don't guarantee that my interpretations follow the intent of the specs, but I do guarantee that they're accurate for all of the test data I've come across in the wild thus far.

My condolences to anyone else who ever has to look at the DICOM spec docs.
RoadTrain
advanced
Posts: 54
Joined: Wed Dec 12, 2007 5:57 pm
Location: Russia
Has thanked: 29 times
Been thanked: 4 times

Re: Spotlight: Señor Casaroja's Noesis

Post by RoadTrain »

Hello. How do I bind bone/weight buffers? More precisely, what data should they consist of?
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Spotlight: Señor Casaroja's Noesis

Post by MrAdults »

The same way you bind other buffers, where both should be contiguous bone indices or, respectively, weights. Any of the standard data types is supported, and there is an extra argument in the bind call to specify the number of weights per vert.

If your blend indices are relative or mapped, not absolute indices into a skeleton, rpgSetBoneMap is also available.

There are some uses for both of these things in the existing plugins/scripts. From memory, I know Gamebryo and Bullet Witch scripts are both using them.
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Spotlight: Señor Casaroja's Noesis

Post by MrAdults »

I'm browsing through the Noesis crash database, which I haven't looked at in quite a while. Every single day, for the last 3 months, EVERY SINGLE DAY, someone (often a new person, not just the same one over and over again) has reported a crash from a version of Noesis that is 6+ months old. Usually this is a crash that was fixed months ago. I know that no one actually reads this thread and that a lot of idiots are making their own Noesis distributions (I love the crash reports coming in from NoEsiS, great job asshole), so this probably falls on deaf ears, but if you have someone you love or know someone who uses Noesis, tell them to use the auto-update feature (under the Tools menu), cause it's really stupid and silly for people to be using these ancient versions and suffering crashes that have been fixed forever.

I'm probably going to finally just have the server start automatically filtering out crash reports from older versions, because if you can't be bothered to update then you deserve all the crashes in the world. But either way, there's no reason to not stay up to date. Use Tools->Check for update in the menu. It's an extremely fast and clean process that doesn't deal with any kind of bullshit or fuck with your registry or require manually restarting or anything along those lines, and it ensures your Python cache is flushed which won't happen if you're just unzipping new builds over it. Use it. It's good.
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 884 times

Re: Spotlight: Señor Casaroja's Noesis

Post by Acewell »

The swtfu_gto.dll plugin (20.5 kb) by revelation on this page is the old one
https://code.google.com/p/noesis-plugin ... revelation

i have attached the newest one (52 kb) in my post here
viewtopic.php?p=101966#p101966
revelation wrote:Fixes a bug with gto models and adds support for the .animations files
it used to be stored here
http://web.archive.org/web/201205262315 ... nt=plugins
Post Reply