Page 56 of 123

Re: Señor Casaroja's Noesis

Posted: Sun Mar 11, 2012 5:02 am
by MrAdults

Code: Select all

	RPGEO_QUAD, //ABC_DCB
	RPGEO_QUAD_ABC_BCD,
	RPGEO_QUAD_ABC_ACD,
	RPGEO_QUAD_ABC_DCA,
Those are your options. One of them should do the trick.

Text parsing in Python, I haven't tackled it myself, so I dunno what to tell you. But I mean, it's Python, and it's meant for simple utility tasks like...text parsing. So I imagine there are some pretty effective ways to deal with it. I know there's a regular expression parser as well which might be useful. It depends on what kind of parsing you want to do I suppose, and how/if you want to tokenize it.

Re: Señor Casaroja's Noesis

Posted: Sun Mar 11, 2012 5:53 pm
by finale00
I would like to tap into python's text-parsing functionality, but I'm given a byte stream lol

I think at one point I tried opening the file externally again...hmm not sure whether I got anywhere then.

Re: Señor Casaroja's Noesis

Posted: Sun Mar 11, 2012 5:56 pm
by chrrox
you can open the files natively in python then convert that to a byte stream when you want to throw noesis some things. I do this in the phantasy star online script when i open the bone file with the same name.
its also done in bullet witch.

Re: Señor Casaroja's Noesis

Posted: Sun Mar 11, 2012 8:18 pm
by MrAdults
Not like the bitstream is dictating that you parse your data in any given manner. Like I said, just readBytes whatever you want out of the bitstream, then it's yours to parse in whatever way you please. (using whatever text encoding you choose)

Re: Señor Casaroja's Noesis

Posted: Sun Mar 11, 2012 10:00 pm
by finale00
When I say

Code: Select all

material = NoeMaterial(matName, texPath)
where texPath is the path to a valid texture.
Noesis loads the model fully textured as expected.

However when I export the model, the textures aren't exported.
Which is normal as well I guess since there aren't any texture objects stored.

Would it be possible to add an option to export them as well?

Re: Señor Casaroja's Noesis

Posted: Tue Mar 13, 2012 12:52 am
by MrAdults
Not sure why you would want to export textures with a model that are already external and in a recognized format. But when I implement Noesis_LoadTexturesForModel in Python it will effectively give you that. That function goes through a model's texture list and reuses any textures it can there, then it externally loads any textures it's still missing, and it hands the whole bundle back to you as a NoeTexture list. If you want from there you can attach it to the model as you're importing and Noesis will re-export all of those textures because they're now loaded onto a model.

Re: Señor Casaroja's Noesis

Posted: Tue Mar 13, 2012 3:50 am
by finale00
Not sure why you would want to export textures with a model that are already external and in a recognized format.
Having to convert proprietary images separately is time-consuming for the user. We can write an arbitrary number of texture plugins and then say that most of them are recognized. But they'd still be pretty useless for the artist.

Even if it's recognized, I'd rather the option of having noesis do all the work for me even if it costs a lot for the program.

So like if I had a folder with 10000 textures and another folder with 10000 models all thrown in there, if noesis can find the specific texture that's lost in there somewhere, then I want to export it.

Re: Señor Casaroja's Noesis

Posted: Tue Mar 13, 2012 4:25 am
by MrAdults
It shouldn't be time-consuming, as they can batch process the whole lot into whatever non-proprietary format(s) they'd like.

But I can see what you're saying and how it could be convenient (particularly with map models that draw from a gigantic texture set), it's going to have to go pretty far down on the prospective-feature list though. Too much stuff I've been neglecting forever on that list already. In the mean time, if you really want the functionality, I do intend to include that texture load function sometime in the next release or 2 (it should be quick to implement, even though the implications of such functionality in Python are terrifying from a memory standpoint), so you'll at least have the option of doing it manually.

Re: Señor Casaroja's Noesis

Posted: Tue Mar 13, 2012 4:55 am
by finale00
(it should be quick to implement, even though the implications of such functionality in Python are terrifying from a memory standpoint)
Is there a way to make it so that although python makes the function call, the program actually passes the job off to someone else that can probably do it more efficiently?

Re: Señor Casaroja's Noesis

Posted: Tue Mar 13, 2012 5:10 am
by MrAdults
Yeah, that's already happening for all of the API calls. The memory issue is in actually making the data available through Python bytearrays/bytes.

