Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 08/10/09 20:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

3ds max -> OniSplit

(...continued from Retexturing Project)

Iritscen wrote:

I notice that OniSplit has been updated with better 3ds max support.  bobbysoon, if you want to try out the new version, it's on the Depot (click on Modding Tools on the side).

I haven't gotten into usage of OniSplit yet (lots of distractions where I'm at), but I found what you're talking about, here. I didn't see the updated support part you mentioned, though. Could you link, quote, or briefly explain? Might this possibly mean it now accepts the map channel tokens ColladaMax generates?

<source id="pelvis-geo-map-channel1">
  <float_array id="pelvis-geo-map-channel1-array" count="288">
  0.998041 0.309103 0 
  0.948781 0.456467 0 
  0.822415 0.444215 0 etc...
  </float_array>
  <technique_common>
    <accessor source="#pelvis-geo-map-channel1-array" count="96" stride="3">
      <param name="S" type="float"/>
      <param name="T" type="float"/>
      <param name="P" type="float"/>
    </accessor>
  </technique_common>
</source>

OniSplit generates this

<source id="pelvis-geo-TexCoord">
    <float_array count="192" id="pelvis-geo-TexCoord-array">
        0.998040557 0.309102774 
        0.9487814 0.456467152 
        0.8224148 0.4442147 etc...
    </float_array>
    <technique_common>
        <accessor count="96" source="#pelvis-geo-TexCoord-array" stride="2">
            <param type="float" name="S" />
            <param type="float" name="T" />
        </accessor>
    </technique_common>
</source>

I could reformat ColladaMax's map channel output to OniSplit's TexCoord  format with a maxscript - that'd be easier than the exporter I was working on - I got stuck on the rotation stuff.

Offline

#2 08/10/09 21:08

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: 3ds max -> OniSplit

Heh, sorry, but I don't actually know what Neo improved in OniSplit (the only official note from him was "fixed the Collada importer to work with 3DSMax exported files").  I was told that you were aware of an existing issue in OniSplit, so I hoped you would know what was meant by "improved".

I'm afraid your issue is a bit over my head, but I can simply pass it on to Neo.  It might help me if you can explain the issue with map channels a bit more.  What part of OniSplit's treatment of the data in the 3ds file is problematic?


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#3 08/10/09 22:08

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 3ds max -> OniSplit

You don't need to fix anything. Onisplit can read several different types of collada files. In any case, you want to try

Onisplit -create output_folder input_model.dae

However, you then have to put it ingame, which is a bit more tricky. Do you have the Edition working yet?


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#4 08/11/09 05:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

Re: 3ds max -> OniSplit

"fixed the Collada importer to work with 3DSMax exported files" - sounds like he added 'map channel' handling, so no need for that maxscript - *sigh of relief*
The only issue with OniSplit I'm aware of is/was screwed up texture mapping. Possibly un-initialized coordinates. Looked random in the screenshot I saw of what I exported (which was what I imported - passed thrue for testing)

AE works, and thanks for your help with that. Sorry I've been such a noob. I've been playing it, with the AE text in the main menu. I'd forgotten how fun Oni is, and to throw in these enhancements is just big_smile but I gotta get a new keyboard  hmm

I dl'd OniSplit GUI. It's path settings are still blank - by 'folder with .oni files', are we referring to 'edition\install\packages', and is the destination folder 'edition\GameDataFolder'?
What's the plugin field about?

I'll take a better look at the wiki and spare you guys all me lazy noob questions.

Last edited by bobbysoon (08/11/09 05:08)

Offline

#5 08/11/09 08:08

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: 3ds max -> OniSplit

It's strange that texture mapping would be messed up.  You lost me with your "import" and "export" part because I don't know if you are speaking relative to Oni or to 3ds.  Have you tried exporting an existing model from Oni, opening the.dae in 3ds and saving it as a new .dae, then importing it back into Oni, without making any actual changes to the model?  And if so, maybe you can post the "before" and "after" .dae files so we can see what went wrong.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#6 08/11/09 11:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

Re: 3ds max -> OniSplit

I think it was messed up because OniSplit was only looking for '<source id="*-geo-TexCoord">'. It wasn't looking for '<source id="*-geo-map-channel*">', and so it was ignored.

