Page 41 of 123

Re: Señor Casaroja's Noesis

Posted: Tue Dec 20, 2011 8:59 am
by Satoh
Are you using '.decode("UTF8")' or a similar command?

Are you certain they are Unicode names? I made that mistake when I was trying to parse the text I just mentioned having issues with... It kept giving me errors like "Unknown continuation byte '0xCE' " That's when I made a quick HTML page with those bytes in it and played with the encoding in firefox until I got it right. Turns out it was shift_JIS, not Unicode.

If you're getting errors like that when parsing, try using another encoding. If it's only when you print... like mine was nearer the end... just don't print it until MrAdults gets us word on it. My thoughts/suggestions.

Re: Señor Casaroja's Noesis

Posted: Tue Dec 20, 2011 7:25 pm
by prototypesky
Was trying the view the persona 3 portable gmo models and noticed that some of the bones were not rotated properly is there a way to correct this using the data viewer?

Re: Señor Casaroja's Noesis

Posted: Tue Dec 20, 2011 7:48 pm
by finale00
Satoh wrote:Are you using '.decode("UTF8")' or a similar command?

Are you certain they are Unicode names? I made that mistake when I was trying to parse the text I just mentioned having issues with... It kept giving me errors like "Unknown continuation byte '0xCE' " That's when I made a quick HTML page with those bytes in it and played with the encoding in firefox until I got it right. Turns out it was shift_JIS, not Unicode.

If you're getting errors like that when parsing, try using another encoding. If it's only when you print... like mine was nearer the end... just don't print it until MrAdults gets us word on it. My thoughts/suggestions.
Oh, that's an easier way to check encoding lol
I just checked and it's not unicode but shift-JIS so I parsed my file in shift-JIS and it took the name and it even printed it out.

I use noeStrFromBytes(data, encoding)

Re: Señor Casaroja's Noesis

Posted: Tue Dec 20, 2011 10:40 pm
by MrAdults
Yeah, Noesis won't support wide-character strings for console output, mesh names, or material names. It will support them on paths. This could conceivably be changed, but that latter 2 changes would require new interface functions to avoid breaking old native plugins that feed strings in as multibyte, so I don't expect it will ever happen unless you feel very passionately about preserving widechar names in your materials for some reason. (I've also never personally worked on any games that use unicode mesh/material names, but then I don't tend to go supporting Chinese MMO's or whatever) Maybe there's a Python romanization library you could use. :)

prototypesky: Send a sample, please.

Re: Señor Casaroja's Noesis

Posted: Tue Dec 20, 2011 11:31 pm
by finale00
I was wondering if it would be possible to select multiple models in noesis and then load all of them into the same scene? That way the user won't be limited to whatever file loading a plugin might be doing.

All of the plugins I've seen involved appending a NoeModel to some mdlList that was provided for us so it probably won't affect how we write our stuff.

Re: Señor Casaroja's Noesis

Posted: Wed Dec 21, 2011 12:08 am
by Rimbros
finale00 wrote:I was wondering if it would be possible to select multiple models in noesis and then load all of them into the same scene? That way the user won't be limited to whatever file loading a plugin might be doing.

All of the plugins I've seen involved appending a NoeModel to some mdlList that was provided for us so it probably won't affect how we write our stuff.
do this i think need changue the base position randomly from X=0 Y=0 Z=0, to multiple values by each item, interesting see this but wath its the utility of this way?. only if you want see the models in diferent places in the same scene, but if you only want load 30 items and all go to the default axis position in the center of the screen, then you cant see wath models you are loading if you put more than 2 or 3 models.

Re: Señor Casaroja's Noesis

Posted: Wed Dec 21, 2011 1:10 am
by Satoh
Rimbros wrote:
finale00 wrote:I was wondering if it would be possible to select multiple models in noesis and then load all of them into the same scene? That way the user won't be limited to whatever file loading a plugin might be doing.

All of the plugins I've seen involved appending a NoeModel to some mdlList that was provided for us so it probably won't affect how we write our stuff.
do this i think need changue the base position randomly from X=0 Y=0 Z=0, to multiple values by each item, interesting see this but wath its the utility of this way?. only if you want see the models in diferent places in the same scene, but if you only want load 30 items and all go to the default axis position in the center of the screen, then you cant see wath models you are loading if you put more than 2 or 3 models.
Noesis can load multiple models from a single file already, there's a way to toggle through them built into it. My current plugin I'm working on uses this function due to the numerous models that are stored in the files I'm decoding.

While I think opening multiple files is an interesting concept, and -possibly- useful... Wouldn't it be possible to make a plugin to keep models in memory somehow when loading another file?

Re: Señor Casaroja's Noesis

Posted: Wed Dec 21, 2011 1:21 am
by prototypesky
Here is a sample in both of these case where some of the right side bones have the wrong rotation.
Also for some reason it fails to parse the tm2 textures even though I am able to rip and view them outside of neosis.

Thanks

Re: Señor Casaroja's Noesis

Posted: Wed Dec 21, 2011 1:40 am
by finale00
Ugh, noesis keeps crashing on me with some application error lol

"Faulting application noesis.exe, version 1.0.0.1, faulting module ialmgdev.dll, version 6.14.10.3943, fault address 0x00021114."

