Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 02/04/08 19:02

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

OniSplit update

OniSplit by Neo, is an integral part of the Anniversary Edition. It does the work of splitting and recombining the data files.  But it also does much more such as importing and exporting TXMP, M3GM and now TRBS files. ONCC files can also be exported.


UPDATE: Sep 14, 2008 OniSplit v0.9.28:
http://edt.oni2.net/OS/OniSplit_v0.9.28.zip
Adds .xml export/import of ONIE

More info can be found here: http://wiki.oni2.net/OniSplit

Export/Import for TXMP files:
To extract all the TXMP files

onisplit -extract:png destination_directory_for_image_files level0_Final.dat

TGA and DDS are also supported using -extract:tga and -extract:dds.

To import image files. (Create new TXMP files)

onisplit -create:txmp destination_directory [options] source_image_file

where options can be
-nouwrap - set the "U wrapping disabled" flag
-nowwrap - set the "V wrapping disabled" flag

-format:bgr555 (or dxt1) for most of the stuff
-format:bgr32 for skyboxes
-format:bgra4444 for transparent/reflective stuff (in a couple of places bgra5551 is used but probably it's not big deal if bgra4444 is used instead)

-genmipmaps - generate mipmaps if they are not already present in the source file and if the source file is not dxt1 compressed

Example:

onisplit -create:txmp imported -format:bgr32 -genmipmaps tga\concrete.tga

To batch process a folder of image files

onisplit -create:txmp imported -format:bgr32 -genmipmaps tga\*.tga

source_image_file can be dds or tga. "Color indexed" and "black and white" tga files are not supported currently. Other image file formats (png, jpg, bmp, tif) may work depending on Mono/.NET support for them.
onisplit will automatically prepend TXMP to the output file name if the source file name does not start with TXMP already.

For TXMP files that contain envmaps.

onisplit -create:txmp dest_dir -format:bgra4444 -genmipmaps -envmap:envmapname imagefile.tga

The envmap name can have the TXMP prefix but it is not required, it is added automatically if missing.

How to find the name of the envmap there are 2 ways:

1) Use the -dump command:
onisplit -dump TXMPIteration001%2FKS_face.oni

TXMPIteration001/KS_face:TXMPInstance {
       TextureName:"Iteration001/KS_face"
       Flags:4609
       Width:128
       Height:128
       Format:0
       Animation:null
       EnvMap:"TXMPenvksface"
       DataOffset:32
}

2) Open the .oni file in a hex editor, you will see the names:

TXMPIteration001/KS_face

Export/Import for Wavefront OBJ files:
Named M3GMs and (unfortunately unnamed) M3GM contained in ONWC files can be exported to obj file format:

onisplit -extract:obj dest_dir M3GMnotfound.oni
 onisplit -extract:obj dest_dir ONWCw1_tap.oni

Or for greedy smile people:

onisplit -extract:obj dest_dir level0_Final.dat

Importing obj files:

onisplit -create:m3gm dest_dir TCTF_Shotgun.obj

For importing obj files the obj file must only contain triangles so when exporting a model from a 3D design tool it needs to be triangulated. If the obj file uses more than one texture then only one will be taken into consideration. If the obj file does not contain a texture or someone wants to use a different one then the texture name to be used can be specified with -tex option:

onisplit -create:m3gm dest_dir -tex:TCTF_Shotgun TCTF_Shotgun.obj

Just like in -envmap option case the texture name can start with TXMP but it is not required.
Note that in both -envmap and -tex cases a .oni file is not created for the specified texture. The .oni file for that texture must be create separately.

To see a list of all the commands available in OniSplit:

OniSplit -help

Note: For Mac users the command is:

mono onisplit.exe

Last edited by EdT (09/14/08 19:09)

Offline

#2 02/05/08 09:02

TOCS
Member
From: Denmark
Registered: 04/04/07

Re: OniSplit update

I think i will stop skinning for now, seems to complicated to make a easy handled program what you can make the 'reflective' still being...

Offline

#3 02/05/08 10:02

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

Re: OniSplit update

