Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 19/2/10 15:39

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

Creating new level

Level creation will be the most challenging and satisfying aspect of modding Oni.

This thread will contain basic information for creating a new level.

Adding new levels to Oni.
A basic level needs as a minimum the following files:
AISA, settings for "ai_0" character
AKEV, level geometry
ONLV, level settings
TXMP, textures for AKEV

Currently without modifications, the open slots for new levels are level5_Final (The Airport Part Deux), level7_Final (Obsolete), level16_Final (BGI HQ).  Therefore, select one of the them for your new level and put your files in the levelx_Final folder.

Using the Maze level as an example. I have the following:
AKEVmaze (3D model converted to .oni)
TXMPs (All the textures for AKEVmaze)
AISALevelCharacters (Basic data)
ONLVLevel (Configure the settings for the level.)
  <Name>maze</Name>  (Name of IGMD folder containing the BSL files)
  <Environment>AKEVmaze</Environment> (Name of level geometry)
  <SkyBox>ONSKafternoon</SkyBox> (Other options are ONSKnight, ONSKsunset, ONSKcrapsky)
  <Characters>AISALevelCharacters</Characters>
BINACJBOCharacter (Spawnable characters)
BINACJBOFlag (Flag ID and coordinates)

I used level5_Final for the maze level.

Creating a level's geometry.
According to geyser:

Provide your geometry in the COLLADA (.dae) format.
You can use relative paths for textures: TGA format recommended, but PNG, JPG and BMP should work too.

Objects with no texture coordinates will be ignored.

Only triangles and quads are supported. Avoid N-gons.

Only simple hierachy is supported. Avoid "components" (such as groups of nodes instantiated in other nodes).

It's preferable to freeze the nodes' transformations (i.e., to permanently apply them to the geometries), but simple node transformations should be supported.

In my experience, when making the ground plane, it should be subdivided into smaller polygons.  How small?  Well if Konoko is bouncing up and down while walking or standing, then the polygons in that area need to be subdivided.

To convert the level's geometry from DAE to .oni, use the command:
-create:AKEV directory -format:bgr32 -genmipmaps -normals path_to_DAE

OniSPlit will then make the AKEV and its TXMPs (the -format command refers to what type of TXMP to make, -genmipmaps command is an option to improve GFX performance)

If during the process OniSplit returns with an error that it can't find the textures, you should open the DAE file in a text editor and look for the links to the textures and make sure they are correct.

Offline

#2 19/2/10 15:53

dream996
Member
Registered: 15/3/09

Re: Creating new level