Not sure why this happens though.
Rimbros wrote: do this i think need changue the base position randomly from X=0 Y=0 Z=0, to multiple values by each item, interesting see this but wath its the utility of this way?. only if you want see the models in diferent places in the same scene, but if you only want load 30 items and all go to the default axis position in the center of the screen, then you cant see wath models you are loading if you put more than 2 or 3 models.
It's mainly for models split up into separate pieces, but I haven't figured out exactly which pieces I actually need (cause all of the models are stored in one folder and so there are hundreds of pieces lol)
Noesis can load multiple models from a single file already, there's a way to toggle through them built into it. My current plugin I'm working on uses this function due to the numerous models that are stored in the files I'm decoding.
Do you just append a bunch of (separate) NoeMesh objects to the same list and then push the left or right key?

Re: Señor Casaroja's Noesis

Posted: Wed Dec 21, 2011 1:47 am
by Satoh
prototypesky wrote:Was trying the view the persona 3 portable gmo models and noticed that some of the bones were not rotated properly is there a way to correct this using the data viewer?
I missed this post before, but yes you can rotate bones in the Data Viewer.
Look under Model> Bones> [bone name]> Transform Offset> Angle> change the values
you must also set Model> Bones> [bone name]> Transform Offset> Enabled = 1
Then you will see your changes to the rotation of the bone, hope it helps.

I still can't figure out TM2 structure so I got nothing on that.
Noesis can load multiple models from a single file already, there's a way to toggle through them built into it. My current plugin I'm working on uses this function due to the numerous models that are stored in the files I'm decoding.
Do you just append a bunch of (separate) NoeMesh objects to the same list and then push the left or right key?
A new button appears when multiple models are loaded at once. It looks like 3 little gray dudes standing next to eachother. Each model has its own list of meshes.

To load multiple models currently, they all have to be a part of the same file, and the import plugin has to know to look for more than one model in the file. I made my plugin do a generic search for headers and -try- to parse each one as a model... but the files I'm working with are... stupidly weird.

Re: Señor Casaroja's Noesis

Posted: Wed Dec 21, 2011 1:56 am
by finale00
they all have to be a part of the same file
MrAdults said chrrox loaded a bunch of models from a folder, so I think as long as you are able to create a bitstream you should be fine.

So if it is a matter of just appending them all to the list before returning from the LoadModel function then all I have to do is modify my LoadModel function to say

Code: Select all


def noepyLoadModel(data, mdlList):
    '''Load the model'''

    #myList = [a list of files]
    #for each file, open it and run through the loading code, then append to list.
    ctx = rapi.rpgCreateContext()
    parser = ZuOnline_LTB(data)
    parser.parse_file()
    mdl = rapi.rpgConstructModel()
    mdl.setModelMaterials(NoeModelMaterials(parser.texList, parser.matList))
    mdlList.append(mdl)
    return 1
Then again I haven't had much luck trying to open a file lol

I see examples like

Code: Select all

with open(fileName, "rb") as f:
Which is standard file opening...but I always get file doesn't exist error.

Re: Señor Casaroja's Noesis

Posted: Wed Dec 21, 2011 2:25 am
by pro spy
is it possible to export .xml and .tr files by using Noesis !?

Re: Señor Casaroja's Noesis

Posted: Wed Dec 21, 2011 2:41 am
by Satoh
pro spy wrote:is it possible to export .xml and .tr files by using Noesis !?
If you have a plugin for it, yes. I'm not certain there is one yet though.

Re: Señor Casaroja's Noesis

Posted: Wed Dec 21, 2011 3:50 am
by MrAdults
If you wanted, you could also prompt for subsequent files and keep prompting until the user hits "cancel" using that load paired file function. (you need to use the one that doesn't raise an exception on cancel, though, or just use your own try except) You would have to do your own transforms for each model if you don't want them centered at 0, though this could again just be done by setting the rpg transform matrix. Oh, and I forgot to address before, no, that's the right syntax for making a NoeMat43. Although you could probably break it up into multiple lines and put some spacing in your bracketing or something to make it more readable.

A crash in ialmgdev.dll is rather unusual, as that is specific to Intel graphics hardware. At worst, a crash actually caused by Noesis doing something naughty should probably be in the actual opengl32.dll implementation. So I can't really diagnose it without a full stack trace, and I'm guessing you wouldn't get a nice automated trace even in a debugger because you're off in Intel module land. Only thing I can try diagnosing remotely is circumstance, so... does it happen randomly during running, or on startup, or on shutdown, or on loading a new model, or what?

Edit: Oh, and like chrrox mentioned, you should look at the Bullet Witch for file open examples. The path is relative to the Noesis working directory which is not necessarily the directory of the file(s) being opened, so you should make your path relative to the actual active input file name.

Re: Señor Casaroja's Noesis

Posted: Wed Dec 21, 2011 4:41 am
by finale00
It happens randomly during the following:

1: when I open a model, sometimes.
2: when I open a model successfully, and then want to open another model (might be the same issue as #1)

I also see this error sometimes
Faulting application noesis.exe, version 1.0.0.1, faulting module noe1592.tmp, version 0.0.0.0, fault address 0x001ba82e.
Is it possible for me to read from the bitstream such that I will crash stuff?
Many times I notice that I am running into memory error or other errors before it crashes.

For bulletwitch I searched for "open" but couldn't find it, so not really sure where it's done (line number?)

Also, can I get the absolute path of the input file? It's probably stored somewhere.