One: Thanks a lot for the tutorial Ed, I am adding it to the wiki.  There was never a page made for OniSplit, but now there will be smile

Two: The link to OniSplit is broken sad

Three: I don't understand what Rexxar said in the slightest.

Edit: OK, the OniSplit page has been made on the wiki, but it needs current links to the programs placed at the bottom; I think that's your job, Ed, since you need to fix the link above in the first place smile

Last edited by Iritscen (02/05/08 10:02)


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

Offline

#4 02/05/08 11:02

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: OniSplit update

The link has been updated to the latest version of OniSplit.  I made a quick test and using the envmap feature you will get reflectivity!

Offline

#5 02/05/08 13:02

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

Re: OniSplit update

It's really tempting to go nuts with adding reflectivity to metal/plastic TXMPs, esp. for characters.  I'm fighting the urge.  Help!


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

Offline

#6 02/05/08 13:02

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: OniSplit update

Loser brought out the issue of reflectivity in the StrikerMod thread:

when you replace the texture, it loses its ability to be "reflective"(striker armor, ninja armor, Konoko armor)

But the latest version of OniSplit fixes this issue by the command:
-format:bgra4444 (for transparent/reflective stuff)

If you can make some metal/plastic textures reflective, then do it! I think that will make the game look better.

Offline

#7 02/05/08 13:02

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

Re: OniSplit update

Are we only given the option for total or no reflectivity in our alpha channel, or can we have degrees of it?  Is the alpha channel supposed to be black/white, or can it be grayscale?

And if I understand correctly, some TXMPs are only allowed to be reflective or not, with no specific mask (alpha channel) being used.  How will I know when this is the case?


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

Offline

#8 02/05/08 14:02

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: OniSplit update

Sorry, I don't know the answer to those questions... hopefully, someone much smarter than me can explain it!

Offline

#9 02/05/08 14:02

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

Re: OniSplit update

I can always experiment, but it's not a quick thing, as you know, to import TXMPs time and time again and view them ingame just to test something, so I don't want to seem lazy, but GEYSER HELP!!! smile


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

Offline

#10 02/05/08 15:02

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: OniSplit update

From the top:

It's not wise to link to Neo's skydrive account. I suggest to mirror his stuff on oni2.net whenever possible, and then link to that.

Rexxar up there meant that he had trouble getting his graphical apps (Photoshop, Gimp, etc) to preserve (or edit) the alpha channel.
That's basically just him being clumsy (or not fluent enough) with the common feature of decomposing an image into color channels.

I'm not sure environment mapping will be rendered at all for environment textures. If not, that would limit its use to what it is now.
However, you can in any case use environment mapping for moving objects (cars, vans, helicopters, glider and other cutscene stuff)

"Loser brought out the issue of reflectivity in the StrikerMod thread:"
Loser, like Rexxar, was apparently not fluent with alpha channels smile

4444 means that there's 4 bits dedicated to transparency (or reflectivity).
The alpha channel is then equivalent to 4-bit grayscale (that's 16 levels).
5551 means that there's only 1 bit used for transparency (or reflectivity).
Then the alpha channel is the equivalent of monochrome (black & white).

"some TXMPs are only allowed to be reflective or not, with no specific mask (alpha channel) being used"
Sorry, but I'm pretty sure I don't understand that correctly. Please reformulate what feature you mean.
Also feel free to refer to the TXMP page on the wiki, and ask questions right there on the talk page.
Hm... are you sure you mean reflective and not transparent? reflective textures always use alpha.
There are, however, implementations of transparency that don't require a TXMP alpha channel.
One of them is additive blending. Another is a uniform alpha value set for the whole polygon.


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#11 02/06/08 09:02

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

Re: OniSplit update

Oh, perhaps I was thinking of transparency after all; I had been reading on the wiki and probably got confused about that part.

I guess I have two questions left:
1. How do I know whether a particular TXMP for a character, an object, etc. is 4444 or 5551?
2. Does the 16-shade limit to the alpha channel in 4444 mean I have to actually use only 16 shades of gray?  Do I need to use Photoshop to convert that channel to 4-bit grayscale before outputting it to become a .oni file?


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

Offline

#12 02/06/08 12:02

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: OniSplit update

1) The store type (4444 or 5551 or whatever) is the property of the TXMP (stored at 0x90), so it can be whatever you like: no one specifies it to be 5551 apart from the TXMP itself.
5551 textures are marginal, so even though they supposedly give greater color depth, I would import everything as 4444 and just forget about 5551.
Apart from viewing the .oni file in hex, you can get the information about the original store type with the -dump command (see EdT's first post up there).
It's the "Format" integer: to interpret it, refer to the TXMP page on the wiki. In Ed's example, 0 corresponds to 4444.

2) OniSplit's importing routines should take care of the conversion from whatever you have in your image file to whatever target format you specify for the TXMP.
OUP, on the contrary, doesn't do conversion right now, and instead preserves, whenever possible, the format of the source image. That's why I've been using DDS.


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#13 02/06/08 12:02

