Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 07/15/09 04:07

ViciousReilly
Member
Registered: 07/15/09

Help with importing modified textures

Hello,

I just came across this forum and was hoping someone could assist me in importing modified textures for Oni. Using the AE tutorial on the Oni Wiki I was able to successfully export and edit some textures for testing, but I am not sure where the created TXMP.oni files go once created.

I am at this step and am now kind of confused .....

"3) Once you have created the TXMP*.oni file, you will need to put it in the level0_Final folder and then recompile the level."

Where can I find this level0_Final folder, and how to a compile levels to view the textures?

Thanks in advance for anyone that can help!

-VR

Offline

#2 07/15/09 07:07

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

Re: Help with importing modified textures

Welcome, VR.  Those instructions were actually written to work with the previous version of the Anniversary Edition, so they're a tad out of date.  If you had installed the old AE, you would have each level's data broken into .oni files in folders called level0_Final (which contains global data for all levels), level1_Final, etc.  (The new AE still does that, but you mod the data differently.)

Since you apparently haven't installed the Edition, you can simply use the -export command yourself on the level with your textures, creating a folder like levelx_Final, then replace the old TXMP___.oni files in there with your modified ones, and use the -import:nosep (Windows) or -import:sep (Mac) command on the folder (in a backup copy of the game, obviously, since you're making somewhat-hard-to-reverse changes to the data).

Soon people will be using the new AE's system of making packages for their mods, which will make testing mods easier, but that's a whole other approach.

P.S.: If you have any questions about command syntax, check the "OniSplit" article on the wiki.  If you still have questions, then we're all ears smile


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

Offline

#3 07/15/09 11:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

Ok a few more questions then if I may, I am not well versed in modding or coding (I am more from an art/design background) so a lot of this stuff is new to me.

So if I understand the directions so far, I need to export a specific level.dat file into it's own folder which contains all the .oni textures. Then I can go ahead and replace those textures with my modified versions then import the folder back into a .dat file? Is there a specific tutorial on this process, because so far I have only come across bits and pieces of the puzzle and maybe I just don't know where to look.

Do the level.dat files relate directly to an actual level? For instance is Level0_.dat actually the training course in the beginning of the game?

Is onisplit and AE two separate ways of modding the game, or are they supposed to work together? When I downloaded AE, onisplit was already in the AE folder so I was under the impression it was part of the same tool set. Could I just use onisplit standalone to edit textures then? Because AE seems really complicated for what I want to do, edit textures smile.

Thanks for the help! Much appreciated.

Offline

#4 07/15/09 12:07

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

Re: Help with importing modified textures

ViciousReilly:  Welcome to OCF and its great to have a member with a design background.   We'll do our best to help you.

First of all, what platform are you on? PC or Mac?  Which version of AE did you install? This will help in providing specific directions.

To answer your questions, Level0_Final contains the global data for the game.  Then the other files such as Level1_Final contains data for that specific level. So Level1_Final is the Training/Warehouse level.  These folders are found in the GameDataFolder.

OniSplit is the tool used to covert the Oni files to files that we can modify, such as textures.  AE uses OniSplit in the process to update the data files with modified ones for the end user.  In other words, those who first use AE will be able to play the modified Oni data files without any further work on their part.

But modders would use OniSplit directly to modify specific files, such as your case the textures.

What textures are you working on?

Last edited by EdT (07/15/09 12:07)

Offline

#5 07/15/09 12:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

Hey EdT thanks for the quick reply. It's great to see people so enthusiastic about supporting a game so long after release.