How do you guys like the terminology, 'injected' and 'extracted'? That's coming from the halomods community, in regards to the manipulation of the given Bungie subject  tongue

We did that - Gumby extracted a dae, I imported and exported thrue 3ds unchanged, and he injected the new dae back thrue OniSplit. The only problem was the texture mapping.

Perhaps he still has the screenshot. I scanned thrue and compared both the oni-extracted and 3ds-exported dae files, and in the 1st post above are the parts with the texture mapping.

I'm being optomistic. I believe the only problem now is that I haven't actually started on the model yet tongue, and I don't know how to use OniSplit, besides that '-create' command just mentioned

Offline

#7 08/11/09 12:08

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: 3ds max -> OniSplit

Well, all OniSplit does is export and import, and convert files to and from .oni format.  You'll get the hang of it quickly.

So, as to this "geo-TexCoord" versus "geo-map-channel" issue, have you changed that part of the file manually and seen it import perfectly into Oni?


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#8 08/11/09 13:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

Re: 3ds max -> OniSplit

No, but I do see the same x/y values in both formats. Should be fine once it's interpreted correctly.

Offline

#9 08/11/09 14:08

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: 3ds max -> OniSplit

And you have performed this round-trip conversion from start to finish with the *latest* OniSplit, v0.9.41?

If so, please upload the entire OniSplit-extracted DAE and the one that 3ds max generated from importing that DAE (and is the model being textured properly in 3ds upon being imported?).

Last edited by Iritscen (08/11/09 14:08)


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#10 08/11/09 14:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

Re: 3ds max -> OniSplit

It imported into 3ds well enough, with just minor corrections needed - the importer applied the texture to transparency as well as the diffuse, and did a couple other odd things to the materials, so I wrote a maxscript to correct these things, and it shows up just fine in 3ds:
ONCCstriker_easy_1.jpg
As for export from 3ds and OniSplit usage, well, I haven't gotten to the OniSplit usage part, yet, but attached is 3ds's dae export if you'd like to give it a go (hopefully the image filepaths in the dae won't matter)
this seems to have worked:
Onisplit -create:trbs "GameDataFolder\level0_Characters\ONCCstriker_easy_1" striker_out.dae

Last edited by bobbysoon (08/11/09 15:08)

Offline

#11 08/13/09 14:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

Re: 3ds max -> OniSplit

Now I'm trying to figure out OniSplit usage. I want to work on Konoko instead of striker, because I'm not stylistic enough to make anything from striker's texture's blocky pixels. I need to work on something with more details in the texture. I think Sever's textures will work nicely for starters.
So, how do we get OniSplit to produce a DAE with it's parts properly arranged? All I get is a neat little pile of Konoko parts from TRBSk3_body_high.oni, with these command lines:
"D:\Oni\Edition\install\Onisplit" -extract:dae "." "TRBSk3_body_high.oni"
"D:\Oni\Edition\install\Onisplit" -extract:dae "." "TRBSk3_body_high.oni" -noanim
I copied TRBSk3_body_high.oni into sever's texture package folder, thinking the dae might get image refs that way, if that makes a difference with dependancies or something.

Offline

#12 08/13/09 14:08

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 3ds max -> OniSplit

Onisplit -extract:Dae -anim TRACBlah . TRBSk3_body_high.oni


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#13 08/13/09 15:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

Re: 3ds max -> OniSplit

D:\Oni\Edition\install\packages\24000SeveredTextures\oni\level0_Final\level0_Textures>"D:\Oni\Edition\install\Onisplit"
-extract:dae -anim TRAMKONOKOidle1.oni . TRBSk3_body_high.oni
D:\Oni\Edition\install\packages\24000SeveredTextures\oni\level0_Final\level0_Textures\TRAMKONOKOidle1.oni
D:\Oni\Edition\install\packages\24000SeveredTextures\oni\level0_Final\level0_Textures\TRBSk3_body_high.oni

D:\Oni\Edition\install\packages\24000SeveredTextures\oni\level0_Final\level0_Textures>pause
Press any key to continue . . .

that created another folded up body, in a folder named "-anim"

Offline

#14 08/13/09 15:08

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: 3ds max -> OniSplit

This should be what you want:
onisplit -extract:dae target_folder -anim:KONCOMidle1 ONCCkonoko_generic.oni