TOCS
Member
From: Denmark
Registered: 04/04/07

Re: OniSplit update

This program is still to complicated for me, i dont wanna use hours to know how to use it...

Offline

#14 02/06/08 12:02

TOCS
Member
From: Denmark
Registered: 04/04/07

Re: OniSplit update

And the program dosent works for me, just shows up a CMD box and about 1/3 second after it disappears...

Offline

#15 02/06/08 13:02

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: OniSplit update

Rexxar: which "program" are you talking about? OniSplit? You can't just double-click the EXE. it's not supposed to work that way.
You have to either run it from a "command prompt" window, or set up other scripts or mini-programs that will call it indirectly...
I understand if you don't want to jump on the command-line bandwagon. It's rewarding, but it might be unfamiliar at first, sure.
Command-line tools are really not all that hard to use once you've "mastered" the command prompt window (navigation etc).
You basically follow Ed's instructions up there and enter all the OniSplit operations at the prompt while in the proper directory.


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#16 02/06/08 13:02

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

Re: OniSplit update

Yeah, Ed's tutorial should finally bridge the gap for most people, between wanting to mod Oni and being able to.


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

Offline

#17 02/06/08 13:02

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: OniSplit update

Well, if one wants to take the modding beyond screwing up a few textures, an OniSplit tutorial is nowhere near enough.
You have to be at least remotely aware of the hierarchy of Oni's resources (what needs what and why), and then some.
Also, ultimately, one has to integrate the new content with level logic, if an actually new gaming experience is the goal.


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#18 02/06/08 13:02

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: OniSplit update

Note: The tutorial information came from Neo, I merely copy and paste smile

I suppose someone could write a PC program to provide a GUI for OniSplit, similar to AETools for the Mac.  This would make it easier for those without a programming background to update and improve and TXMP's.

geyser: Have you tested out the Export/Import for Wavefront OBJ files?  Will this allow us to add new 3D content or just replace current ones?

Offline

#19 02/06/08 14:02

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: OniSplit update

