8,480
edits
Paradox-01 (talk | contribs) mNo edit summary |
Paradox-01 (talk | contribs) mNo edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{update| | {{update|The tutorials on the now-defunct Oni Central Forum, under the section "Links to Forum Tutorials", should be merged into this article.}} | ||
This page covers level creation from scratch. See [[Modifying an existing level]] if you want to change a vanilla level in the game. | This page covers level creation from scratch. See [[Modifying an existing level]] if you want to change a vanilla level in the game. | ||
| Line 113: | Line 113: | ||
* [[Creating a level]] (you are here) | * [[Creating a level]] (you are here) | ||
* [[Modifying an existing level]] | * [[Modifying an existing level]] | ||
* [[New levels]] | * [[New levels]] (a historical document) | ||
* [[Lightmapping levels]] | * [[Lightmapping levels]] (an experiment) | ||
===Free asset sources=== | ===Free asset sources=== | ||
* [ | * [https://3dwarehouse.sketchup.com/ 3D Warehouse] – architectural models (also see the [https://3dwarehouse.sketchup.com/collection/236901867937c4ed5fbaf4019d18db23/New-content-for-Oni curated collection] by geyser) | ||
* [https://www.turbosquid.com/ TurboSquid] – various models, including architecture | |||
* [https://www.textures.com | * [https://www.textures.com Textures.com] – wide variety of textures | ||
==Engine limitations== | ==Engine limitations== | ||
| Line 219: | Line 219: | ||
;Static geometry | ;Static geometry | ||
:* '''Unique level geometry with no functions''' (AKEV core geometry such as buildings and streets). | :* '''Unique level geometry with no functions''' (AKEV core geometry such as buildings and streets). | ||
:* '''Repeating objects''' are flagged as '''furniture (FURN)''' although they can be outdoor objects such as boxes and containers. <!--Oni's story plays out most often inside buildings. So, there you go. -->FURN objects were used to be imported by an object collection, an CJBO. Nowadays, furniture collections can be used (again) for imports, but the individual objects are stored as OFGA files. This modularity is known in many game editors (like the Unreal Engine Editor). So, '''OFGA are nothing else than "game assets".''' The drawback of OFGA is that they '''will not import with any vertex shading'''. Only their '''geometries''', attached '''particle''' and '''gunk flags''' get copied into final (baked) level geometry. | :* '''Repeating objects''' are flagged as '''furniture ([[Creating_a_level#Furniture.xml|FURN]])''' although they can be outdoor objects such as boxes and containers. <!--Oni's story plays out most often inside buildings. So, there you go. -->FURN objects were used to be imported by an object collection, an CJBO. Nowadays, furniture collections can be used (again) for imports, but the individual objects are stored as [[XML:OFGA|OFGA]] files. This modularity is known in many game editors (like the Unreal Engine Editor). So, '''OFGA are nothing else than "game assets".''' The drawback of OFGA is that they '''will not import with any vertex shading'''. Only their '''geometries''', attached '''particle''' and '''gunk flags''' get copied into final (baked) level geometry. | ||
:* '''Objects with actual functions''' | :* '''Objects with actual functions''': [[XML:BINA/OBJC/CONS|CONS]], [[XML:BINA/OBJC/DOOR|DOOR]], [[XML:BINA/OBJC/TRIG|TRIG]], [[XML:BINA/OBJC/TURR|TURR]] | ||
: | |||
;[[XML:AKEV#AGQG|Gunk flags]] | ;[[XML:AKEV#AGQG|Gunk flags]] | ||
:Properties directly associated with the polygons. Among others, these can be: Transparent, TwoSided, NoCollision, Invisible, NoObjectCollision, NoCharacterCollision, NoDecals, Furniture, Impassable. | :Properties directly associated with the polygons. Among others, these can be: Transparent, TwoSided, NoCollision, Invisible, NoObjectCollision, NoCharacterCollision, NoDecals, Furniture, Impassable. | ||
| Line 290: | Line 289: | ||
'''Common mistake:''' | '''Common mistake:''' | ||
A few CJBO files '''need relative paths for resources'''. Inserting only a file name will not work. Let us take consoles for example: A relative path to a console should look like this: "'''consoles/console_data.oni'''". The resources are stored in '''shared/console/''' but since the XML master file points to the starting folder via "../shared", it will be omitted in all actual resource paths. If you | A few CJBO files '''need relative paths for resources'''. Inserting only a file name will not work. Let us take consoles for example: A relative path to a console should look like this: "'''consoles/console_data.oni'''". The resources are stored in '''shared/console/''' but since the XML master file points to the starting folder via "../shared", it will be omitted in all actual resource paths. If you need, look into the files of the [http://mods.oni2.net/node/299 demo project "lab"]. '''Doors''' and '''furniture''' also require relative paths. | ||
'''lab/lab.xml''' | '''lab/lab.xml''' | ||
| Line 786: | Line 785: | ||
By default, a Mod Tool scene has one Infinite light, but it doesn't shine in every direction so you might want to add more Infinite lights. Let's say one Infinite light for each direction (+X, -X, +Y, -Y, +Z, -Z) with an intensity of circa 0.25 (night) or 0.75 (day). | By default, a Mod Tool scene has one Infinite light, but it doesn't shine in every direction so you might want to add more Infinite lights. Let's say one Infinite light for each direction (+X, -X, +Y, -Y, +Z, -Z) with an intensity of circa 0.25 (night) or 0.75 (day). | ||
The illumination of those lights can be integrated into the vertex color property | The illumination of those lights can be integrated into the vertex color property: | ||
* Property > Color At Vertices Map | * Property > Color At Vertices Map | ||
* Property > Render Map | * Property > Render Map | ||
edits