is there any chance later on, you can just install them with the AEinstaller ?  neutral  (tat is juz an idea  cool


PunBB bbcode test

Offline

#3 19/2/10 16:30

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

Re: Creating new level

Sounds like we just took another step into the modding stage.
What about starting with just importing maps, from other games?
I'm not into all this 3D stuff, but to me it sounds like an idea.

Offline

#4 19/2/10 18:17

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

Re: Creating new level

dream996 wrote:

is there any chance later on, you can just install them with the AEinstaller ?  neutral  (tat is juz an idea  cool

Not for the initial creation process, no.


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

#5 20/2/10 1:04

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

Re: Creating new level

dream996: Once a level is done, all you have to do is put the level files in the GameDataFolder and the scripts folder in the IGMD folder

TOCS: If you can find a map from another game and that map can be converted to a 3D model, then it may be possible to import it to Oni.

Offline

#6 20/2/10 5:24

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

Re: Creating new level

By the way, it seems like those custom maps that has been posted (obsolote, maze etc.) dosen't show up in my game, that's one of the reasons that kept me from doing map stuff.

Offline

#7 20/2/10 6:34

dream996
Member
Registered: 15/3/09

Re: Creating new level

dream996: Once a level is done, all you have to do is put the level files in the GameDataFolder and the scripts folder in the IGMD folder

sounded easy ! =] ,juz a little question ! can we import NEW levels ? (a after level 14?)

so these is what u need to do :
1.i need a AKEV--> that is covert by the GUI( level-->*dae-->AKEV
2.TXMP for the AKEV
3.AISALevelCharacters (not sure what that is) or how u do it ...
4.ONLVLevel               
a folder (name of your level in the imgd)
Environment,SkyBox,Characters
BINACJBOCharacter (Spawnable characters)
BINACJBOFlag (Flag ID and coordinates)....blahblahblah
--------------------------------------------------------------------------------------------------------
edt u know about the AISA,is it  like a script ?

Last edited by dream996 (20/2/10 6:44)


PunBB bbcode test

Offline

#8 20/2/10 6:51

paradox-01
Member
From: Germany
Registered: 14/1/07

Re: Creating new level

@ TOCS: You need to unlock the savegame slot. Load first airport level and use the "winlevel" cheat.

Last edited by paradox-01 (20/2/10 7:43)

Offline

#9 20/2/10 10:06

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

Re: Creating new level

dream996, we can use level16 right now.  I'm sure we can add levels 15 and 17 with a little modification.

Yes, as the instructions stated those are the basic files you need to get started with adding a new level.
Re AISA, the easiest way is to copy that file from another level.  If you extract AISA as .xml you can see its contents,

Offline

#10 7/1/11 17:55

UpalStanka
Member
Registered: 4/1/11

Re: Creating new level

Hello

Provide your geometry in the COLLADA (.dae) format.

why collada? i dont understand this format, please add support to onisplit Wavefront obj format.

beforewk.jpg

i convert obj to collada with deep exploration, as result

afterew.jpg

Offline

#11 7/1/11 18:02

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

Re: Creating new level

I don't believe COLLADA contains textures, by default. As far as I know, they're kept together with the model files in some directories. And welcome by the way. tongue

Offline

#12 7/1/11 18:07

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

Re: Creating new level

Well, the model actually needs to be triangulated in order to import it into Oni (as far as I understand).  Anyway, I think it would be easier to solve your texture issue than to convince Neo to add OBJ support for levels :-)  What program are you using to export to Collada?


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

Offline

#13 7/1/11 18:16

UpalStanka
Member
Registered: 4/1/11

Re: Creating new level

TOCS, by default not contains textures, i must reopen model and attach all texrtures manually, and re save model, that not good way


Iritscen, I read rules modeling for oni, no long polygons, maximum 2000 polygons, and no triangulation.


My favorite software don’t support collada export

Offline

#14 7/1/11 18:51

Dirk Gently
Member
From: Boston, MA
Registered: 12/6/09
Website

Re: Creating new level

Find something that does?

Offline

#15 7/1/11 18:52

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

Re: Creating new level

Actually, I was wrong, what EdT/geyser say above is that triangles and quads are both okay, so you don't *need* to triangulate, but it shouldn't really matter.  There's no 2,000 poly limit that I'm aware of (you might be thinking of the 2,000 vertex limit on character model bones).

Anyway, the decision to use Collada was made by OniSplit's developer and I don't think that it will change.  Almost all modelers support Collada, although not all support it well.  The free XSI Mod Tool and Blender both offer some support for Collada exports.


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

Offline

#16 8/1/11 8:12

UpalStanka
Member
Registered: 4/1/11

Re: Creating new level

AISAarenaScripts.oni - player model on level
AKEVarena.oni - level model
TXMP_marker_ghost.oni - level texture
ONLVarena.oni - don’t understand, link to AISAarenaScripts.oni, and how edit this file? I leave as is

Level compile level5_Final.dat and raw> run game> load save - the airport part deux> blam, oni crashed

debug.txt
### warning: particle class 'w3_phr_e01' emitter 5 can't find emitted particle 'w3_phr_p08'
### warning: particle class 'pstream_shooter' emitter 2 can't find emitted particle 'w_pstream_shot2'
### warning: particle class 'flame2_e' emitter 2 can't find emitted particle 'test_smoke'
### warning: particle class 'env_cloud02_p01' emitter 1 can't find emitted particle ''
### warning: particle class 'env_cloud02_p02' emitter 1 can't find emitted particle ''
### warning: particle class 'env_cloud01_p01' emitter 1 can't find emitted particle ''
### warning: particle class 'env_cloud01_p01b' emitter 1 can't find emitted particle ''
### warning: particle class 'env_cloud01_p01a' emitter 1 can't find emitted particle ''
### warning: particle class 'm_block' emitter 1 can't find emitted particle 'm_p01'
### warning: particle class 'muroglow_e01' emitter 2 can't find emitted particle 'muroglow_p02'
### warning: particle class 'phase_shot' emitter 1 can't find emitted particle ''
bink movie file 'GameDataFolder\intro.bik' does not exist

what wrong? I stupid, help me please

Offline

#17 8/1/11 9:50

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

Re: Creating new level

Can you post your level files and I will take a look.

Offline

#18 8/1/11 10:33

UpalStanka
Member
Registered: 4/1/11

Re: Creating new level

Thanks all for help, I found error reason and fix it.

As base I use this http://cid-639aa31296681bfe.skydrive.li … exagon.zip , tell me please how set spawn coordinates

image23x.jpg

my level http://cid-8a09fea1c371b00f.office.live … r/file.zip

Last edited by UpalStanka (8/1/11 10:33)

Offline

#19 8/1/11 10:52

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

Re: Creating new level

Thanks, but what I need is the actual level5 dat and raw files you made, then I can better answer your questions.

However, looking at the model itself, you might want to add a ground plane.  While you are falling, can you quickly enter dev mode and in the console type goto 0?

Offline

#20 8/1/11 11:26

UpalStanka
Member
Registered: 4/1/11

Re: Creating new level

EdT wrote:

can you quickly enter dev mode and in the console type goto 0?

yes, console message: ai_0 old 644.0 1327.8 -3079.7
                                     ai_0 new 0.0 0.0 0.0
i have question, how set spawn point in 0.0 0.0 0.0?

current level here http://cid-8a09fea1c371b00f.office.live … Folder.zip

Offline

#21 8/1/11 13:56

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

Re: Creating new level

You need to create a new folder in the IGMD folder called test: GameDataFolder/IGMD/test  Then make a new bsl file and put it in the test folder.  The bsl file can look like this:

#
# Testing.bsl
#

func void main (void) {

    env_show 2010 0
    gl_fog_blue=.15
    gl_fog_red=.15
    gl_fog_green=.15
    gl_fog_start=.99
    gs_farclipplane_set 5000
   
    chr_location 0 530 1350 -2400
                   
}

Convert the ONLVLevel to xml, you will see this tag:
<Instance id="0" type="ONLV">
        <Name>Test</Name>
        <Environment>AKEVhexagon</Environment>

The tag <Name> is the name of the bsl folder for this level, so in the future, you will want to change it something else.


I also noticed you do not have any textures associated with the model, so it looks completely black.

UpalStankalevel.jpg

Last edited by EdT (8/1/11 14:03)

Offline

#22 8/1/11 14:57

UpalStanka
Member
Registered: 4/1/11

Re: Creating new level

Thanks EdT for bsl script, I found alternative way to set the position, in Flag.xml - <Position> 0 10 0 </ Position>

And I have a few more questions, how to create a lightmap for the geometry, here too contrast
lightmapt.jpg

The second question is why some polygon is transparent, I tried to detach and reverse polygon normal but not successfully
image32f.jpg

Thank you very much for your assist, sorry for flooding in the topic

Offline

#23 8/1/11 18:07

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

Re: Creating new level

I was told sometime ago that Oni doesn't support any lightmapping. The lamps seems to do the job inside though. Also it seems it can be adjusted in the .bsl files, somehow.

Offline

#24 8/1/11 22:33

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

Re: Creating new level

Download and install this version of OniSplit, keep the older one as backup:
http://edt.oni2.net/OniSplit/OniSplit_v0.9.52.zip

In your command to create akev add this option:  -nolight
Now the lighting should be even.

In Oni, one side of a polygon is solid and the other side is invisible, so by flipping the normals it should become solid.  So if you need both sides to be solid, you have to use 2 polygons, the solid part on the outside.

Note: There is a way to light a level in a 3D program and then bake the lighting into the model, but I never was able to do it.

One time geyser explained to me how to do it within XSI, here is his explanation:

XSI calls this a CAV (color-at-vertex) property
so, just open the help and read up on "color at vertices", starting with "about"
and then "color at vertices / property / creating


To apply a RenderVertex property
1. Select a polygon mesh, polygon cluster, hierarchy, or group  whose vertex colors you wish to render.

2. From the Render toolbar, choose Get > Property >  Render Map to open the RenderMap property editor.

3. On the Basic tab, set Sampling  to Vertices Only (Render Vertex).

4. Do both of the following:
- Choose and configure the maps that you wish to generate, as  described in #Reu80719. - Once you’ve configured your maps, set the rest of the  general RenderVertex options (those that affect all maps), as described in #Reu38467.

5. If you want to store HDR values, set PrecisionDatatype to Float on the  Advanced tab.

6. After you’ve finished setting the options, click the  Regenerate Maps button at the top of any tab to generate  all active maps.

7. Repeat as necessary.

you don't need the 5 now, about the two steps of 4
you need to look up those two other pages and see what dialogs and settings they deal with
other than that, this short list of steps is what you need to do:

Select everything in step one, then render/get/property/rendermap, step 2 displays the property creation dialog, where you must make sure that you're creating only vertex-lighting information, not texture-like "light maps" (that's what the instructions in step 3 are about) and then step 4 is about the rules for lighting computation; probably you can go with the defaults first and if it looks bad, come back and tweak them

Render / Get Property / Color at Vertices Map
Render / Get Property / Render Map

Under Sampling select Vertices Only
Under Surface Color Choose Enable, then in the box below select Vertex _Color, if option does not appear click on the New button next to it.
Under Map select Illumination only
Finally, click on the button Regenerate Maps...

Don't ask me to explain what he said :-)

Last edited by EdT (8/1/11 22:39)

Offline

#25 10/1/11 5:21

UpalStanka
Member
Registered: 4/1/11

Re: Creating new level

Thank you very much for help.

I read all yours messages, fix my error and create small map: http://cid-8a09fea1c371b00f.office.live … older1.zip ,this level in progress

This site best. Thanks you all guys!

Offline

Board footer

Powered by FluxBB