Page 34 of 123

Re: Señor Casaroja's Noesis

Posted: Sat Nov 12, 2011 8:21 am
by deltaone
MrAdults wrote:Not sure what you mean by "send" the vertex buffer. You bind the buffer before using CommitTriangles, that's the standard usage. If you mean you want to automatically draw triangles in implied order from a vertex buffer, calling CommitTriangles with a NULL buffer is valid and will do that.
CommitTriangles i found in only one plugin source ;) i think standard usage is

Code: Select all

....
rapi->rpgBegin(RPGEO_TRIANGLE);
....
			if (sm.bVertexWeights)
			{
				rapi->rpgVertBoneIndexUI(&sm.VertexData[sm.IndexData[vi]].BoneIndex[0], sm.VertexData[sm.IndexData[vi]].BoneIndex.Num());
				rapi->rpgVertBoneWeightF(&sm.VertexData[sm.IndexData[vi]].BoneWeight[0], sm.VertexData[sm.IndexData[vi]].BoneWeight.Num());
			}
			if (sm.bVertexNormals) rapi->rpgVertNormal3f((float*) &sm.VertexData[sm.IndexData[vi]].NX);
			if (sm.bVertexTangents) rapi->rpgVertTan4f((float*) &sm.VertexData[sm.IndexData[vi]].TX);
			if (sm.bVertexUV) rapi->rpgVertUV2f((float*) &sm.VertexData[sm.IndexData[vi]].U, 0);
			if (sm.bVertexPositions) rapi->rpgVertex3f((float*) &sm.VertexData[sm.IndexData[vi]].PX);
;)
MrAdults wrote: I'm not sure why your bone data would be crashing there, the printout looks valid and so do the addresses. Can you upload a sample file for me to crash it with?
Edit: I just realized what your problem is. You're using the default struct packing (4 bytes) but internally Noesis uses 1-byte alignment for the shared structures like modelBone_t. I'll add a pragma pack push/pop around pluginshare.h to enforce it, but you can also fix it by putting a push to 1 byte alignment before you include it.
Yes, you right, crash gone, thx ...

P.S. Version of Ogre3d noesys plugin with weights and bones support http://rghost.net/29614351
P.P.S.

Code: Select all

typedef struct modelBone_s
{
	int					index;
	char				name[32];
	modelMatrix_t		mat;
	char				parentName[32];
	modelBoneExData_t	eData;
} modelBone_t;
If possible, please set name buffers from 32 to 64 byte ...
dump

Code: Select all

11:17:19: N: lvl1_gimmick_spiketrap_bone_spikes01
11:17:19: N: lvl1_gimmick_spiketrap_bone_spi
11:17:19: N: lvl1_gimmick_spiketrap_bone_spikes02
11:17:19: N: lvl1_gimmick_spiketrap_bone_spi

Re: Señor Casaroja's Noesis

Posted: Sat Nov 12, 2011 11:02 am
by MrAdults
deltaone wrote:CommitTriangles i found in only one plugin source ;)
CommitTriangles is used in the Quake IQM, Bayonetta, and Saint Seiya the Hades plugin sources. So 3 out of the 6 model importing plugins in pluginsource.zip. :) Let me know if you have any questions about its usage. IQM is probably the best example because it handles many possible different vertex formats.
deltaone wrote:P.S. Version of Ogre3d noesys plugin with weights and bones support http://rghost.net/29614351
Well done. :)
deltaone wrote:If possible, please set name buffers from 32 to 64 byte ...
The only reason I haven't done this is that it would break compatibility with old plugins if I just pushed it up directly. I'll probably go ahead and provide a transparent layer that converts between old and new bone stuctures based on the plugin's API version, so that I can finally address that without having to have revelation recompile all his old stuff.

Re: Señor Casaroja's Noesis

Posted: Sat Nov 12, 2011 5:25 pm
by deltaone
MrAdults wrote:
deltaone wrote:CommitTriangles i found in only one plugin source ;)
CommitTriangles is used in the Quake IQM, Bayonetta, and Saint Seiya the Hades plugin sources. So 3 out of the 6 model importing plugins in pluginsource.zip. :) Let me know if you have any questions about its usage. IQM is probably the best example because it handles many possible different vertex formats.
Heh, you are right ;) Sleepless nights ;) Skyrim ;)
MrAdults wrote:
deltaone wrote:If possible, please set name buffers from 32 to 64 byte ...
The only reason I haven't done this is that it would break compatibility with old plugins if I just pushed it up directly. I'll probably go ahead and provide a transparent layer that converts between old and new bone stuctures based on the plugin's API version, so that I can finally address that without having to have revelation recompile all his old stuff.
May be make new type and new function and mark old as deprecated ?

