Synide 0 Posted December 9, 2007 Hi, I'm not a max or maya user so bare with me please. what does max require in the way of information imported either with an .obj file or seperately to have 'weighting' applied to the mesh. and, what can max output in the way of 'weight mapping'? and, the same questions for maya... background... if i'm going to be importing some new, say character models into O2 i need the 'skeleton' selection names to remain intact and i'd like some method of bringing in 'weighting'. currently, the mesh component names get a bit munted while importing into O2 and there's sometimes loss of some poly's along the way (yes, i realize it's RC)... so i'm making a little tool to make a p3dm out of an obj file... this should solve the 'selection/component' naming issue and the poly's too... the previous RC had a 'import maya weight map' - did this even work? if so, how does one go about creating a maya weight map? All, i need to know is what the maya output is and looks like - or a pointer to some reading on the matter. In a p3dm model, each vertex in a selection has a 'weighting' from 0 to 1.0. this is what i need to find from the maya or max end... then i can either include this when processing an obj into a p3dm (preferably) or integrate this 'weighting' value afterwards... one can have a 'w' value per vert. in an .obj file, but i haven't worked out if one can have a 'w' value per vert, per component in the file format. does anyone know if you can or cannot? i get lost in the docs. abit when it starts getting into all the info. on creating curves of various sorts... the result, would of course not be ideal, but the objective is to have a at least the names intact, poly's intact and weighting. if BIS do a 'release' version of O2 that covers everything off then cool banana's, i just don't want to wait around... btw, is a p3dm-> obj tool of much interest, 'cause i've finished that one but i'm not sure many of you would find it useful? alternatively, would any of you like to suggest what you think might be needed in the way of little tools to help ease the inwards/outwards flow of of model material into O2? also, along with all of this i'd like to look at how much a model can differ in size and proportions before the BIS rtm's become unuseable with any new content and on top of that i'd like to look at easing the process by which one can import new anims and the guidelines the 'community' should adhere to for compatibility between content creators. cheers, Sy. Share this post Link to post Share on other sites
nephilim 0 Posted December 9, 2007 there is currently no way to save and preserve a models skinning wheigt :/ you have to redo this in oxygen as obj/3ds doesnt store this. personally i dont have anyproblems with importing models in and out. only thing id like to get changed in oxygen would be the sh!tty fact that you have to redo all the texture paths. tedious wast of time .. also preserving the selection sets would be awesome just as the wheighting...... (BIS!! anyway youre talking to wall´s mate.. we at the Lost World mod shifted just because BIS doesnt release essential modding tools, cause honestly Oxygen isnt good for anything else then just saveing and setting up your model for arma.. any other games SDK gives you far more possibilities than the "junk" BIS provides.. (sorry but it is how it is.) Share this post Link to post Share on other sites
surpher 1 Posted December 9, 2007 btw, is a p3dm-> obj tool of much interest, 'cause i've finished that one but i'm not sure many of you would find it useful? I'd be interested in such a tool. Share this post Link to post Share on other sites
Synide 0 Posted December 9, 2007 there is currently no way to save and preserve a models skinning wheigt :/you have to redo this in oxygen as obj/3ds doesnt store this. personally i dont have anyproblems with importing models in and out. only thing id like to get changed in oxygen would be the sh!tty fact that you have to redo all the texture paths. tedious wast of time .. also preserving the selection sets would be awesome just as the wheighting...... (BIS!! true, that's why i'm making ways to make it happen... if any of you are inclined, here is a linky to a document on the obj file format. Perhaps some of you might might like to read it and comment on whether you think Max/Maya/Modo whatever is capable of specifying weighting on a per group, per vert. basis using this file format. What i'm looking for also, is an example character model in Max and an example character model in Maya with well defined and appropriate 'weight mapping' and some direction on how to output this 'weight mapping' info. from these products. Then, I can make an interface between that and the P3DM format. i've read through it a few times, i don't know if it's a good document on the format or not. if anyone has better info. please post me a link... as you'll note one can specify a vert position as... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">v x y z w w being the 'weight' of a vert from 0 to 1.0. also, one can specify a 'weight' on the UV as well... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">vt u v w currently, when writting out an OBJ file from p3dm, this is what i'm doing... version 1. of the OBJ... for a given LOD writes out all the verts, then for each face it works out which (if any) 'groups/selections' the face belongs too, and works out which 'section' a face belongs too. A section is defined by it's 'texture/material' combination. So, then it writes out a 'usemtl' parameter (to denote the section) and finds all the faces that use this combination. then it sorts then into the 'groups/selections' it belongs too.   - the result is that you are left with an .OBJ file that specifies only the verts. that are present in the model and the same number of poly's that are in the model nicely aportioned to 1 or more 'groups/selections'. This .OBJ format is good for working with in other modelling tools. Currently, the associated .mtl file just basically points to each 'main texture' - one can modify the .mtl to point to 'textures' that are useable by other programs by simply editing the pathnames in this one place. Ok, that's the first version of the .OBJ that's written out. This, file seems to import into Max ok, and still retain the 'group/selection/object' selections intact. But, i'm not 100% sure on this. Problem is, when importing this .OBJ into say Maya - it doesn't like having a face belonging to more than 1 'group'. So, the tool writes out a 2nd .OBJ file. The result is, that although you get 'more' faces defined in the .OBJ, so faces can be repeated, because it list them out by each group indiviually. At this point, what i need to know, is how Max/Maya need 'weighting' (oh, and sharp/smooth edges) defined. Once I know this, then I can decide on ways to provide that infomation. The problem with the 'weighting' value in the OBJ format is you can only specify 1 weight for a vertex. But, in O2 the vertex can belong to multiple 'selection groups' and in each group can have a different weight values. One way would be to write out the a 3rd type of OBJ file a...   - a list of the verts...   - 1 or more sets of weights utilizing repeating sets of UV coordinates accompanied by the verts. weight from O2 for each selection the vert belongs too   - then write out repeating lists of faces for each 'weight set' This OBJ file i'd imagine would need further processing to be sucked into Max/Maya in a way in which they can understand. An, alternative method to this would possibly be the tool producing a 'grayscale' image per O2 selection. This would denote the 'weight' applied to each vert in the LOD for that selection only. Problem with this is there are 90 odd selections in a character model, so there would be 90 odd 'weight map textures'... pondering this one... @Neph... regarding importing an OBJ file... I'm also making the companion to this tool... OBJ->P3DM. When reading in an OBJ file I can read it's associated .MTL file and allocate the 'map_Kd' (diffuse texture) specified to each appropriate face in the P3DM. Would this suffice? First off I won't be processing the other .mtl values through into an rvmat, but maybe down the line... I know i ramble alot, but to summarize, the odolv40 experiement was based around a desire to see how and what needed to be defined for a model to work 'well' in ArmA. the side effect of that is quite an intimate knowledge of that format. This current experiement, is now to ease my own content creation woes (and as a learning exercise) of bringing 'new' content into ArmA. Basically, I want (for my own development process) to be able to (relatively speaking) bring 'new' character models of differing proprtions, if desired into ArmA and also, any 'new' anims. required to move them... To do this effectively, one needs to output some stuff from ArmA to use as a reference point in other modelling/content creation tools. Oh, yes I realize I need to tackle 'sharp/smooth' edges also... cheers, Sy. PS. Neph, how can i tell in Modo if the Normals are oriented the same as they are in O2? Share this post Link to post Share on other sites
nephilim 0 Posted December 10, 2007 snyide i can send you a wheighted MAX char on tuesday. i havent done much wheightings in Modo but it should be managable. well if your polys point outside theyll aswell do in oxygen. i had no probs exporting/importin in obj format between modo and oxygen, aside from that the OBJ will only be one material and all UVW set´s merged to one i dont know any mathematical approach :/ the problem is how do you want to get the wheighting out of an exported obj (that afaik doesnt save wheights) and store them into a p3d? afaik oxygen cant import such things as wheight maps. cheers and thx for the link Share this post Link to post Share on other sites
Synide 0 Posted December 10, 2007 snyide i can send you a wheighted MAX char on tuesday.i havent done much wheightings in Modo but it should be managable. well if your polys point outside theyll aswell do in oxygen. i had no probs exporting/importin in obj format between modo and oxygen, aside from that the OBJ will only be one material and all UVW set´s merged to one i dont know any mathematical approach :/ the problem is how do you want to get the wheighting out of an exported obj (that afaik doesnt save wheights) and store them into a p3d? afaik oxygen cant import such things as weight maps. cheers and thx for the link I would just read the weightings from what format they cam out of Max/Maya and physically write them into the p3dm file... it's not difficult. yeah, just came across the fact that the OBJ format does not support multiple UV coordinates for a single vertex that may belong to more than one face. This is a problem with export... to OBJ format. So, to get around this where a single point belongs to more than one face and the UV coordinates are different then i'll have to create a 'new' point/vert., that's ok though... acceptable. hmmm, once all done i'll possibly look at a different format for importing/exporting... i'm trying to finish the p3dm2obj tonight... maybe tomorrow, depending on how it goes... although O2 may not support a weight map as such, we all know it supports a 'weighting' per vert per selection. So, all i need is to know how this would be represented in Max/Maya and how/what format it can be exported out of Max/Maya, then i can take this an automatically integrate it into a p3dm. Share this post Link to post Share on other sites
Synide 0 Posted December 20, 2007 Just a quick update... After much mucking about... I have decided that the best way to get information in and out of O2PE is not via OBJ or 3DS. I have bought across in both directions models in there entirety, however do to so requires either creating or removing extra verts. and what not. And/or loss of selection/component definitions. The previous RC of O2PE had a export feature for a BI txt format and it's complimentry BI txt Import feature. I decided to replicate that feature with a small tool. The p3dm2obj program i see now as just a stop gap method. And, at the moment I am writing a MSX script to import this text file and create the necessary geometry in MAX. And, the reverse of this, a script to export to a text file then the 'tool' can make a p3dm out of it. The objective is to allow for seamless importation/exportation of models to and from Max with all gemoetry named and intact. And, then be able to import transform data from the rtm's into Max. This is all highly do-able, it's just a pain to implement the process, but one I'm willing to endure for my own satisfaction. Once this is achieved I will look at the same process for Modo and or Maya I envisage. I think I'm about 1/3 of the way through writing the Max import script. I don't know msx very well at all and am not particularly keen on having to learn (at least the basics anyway...) the in and outs of yet another scripting language. The reason I 'm tackling the 'Import to Max' first is so I have reference material to produce the stuff in the opposite direction. I'm forever hopeful BIS will produce a 'final' release tools suite that makes this content development pipeline alot smoother. In the absence of that I am forging ahead anyway. Cheers. PS. I'm just tackling the 'allocation' of verts & faces to component names, then i'll tackle weight per vert/selection, then importing the rtm transforms, and finally probably the uv's. regarding the rtm... i should be able to 'adjust' and already existing Max script from our Russian friends from way back when... Share this post Link to post Share on other sites
Synide 0 Posted January 11, 2008 A little update on stuff... 1. I've decided that the 'best' format for going in and out of O2 is lwo2 & down the track lxob. 2. Currently my p3dm->lwo converter does the following.  - Creates the exact same number of points & faces etc. as in the O2 model.  - The selections in O2 match the selections in modo  - The normals are transfered.  - The UV's are transfered.  - Just work on mapping faces to textures now...  - The per vertex weighting is transfered perfectly to modo in the form of 'weight maps' per O2 selection - most cool ! Once the texture to face mapping is complete, i'll start on the reverse process from modo -> O2. Once those two processes are beded down, I'll look at adding things like...  - transfer of animation data from the p3dm directly to modo and back again.  - transfer material info directly from O2 to modo and back again. So, hopefully in the not too distant future I'll actually be able to sit down and do what I really want to do and make content rather than having to 'make' a workflow pipeline. Share this post Link to post Share on other sites
nephilim 0 Posted January 11, 2008 GREAT NEWS! specially for passionate modo users like me keep us updated! Share this post Link to post Share on other sites
Synide 0 Posted January 12, 2008 Sorry Neph, still playing around with the extracting stuff outta O2 over to Modo so haven't been working much on the reverse process. Been extracting Anims... actually it's frikn' easy... all you do is apply an animation to the model in O2. Run my tool on the p3dm and it outputs the .lwo model... but now it also outputs an mdd point cache file. then all you do is open the model in modo and apply the mdd deformer - cool ! O2 to Modo Anim Share this post Link to post Share on other sites
nephilim 0 Posted January 13, 2008 thats smoking dude! Share this post Link to post Share on other sites