I obtained the AE version from this page (http://wiki.oni2.net/Anniversary_Edition) last night, so it would be the 7/7/2009 build of the tool. I am running all of this on a PC.

I guess where I am getting confused is whether I am actually running AE or not, it doesn't seem like I am actually using it or need it in my process to edit textures. I have AE in the Oni folder under the 'Edition' folder, but I can't tell whether or not it's actually working when I run the game, but my guess is it's not doing anything hmm.

Basically I just want to edit textures in the game, preferably at a higher resolution, and be able to see them on the models so I can see progress and hopefully post some images on these forums for guys to check out and give me feedback big_smile.

I am not afraid to dive deep into AE or onisplit to do this, but I am definately not a programmer so ideally I would like to find the easiest most efficient way possible smile.

Thanks.

Offline

#6 07/15/09 13:07

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

Re: Help with importing modified textures

ViciousReilly: Did you run the AE installer?  Because, if you did and then played the game, you will notice on the Menu screen, the words Anniversary Edition.  What AE first does is take the original Oni level files and splits them into individual files.  Then AE combines the original files with modified ones grouped in packages to create new Oni level files that have the new features.

Please be patient with us, with the latest AE framework, the workflow process has changed and I'm still trying to get adjusted to it.

Offline

#7 07/15/09 13:07

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

Re: Help with importing modified textures

If you run the Oni app in Edition/, then you'll be in the Edition, using the modded copy of the game data in Edition/GameDataFolder.  If you were running Oni from there, you would have noticed the custom Main Menu that tells you you're in the AE, so I'm guessing you're still opening the original Oni app.

You were correct in your understanding of my post, by the way, when you said "I need to export a specific level.dat file into it's own folder which contains all the .oni textures. Then I can go ahead and replace those textures with my modified versions then import the folder back into a .dat file."  That's probably the best way for you to swap textures at the moment.

If you need to know OniSplit syntax, you can open up the Console Prompt (is that what it's called in Windows?), and say "onisplit --help", or read the "OniSplit" article on the wiki for more explanation (just type in "OniSplit" in the Go/Search box).  But basically you're using two commands (written as if you were in the GameDataFolder of a copy of Oni made for modding purposes):

onisplit -export GameDataFolder/level1_Final level1_Final.dat
onisplit -import:nosep GameDataFolder/level1_Final level1_Final.dat

P.S.: If you need to know level-to-file correspondence, as far as which level is in which file (and yes, it's 1:1), consult this page, it's handy for that.

P.P.S.: Heh, I see that EdT beat me to a response again, but this time I'm posting anyway tongue


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

Offline

#8 07/15/09 15:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

Thank you both very much for your help.

I was not able to get the Oni.exe file located in the Edition folder to work. I double click on it an nothing happens. However Iritscen I was able to get the export working and get a level1_final folder to be created so thank you for that tip (it took me a second to figure out that you were writing it in mac format hehe).

So when I get home I am going to try messing around with some textures and see what I get.

If you may happen to know why the AE exe might not have worked please share.

Thanks!

Offline

#9 07/15/09 15:07

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

Re: Help with importing modified textures

Did you run the Installer in install/?  If so, you can post the Install.log and Globalize.log files here (or maybe on a site like pastebin.com to save space on this page).


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

Offline

#10 07/15/09 22:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

Hey guys,

So I was able to successfully update level1 textures, and now I can see revised textures in the training stages which is pretty sweet! I want to try and edit all the textures in the training stage and see how it looks, then maybe I will post a video comparison.

But I hit a snag when I tried to update the character portraits in Level0_.dat. I tried altering shinitama's portrait, but when I went to run the game I got the "blam" crash on a new game start up.

I tried to trouble shoot by exporting level0 then without editing anything in the folder importing it back into a dat file and I get the same crash.

Has anyone seen this?

Thanks!

Offline

#11 07/15/09 23:07

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

Re: Help with importing modified textures

ViciousReilly: Take a look at the startup.txt file in the Oni folder and see where the crash occurred, or you can also post the text of the file here.  What happens if you use the original level0 file, not one that has been exported and then imported?

Regarding the textures, are you exporting/importing them as .xml?  Using xml makes it easier the adjust the attributes of the texture.  The tutorial mentions it at the end. http://wiki.oni2.net/AE:ModTXMP 

How large are the textures you created?  Can you post a couple of screenshots of what you have done so far.

Finally, here are some examples of improvements in the looks of some characters:
http://oni.bungie.org/community/forum/v … 264#p13264

Last edited by EdT (07/16/09 00:07)

Offline

#12 07/16/09 00:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

I don't see a startup.txt file in my oni folder, is it different on a PC than a mac maybe? When I use the original backup level0 dat and raw it works just fine.

For the textures I am just using some batch files I made to export and import them, I don't know anything about xml. I export the level folder as well as the levels TXMP files as tga's, then I edit the TGA's in photoshop, reconvert them to .oni files, place them in the exported folder and then convert it back to a dat file.

The textures I am making are 512x512, can I go any higher? They look really nice but would look better at 1024 wink. I would be happy to post pics of the stuff I am doing but I don't know how to take a screen shot.

-VR

Offline

#13 07/16/09 00:07

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

Re: Help with importing modified textures

PC's also have a startup.txt file, it should be there somewhere :-)

To take a screenshot, take a look at the key_config.txt, there should be a line in there like: bind fkey13 to screenshot.  So when you press F13 key, it will take a screenshot and the file will be in the Oni folder.

The reason I use xml to extract the TXMP files, is that the xml file will show the original attributes of the TXMP file.  So when importing I can use the same one or a different one. 

The maximum size the PC version of Oni will accept is 512x512.

Offline

#14 07/16/09 00:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

Ok got the screenshots to work.

Here are some samples.

New floor 1

http://a6lebg.bay.livefilestore.com/y1p … t00000.bmp

New Runway

http://a6lebg.bay.livefilestore.com/y1p … t00001.bmp

New concrete wall

http://a6lebg.bay.livefilestore.com/y1p … t00002.bmp

New Metallic lower wall. (the resolution on it is not functioning correctly tho hmm

http://a6lebg.bay.livefilestore.com/y1p … t00003.bmp

Offline

#15 07/16/09 01:07

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

Re: Help with importing modified textures

The floor texture is a bit too "heavy". Try making smaller tiles. smile The runway isn't bad, though you could probably make that smaller too, as it looks a bit pixelated. The walls are sexy. big_smile I would edit out the blue lights though, we can make those as particle effects or something. It looks nice though, other than the shadows being applied over the lights. tongue

Keep going ^_^ Do you make these textures yourself?


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

#16 07/16/09 01:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

Thanks for the comments gumby smile, these are all just tests right now and are all self contained photoshop files so I should be able to edit them easily.

Yep I made all the textures, some are made straight from photoshop, some are photo manips with added detail. Everything has been edited though to fit with games original style.

Offline

#17 07/16/09 04:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

Ok I have another problem and I can't find info about in the tutorial page. All the textures I have been making have been created at 512x, but it seems to switch back however to 256 or 128 when I try and convert it to an oni file (which is actually good for me because now I know the dithering and blurriness wasn't from my original files.)

So how do I keep the 512 resolution intact when convert it over?

Thanks again, I am learning a ton here smile.

Offline

#18 07/16/09 08:07

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

Re: Help with importing modified textures

You need to use the -large flag when importing.  Looks like no one mentioned it anywhere on the wiki >.<

I love what you did with the walls, esp. how you improved the somewhat lame yellow (?) shapes on the wall.  In my own experiments with hi-res textures, I've found that it's tricky to maintain the feeling of the original textures while adding more detail.  It's easy to overdo it and end up with a distractingly complex TXMP.  That being said, people always scrutinize something more when someone posts a picture focusing on it than if they were just playing the game and ran by the texture, so hopefully we won't nitpick you too much! smile  Keep up the good work.

P.S.: Hopefully your textures are 32-bit in their original format (I bet they are), because 32-bit with 8-bit alpha will be coming online soon in a future version of OniSplit.

P.P.S.: And I bet you're also drawing them at 1024px, right?  We may never want/need TXMPs that big, but it's good to plan ahead (and Macs already support 1024px TXMPs, actually).

P.P.P.S.: Please please post future pics in JPEG format, those BMPs took minutes to load because that site is pretty slow (not your fault, I know, and BMP is the screenshot format Oni uses).  kthx, I'll shut up now cool


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

Offline

#19 07/16/09 10:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

Thanks for the info Iritscen smile. So could you provide a sample script line that uses -large tag? I am not sure where it would go in the bat file.  Again, I am not very good when it comes to the code stuff haha.

Does it look like this? (PC)

"onisplit -import -large ..\..\level0_Final ..\..\level0_Final.dat"

I was actually making the textures in 512, but you are right I should be making them in 1024 since macs can support it and I am sure some day PC 's will support it as well. So I can go back and change what I have easy big_smile. The textures I am making are native 32 bit, but I am seeing some dithering when I bring them into the game, is there another flag that helps that?

I don't mind the nitpicks in feedback at all, I am sure we all have awesome ideas about how we want this game to look, so it's cool to hear other peoples opinions on the work I am doing.

Now if only the game supported bump and normal maps we would really be in business wink.

-VR

Offline

#20 07/16/09 10:07

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

Re: Help with importing modified textures

It would look like this:
onsplit -create:txmp dest_dir -format:dxt1 -large -genmipmaps TXMPSTR_EASY_1%2FSTRbicepR.tga

Also, what format were you using?

EDIT: Something I did awhile ago:
http://edt.oni2.net/mov/txmp.wmv

Last edited by EdT (07/16/09 10:07)

Offline

#21 07/16/09 10:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

Thanks!

By format, do you mean image format? I am using TGA's for the TXMPs.

Edit: Oh I see what you are referring to, I am using bgr555. Is there an advantage to using a certain kind of format?

Last edited by ViciousReilly (07/16/09 10:07)

Offline

#22 07/16/09 14:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

Hey guys,

So I found that startup.txt file you talked about and I ran the edited level0 dat file which gives me the "blam" crash. Here is what it spit out.

Can anyone make any sense of what the problem might be?

daodan attached
begin initializing oni
looking for the game data folder
initializing the template manager
DataFolder = GameDataFolder
Created a file iterator for the data folder.
Got Level Info for level0_Final.dat.
Valid Level level0_Final.dat
Got Level Info for level10_Final.dat.
Valid Level level10_Final.dat
Got Level Info for level11_Final.dat.
Valid Level level11_Final.dat
Got Level Info for level12_Final.dat.
Valid Level level12_Final.dat
Got Level Info for level13_Final.dat.
Valid Level level13_Final.dat
Got Level Info for level14_Final.dat.
Valid Level level14_Final.dat
Got Level Info for level18_Final.dat.
Valid Level level18_Final.dat
Got Level Info for level19_Final.dat.
Valid Level level19_Final.dat
Got Level Info for level1_Final.dat.
Valid Level level1_Final.dat
Got Level Info for level2_Final.dat.
Valid Level level2_Final.dat
Got Level Info for level3_Final.dat.
Valid Level level3_Final.dat
Got Level Info for level4_Final.dat.
Valid Level level4_Final.dat
Got Level Info for level6_Final.dat.
Valid Level level6_Final.dat
Got Level Info for level8_Final.dat.
Valid Level level8_Final.dat
Got Level Info for level9_Final.dat.
Valid Level level9_Final.dat
calling TMrRegisterTemplates
calling ONrRegisterTemplates
initializing oni platform specific code
initializing sound system 2, basic level
initializing basic sound system 2 layer...
DirectSoundCreate
direct sound dwFlags = f5f
direct sound dwFreeHw3DAllBuffers = 25
direct sound dwFreeHw3DStaticBuffers = 25
direct sound dwFreeHw3DStreamingBuffers = 25
direct sound dwFreeHwMemBytes = 0
direct sound dwFreeHwMixingAllBuffers = 25
direct sound dwFreeHwMixingStaticBuffers = 25
direct sound dwMaxContigFreeHwMemBytes = 0
direct sound dwMaxHw3DAllBuffers = 26
direct sound dwFreeHwMixingStaticBuffers = 25
direct sound dwFreeHwMixingStreamingBuffers = 25
direct sound dwMaxContigFreeHwMemBytes = 0
direct sound dwMaxHw3DAllBuffers = 26
direct sound dwMaxHw3DStaticBuffers = 26
direct sound dwMaxHw3DStreamingBuffers = 26
direct sound dwMaxHwMixingAllBuffers = 26
direct sound dwMaxHwMixingStaticBuffers = 26
direct sound dwMaxHwMixingStreamingBuffers = 26
direct sound dwMaxSecondarySampleRate = 192000
direct sound dwMinSecondarySampleRate = 8000
direct sound dwPlayCpuOverheadSwBuffers = 0
direct sound dwPrimaryBuffers = 1
direct sound dwSize = 96
direct sound dwTotalHwMemBytes = 0
direct sound dwUnlockTransferRateHwBuffers = 0
setting the direct sound cooperative level
initializing oni persistance
initializing scripting
initializing binary data system
initializing imaging
initializing image system...
initializing motoko
initializing 3D display system..
initializing geometry engines...
initializing draw engines...
res.txt not found, loading default resoultions in 32-bit mode...
31 modes available
initializing physics
initializing oni motoko
initializing local input
initializing input system...
initializing animation system
initializing animation system...
initializing environment
initializing text system
initializing the console
initializing the materials
initializing the full sound system 2
initializing full sound system 2...
initializing particle 3
initializing oni particle 3
initializing env particle system
initializing physics
initializing game state
initializing AI 2
initializing window manager
initializing film system
initializing level
initializing oni scripting
initializing OBDr
initializing OBJr
initializing oni cinematics
initializing oni sound
initializing oni movie
initializing the pause screen
finished oni initializing
loading level 0...
setting up 3d engine...
creating new OpenGL context
OpenGL platform initialization
Playing intro movie...
Using standard Windows gamma adjustment
opengl color bits = 24
opengl depth bits = 32
OpenGL vendor = NVIDIA Corporation
OpenGL renderer = GeForce 7800 GT/PCI/SSE2/3DNOW!
OpenGL version = 2.1.2
OpenGL extensions =
multipass being used
OpenGL supports 4 texturing units
glBlendColor() available
wglSwapIntervalEXT supported; vsync= 1
Initializing the Oni Window...
displaying splash screen...
configuring console...
engine startup complete, launch the out-of-game UI...


Thanks!

Offline

#23 07/16/09 14:07

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

Re: Help with importing modified textures

Well bgr555 has 32768 colors and bgr32 has 16777216 colors.  But as mentioned soon bgra8888 should become available, that will give us the 16777216 color range plus alpha channel.

How does the file size compare between the original level0 file and the edited one?

Offline

#24 07/16/09 14:07

ViciousReilly
Member
Registered: 07/15/09

Re: Help with importing modified textures

The dat file on the edited version is about 120k smaller but the edited raw is about 120k larger than the default working file.

Offline

#25 07/16/09 15:07

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

Re: Help with importing modified textures

That's odd, I just tried it out on my original level0 files and extracting and creating the level0 files with Onisplit and the file sizes remained the same, no difference.

Offline

Board footer

Powered by FluxBB