Note that for me to get a successful animation+model extraction I first had to move:
- the ONCC file above,
- the TRBS file,  [edit: oops, forgot this one]
- TRAMKONCOMidle1.oni,
- the TRACs for konoko_core and konoko, and
- the TRMA file and TXMP files for the model
into one folder.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#15 08/13/09 16:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

Re: 3ds max -> OniSplit

D:\Oni\Edition\install\New Folder>dir /w /o
 Volume in drive D is Program Files
 Volume Serial Number is 0C76-06BE

 Directory of D:\Oni\Edition\install\New Folder

[.]
[..]
EXTRACT dae.bat
ONCCkonoko_generic.oni
TRACkonoko_animations.oni
TRACkonokocore_animations.oni
TRACkonokolev1_animations.oni
TRAMKONCOMidle1.oni
TRMAkonoko002_high_texture_generic.oni
TXMPh2h_konflash.oni
TXMPKONangry.oni
TXMPKONangryfront.oni
TXMPKONbeatuppissed.oni
TXMPKONdeepthought.oni
TXMPKONevil.oni
TXMPKONintense.oni
TXMPKONlistening.oni
TXMPKONnametag.oni
TXMPKONnametagM.oni
TXMPKONpissed.oni
TXMPKONpsychedup.oni
TXMPKONsad.oni
TXMPKONscared.oni
TXMPKONsmile.oni
TXMPKONtalkangryfront.oni
TXMPKONtalking.oni
TXMPKONtransform.oni
              25 File(s)        216,567 bytes
               2 Dir(s)  16,180,039,680 bytes free