"Have you tested out the Export/Import for Wavefront OBJ files?"
I haven't yet, as I've been busy with a mini-viewer for textured OBJ.
That one is intended for wannabe 2D artists without a 3D program.
It's almost ready, but I have no means to compile it for the Mac.
The code is quite portable though: you and Iritscen will manage.
(BTW, why doncha give Myrd a heads-up on what's going on here?)
(even if he won't code himself, he can give you some valuable tips)

However, Neo has obviously experimented a bit prior to the release.
Importing worked fine for all the new guns made by "17 Seconds".
I even posted a picture of the shotgun on the Screenshots thread.
We also imported Ashley Davison's Iron Demon (as a single mesh).
The problem is that the Demon is rather high-poly, so Oni crashed.
We'll try splitting it up into separate objects and/or merge polygons.
We can also use the Iron Demon made long ago by "17 Seconds".
It has a more modest poly count, but it doesn't have walk anims.

"Will this allow us to add new 3D content or just replace current ones?"
Since Oni's content has been made modular, that's the same thing...
If you haven't noticed, we've already duplicated characters and guns.
So if you can upgrade a gun's mesh, you can make a 100% new gun.
And if you can upgrade a character's bones, you can make new chars.

"I suppose someone could write a PC program to provide a GUI for OniSplit, similar to AETools for the Mac."
I suppose someone could, but my philosophy is that the current tools are already OK for the truly dedicated.
Of course there will have to be a GUI installer Soon Enough, but right now there are other priorities for me.

Last edited by geyser (02/06/08 14:02)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#20 02/06/08 14:02

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

Re: OniSplit update

I've been busy with a mini-viewer for textured OBJ.
That one is intended for wannabe 2D artists without a 3D program.
It's almost ready, but I have no means to compile it for the Mac.
The code is quite portable though: you and Iritscen will manage.

Cool.

(BTW, why doncha give Myrd a heads-up on what's going on here?)

Ooh, who's he?

"I suppose someone could write a PC program to provide a GUI for OniSplit, similar to AETools for the Mac."
I suppose someone could, but my philosophy is that the current tools are already OK for the truly dedicated.

True to your PC-using stereotype.  "Who needs a GUI?  DOS is more than enough." smile


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

Offline

#21 02/06/08 16:02

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: OniSplit update

geyser: Once you have the mini viewer ready, I'll start asking around smile

When you have time, can you make a tutorial on how to duplicate the characters and to incorporate them into the game.
I can think of a couple things needed: A new ONCC, CHAR info, TXMP set...

Iritscen: Myrd is a programmer for Project Magma: http://projectmagma.net/about/

Last edited by EdT (02/06/08 16:02)

Offline

#22 02/06/08 18:02

SektorZ
Member
Registered: 02/21/07
Website

Re: OniSplit update

"This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."

I keep downloading, repairing, reinstalling NET framework but it never works.. hmm
It can't perform the requested perform in the Anniversary Edition either... what could it be....

Last edited by SektorZ (02/06/08 18:02)

Offline

#23 02/06/08 18:02

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: OniSplit update

"I keep downloading, repairing, reinstalling NET framework but it never works."
There are several versions of .NET. It makes no sense to "repair" an old one.
Are you sure you've tried installing the recent version of .NET from MS's site?
http://www.microsoft.com/downloads/deta … laylang=en

@ Iritscen:

True to your PC-using stereotype.  "Who needs a GUI?  DOS is more than enough."

The command-line paradigm is not typical of Windows users and you know it.
I just happen to be an "advanced" user, so the command line works for me.
I assure you that fluent Mac users get a lot of things done with the Terminal.
(BTW, today's Windows shell is rather different from DOS)

The potential contributors I know on the PC side are... flexible.
It's not the command line that keeps people from contributing.
And it's not a GUI that'll enable them to produce quality mods.
I guess I'm saying that all truly creative people are hackers...

And like I said, I just have other priorities than GUI right now.

Last edited by geyser (02/06/08 19:02)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#24 02/07/08 09:02

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

Re: OniSplit update

geyser wrote:

I guess I'm saying that all truly creative people are hackers...

And like I said, I just have other priorities than GUI right now.

I was semi-teasing about the command-line thing, many modern Windows users never even used DOS.

But I do disagree, just for the record, with the notion that creative people should be hackers/command line gurus.  The artists I know would never go near a command line; they moved to Macs for the sake of user-friendliness, so they certainly would never touch the Terminal.


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

Offline

#25 02/07/08 11:02

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

Re: OniSplit update

I never thought of hacking as messy, but admittedly I am not a hacker in any sense of the word.  But to me, hacking (like how you guys figured out the format of Oni's binaries) is a careful, analytical process, the sort of thing I'm good at.  True creative thinking has always been beyond me, because I am an obsessively tidy person and I don't like chaos.  The artists I know are relatively messy.

The way we usually discuss it is right-brain vs. left-brain.  Creative types are right-brained and nonlinear, and nerd-types like me who write computer programs are left-brained and procedural.


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

Offline

Board footer

Powered by FluxBB