Re: Señor Casaroja's Noesis

Posted: Tue Mar 13, 2012 11:35 pm
by finale00
Since it is meant for "gathering" purposes, how about storing like file handlers or something?
Or at least, storing a valid path to the images that were found. Then I can just grab whatever noesis successfully found and do stuff with it, rather than doing error-checks on my end.

Re: Señor Casaroja's Noesis

Posted: Wed Mar 14, 2012 12:12 am
by MrAdults
That would extremely awkward because the texture data Noesis is handing you at that point isn't necessarily even on-disk, and if you had a handle to the file on disk you wouldn't have interpreted pixel data. You'd have a handle to a file that could be in any format, so you'd just have to ask Noesis to interpret for you in memory anyway (which is a waste if the texture is already interpreted in native memory), and it still wouldn't save you anything unless you flushed the texture out immediately and forced a Python garbage collection between handling textures, which still assumes you don't need textures in memory concurrently which you well may depending on the needs of the format you're dealing with. Best case I could give you handles that you can query and copy into Python-accessible memory on a per-handle basis, but that's a total hack and is way harder to work with than just using a damn native plugin to deal with texture data.

Really, you should just use native plugins for dealing with large data sets. There isn't going to be a happy solution for this problem in Python because of the nature of Python. (managed memory in a managed framework)

Edit: Although, that latter solution is probably what you're going to get, because it also solves the problem of performing processing on texture lists (like auto-combing them into a single texture page) on the Noesis side without having to copy all of that data back out. I'll make a new NoeTexRef object and you'll have to query its texture reference index in association with a model to get a NoeTexture from it. I could also give you a hook to send modified texture data back to Noesis, but I don't see an immediate need for that. You shouldn't generally need to modify raw pixel data and send it back to Noesis. If anything you should only need to modify it Python-side before you export it directly to a custom model binary or whatever.

Re: Señor Casaroja's Noesis

Posted: Thu Mar 15, 2012 7:50 am
by MrAdults
3.84 is a big steamy one.

Code: Select all

 -3.84 - Added Decomp_XMemLZX (native API) and decompXMemLZX (Python API) for decompressing XMemCompress (or other MS LZX) streams.
 -3.84 - Added import support for Grandia 2 models. Thanks to Mat for his work in figuring out the compression used in this game.
 -3.84 - Added import support for Love Hina: Smile Again models.
 -3.84 - Added import/export support for GIF images. For animated images, additional frames can be viewed under "Textures" in the data viewer. When exporting to the GIF format, a batch writer is used which grabs all textures/images being exported and writes them to a single animated GIF file.
 -3.84 - Added a maximum length for the export log buffer, can be changed under System in the data viewer.
 -3.84 - Enabled support for extracting MVC3 360 .arc files.
 -3.84 - Improved color precision and contrast of the median cut algorithm.
 -3.84 - Added NPAPI_SetTypeHandler_WriteRGBABatch for image formats that want to export from all texture sources in a given export process.
 -3.84 - Added Image_GetTexRGBA to get raw RGBA32 data from a Noesis texture regardless of its internal format.
 -3.84 - Fixed a crash where Noesis could mistake unrelated data for being a Quake BSP file.
 -3.84 - Fixed a potential crash in validation of .ico files.
 -3.84 - Fixed a bug where outputting to a batched image format (like .spr) was not working in conjunction with model export.
 -3.84 - Fixed a potential conflict when exporting to a format with the same file extension as another different format.

Re: Señor Casaroja's Noesis

Posted: Thu Mar 15, 2012 5:42 pm
by Rimbros
I tested the kinect interface with Noesis and all looks fine, i have now a question its posible whe can do something like this with Noesis and Kinect.

Video Sample
http://www.youtube.com/watch?v=fBR4cT-0sKY&feature=fvwp

Re: Señor Casaroja's Noesis

Posted: Thu Mar 15, 2012 7:19 pm
by finale00
Added import/export support for GIF images. For animated images, additional frames can be viewed under "Textures" in the data viewer. When exporting to the GIF format, a batch writer is used which grabs all textures/images being exported and writes them to a single animated GIF file.
Not specific to GIF, but would like a way to be able to just scroll through textures quickly :)
Kind of like scrolling through models, but for textures.

Oh and how about a thumbnail panel? lol