D:\Oni\Edition\install\New Folder>"..\Onisplit" -extract:dae . -anim:KONCOMidle1 ONCCkonoko_generic.oni
D:\Oni\Edition\install\New Folder\ONCCkonoko_generic.oni
System.NullReferenceException: [b]Object reference not set to an instance of an object[/b].
   at Oni.Totoro.BodyDatReader.ReadBody()
   at Oni.Totoro.BodyDatReader.Read(InstanceDescriptor trbs)
   at Oni.Geometry.Character.Read(InstanceDescriptor descriptor, String animationName)
   at Oni.Totoro.BodyDaeExporter.Export(InstanceDescriptor descriptor, Document document, String outputDirPath)
   at Oni.DaeExporter.ExportInstance(InstanceDescriptor descriptor)
   at Oni.Exporter.ExportInstanceList(List`1 descriptors)
   at Oni.Exporter.Export(InstanceFileManager fileManager, String sourceFilePath, String filter)
   at Oni.Program.ExtractGeometry(String[] args)
   at Oni.Program.Main(String[] args)

D:\Oni\Edition\install\New Folder>pause
Press any key to continue . . .

ONCCs always do that for me
was I supposed to use OniSplit to copy, to correct dependancies?

also, I got the same result with -anim:TRAMKONCOMidle1.oni, and also -noanim, which, btw, is more like what I'm looking for, i think. I'm not trying to work with animations at the moment. Maybe later, I'll give animating a go though

Last edited by bobbysoon (08/13/09 16:08)

Offline

#16 08/13/09 16:08

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 3ds max -> OniSplit

You need the TRBS.


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#17 08/13/09 16:08

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: 3ds max -> OniSplit

bobbysoon wrote:

D:\Oni\Edition\install\New Folder>dir /w /o
...
ONCCs always do that for me
was I supposed to use OniSplit to copy, to correct dependancies?

Lol, you copied the fly-in portraits, not the model textures.  Plus you missed the TRBS, as Gumby said, but that was my fault, sorry!  Here's a listing of a folder I used to extract Konoko's low two-fisted punch:

ONCCkonoko_generic.oni            
TRACkonoko_animations.oni        
TRACkonokocore_animations.oni            
TRAMKONCOMpunch_lowa.oni         
TRBSkonoko_body_high.oni        
TRMAkonoko002_high_texture_generic.oni    
TXMPIteration001%2FKS_bicep.oni        
TXMPIteration001%2FKS_calf_nobknee.oni    
TXMPIteration001%2FKS_chestpack.oni
TXMPIteration001%2FKS_face.oni
TXMPIteration001%2FKS_foot.oni
TXMPIteration001%2FKS_mid.oni
TXMPIteration001%2FKS_neck.oni
TXMPIteration001%2FKS_pelvis.oni
TXMPIteration001%2FKS_shoulder.oni
TXMPIteration001%2FKS_thigh_horiz.oni
TXMPIteration001%2FKS_wrist.oni
TXMPIteration001%2Fks_fist.oni

See what I mean now?  And no, you don't need to use OniSplit's -move command, in fact it won't work with the current AE hierarchy of folders (we'll be fixing that at some point).  Pulling these files manually is a pain, but it won't take too long.

I'm not trying to work with animations at the moment. Maybe later, I'll give animating a go though

I think that using -noanim tends to produce the "contortionist Konoko" that you complained about earlier.  So Gumby suggested using -anim: to give you a posed Konoko that can be worked with, without having to rotate the parts.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#18 08/13/09 17:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

Re: 3ds max -> OniSplit

[images]
ONCCkonoko_generic.dae               <- still getting Konoko compacted
ONCCkonoko_generic.oni
TRACkonoko_animations.oni
TRACkonokocore_animations.oni
TRACkonokolev1_animations.oni
TRAMKONCOMidle1.oni                     <- animation not found
TRBSkonoko_body_high.oni
TRMAkonoko002_high_texture_generic.oni
TXMPIteration001%2FKS_bicep.oni
TXMPIteration001%2FKS_calf_nobknee.oni
TXMPIteration001%2FKS_chestpack.oni
TXMPIteration001%2FKS_face.oni
TXMPIteration001%2Fks_fist.oni
TXMPIteration001%2FKS_foot.oni
TXMPIteration001%2FKS_mid.oni
TXMPIteration001%2FKS_neck.oni
TXMPIteration001%2FKS_pelvis.oni
TXMPIteration001%2FKS_shoulder.oni
TXMPIteration001%2FKS_thigh_horiz.oni
TXMPIteration001%2FKS_wrist.oni

ONCC works with TRBS present, but now it's saying "Animation TRAMKONCOMidle1 was not found"
command line is
"..\Onisplit" -extract:dae . -anim:KONCOMidle1 ONCCkonoko_generic.oni


Imports with texture though  big_smile

Last edited by bobbysoon (08/13/09 17:08)

Offline

#19 08/13/09 17:08

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: 3ds max -> OniSplit

Strange, I am getting that error too.  I can extract the low punch animation just fine, but the idle one doesn't work.  I'll update my post when I am done talking with Neo.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#20 08/13/09 18:08

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: 3ds max -> OniSplit

are you sure that is the exact name of the animation?


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#21 08/13/09 18:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

Re: 3ds max -> OniSplit

i copy/pasted from the file, into the .bat's command line, and trimmed the TRAM and the .oni
then I copy/pasted from the .bat's window into this post, and trimmed off the excess bits

Offline

#22 08/13/09 18:08

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: 3ds max -> OniSplit

The name is indeed correct.  In talking with Neo I learned that I needed to have the konokolev1 file in there too, but you already had it in place.

For me, issuing the command "onisplit -extract:dae target_folder -anim:KONCOMidle1 ONCCkonoko_generic.oni" works now.  Although Blender's import is screwed up, so I get this:
Konoko-idle_or_dancing.png


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#23 08/13/09 19:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

Re: 3ds max -> OniSplit

perhaps your importer imports rotation in the wrong axis order, as in xyz, xzy, yxz, yzx, zxy, and zyx

Offline

#24 08/13/09 20:08

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: 3ds max -> OniSplit

Well, it's thoroughly messed up, that's just the way it is.  What I don't understand is why OniSplit can't find your animation file when it's right there.  No matter what you try, you're getting Konoko with her legs behind her head?  And you're using 0.9.41, right?


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#25 08/13/09 21:08

bobbysoon
Member
From: Santa Rosa, CA
Registered: 08/01/09

Re: 3ds max -> OniSplit

yup, 0.9.41
object positions vary, but rotations are all aligned to each other
like so:
<rotate sid="rotX">1.000000 0.000000 0.000000 0.000000</rotate>
<rotate sid="rotY">0.000000 1.000000 0.000000 0.000000</rotate>
<rotate sid="rotZ">0.000000 0.000000 1.000000 0.000000</rotate>
in the dae
like the wiki says -noanim does with the default state

Offline

Board footer

Powered by FluxBB