Re: Señor Casaroja's Noesis

Posted: Sat Nov 12, 2011 9:39 pm
by MrAdults
deltaone wrote:May be make new type and new function and mark old as deprecated ?
It's just a bit more complicated than that, since those modelBone_t's are used all over the place and can be passed in as part of some other data structures. (namely animations and shared models) In total I count 9 in/out points for them alone, and then potentially a lot more based on passing of the anims and shared model structures, so all of those points need to be modified to convert back and forth based on the API version of the plugin, or there would be a whole lot of deprecation going on. (functionally, I still have to handle conversion at all those points behind the scenes for the old plugins anyway) I also like to avoid deprecation entirely when I can, since this is one of those situations where I expect older plugins to never actually get recompiled ever, so I'd end up with lots of deprecated functions that I can never actually remove.

It's totally doable, just more work than I'd like. But that's how it is when you want to maintain compatibility throughout the entire life of an API. :)

Re: Señor Casaroja's Noesis

Posted: Sun Nov 13, 2011 4:20 am
by MrAdults
k, Noesis 3.7 is up which increases the bone name lengths. I would've made them pointers, but there's so much ancient legacy code internally that assumes the buffers are preallocated, it's not worth the trouble. I also took the opportunity to do some internal cleanup and housekeeping across the board and ended up touching somewhere in the area of 25 or so modules. And when you change that many things you usually end up breaking everything, so as the readme says,
I'm interested in crash reports, so send them in, and try to make them useful. (e.g. provide sample files, and ideally provide process module base addresses with instruction pointer offsets for each thread)

Re: Señor Casaroja's Noesis

Posted: Sun Nov 13, 2011 7:49 pm
by Krisan Thyme
The contents of this post was deleted because of possible forum rules violation.

Re: Señor Casaroja's Noesis

Posted: Mon Nov 14, 2011 3:21 am
by chrrox
i tried both versions in the max script i made and they loaded fine i don't think they changed the format. Bones and meshes loaded.

Re: Señor Casaroja's Noesis

Posted: Mon Nov 14, 2011 4:25 am
by Krisan Thyme
Max script works, eh? Is that available somewhere here on the forums? And if not, can you put it up for download?
Oddly enough either way though, they're not loading in Noesis.. By altering the headers slightly I can get bones to load just dandy, but the mesh just.. doesn't. I'm not sure why..

Re: Señor Casaroja's Noesis

Posted: Mon Nov 14, 2011 6:05 am
by MrAdults
They changed the file version as well as the vertex formats. chrrox's script works because it doesn't care about weighting but Noesis does.

Go grab Noesis 3.71. It still has issues with the new weighting though.

Re: Señor Casaroja's Noesis

Posted: Mon Nov 14, 2011 10:10 am
by Krisan Thyme
Yeah that works great. Tested it on several of the brand new models, and they display fine. The weights are kinda screwy though, as you mentioned, but eh.. It's just nice right now to be able to look at the models themselves.

Re: Señor Casaroja's Noesis

Posted: Mon Nov 14, 2011 7:47 pm
by Krisan Thyme
The contents of this post was deleted because of possible forum rules violation.

Re: Señor Casaroja's Noesis

Posted: Mon Nov 14, 2011 11:45 pm
by Darko
The contents of this post was deleted because of possible forum rules violation.

Re: Señor Casaroja's Noesis

Posted: Tue Nov 15, 2011 12:02 am
by Krisan Thyme
Darko wrote:Yep, most of 360 specular maps are swizzled.
It's not just specular maps, unfortunately. And yeah I kind of figured this was a case of swizzling.
I've no idea what can be done about that though, if anything?

Re: Señor Casaroja's Noesis

Posted: Tue Nov 15, 2011 12:05 am
by chrrox
most 360 textures are swizzled to speed up loading noesis un swizzles them.

Re: Señor Casaroja's Noesis

Posted: Tue Nov 15, 2011 2:32 am
by Darko
chrrox wrote:most 360 textures are swizzled to speed up loading noesis un swizzles them.
Are you sure all of them?? Why I'm getting this??

Image

Uploaded with ImageShack.us