XML:ONLV: Difference between revisions

2,172 bytes added ,  21 March 2013
gathered texture stuff
m (env_shade completely overwrites vertex shading)
(gathered texture stuff)
Line 4: Line 4:


* tips with cutscene charas: sync pelvis OBAN and partner TRAM
* tips with cutscene charas: sync pelvis OBAN and partner TRAM
* notes on camera and film import ?
* more information / updates for exported xml files
* more information / updates for exported xml files
* ModTool: is it possible that a light source and an object draw a shadow on another object?
* ModTool: is it possible that a light source and an object draw a shadow on another object?
Line 136: Line 137:
: [[#Breakable glass with BSL recognition|env_broken Id [Id]]] (if also second Id is used then objects in that range get counted e.g. 3001, 3018 = 18)
: [[#Breakable glass with BSL recognition|env_broken Id [Id]]] (if also second Id is used then objects in that range get counted e.g. 3001, 3018 = 18)
: [[#Texture exchange|env_texswap Id texture]] (no file prefix/suffix allowed)
: [[#Texture exchange|env_texswap Id texture]] (no file prefix/suffix allowed)
: [[#env_shade|env_shade Id Id R G B]]
|-
|-
|valign="top"| <GunkFlags>
|valign="top"| <GunkFlags>
Line 529: Line 531:
* During pathfinding calculation OniSplit creates a new folder called "temp" and a subfolder "grids". There again is a file "''levelname''_grids.dae". That file contains ''rooms'' with textures "bnv_grid_''N''.tga" marking obstacles in the pathfinding. ''Ghosts'' will have a transparent texture "'''_marker_ghost'''.tga". You get those things also when you export a level. Transparent ''ghosts'' make it easier to see the rest of your level if you have many of those planes.
* During pathfinding calculation OniSplit creates a new folder called "temp" and a subfolder "grids". There again is a file "''levelname''_grids.dae". That file contains ''rooms'' with textures "bnv_grid_''N''.tga" marking obstacles in the pathfinding. ''Ghosts'' will have a transparent texture "'''_marker_ghost'''.tga". You get those things also when you export a level. Transparent ''ghosts'' make it easier to see the rest of your level if you have many of those planes.
* In Mod Tool ''ghosts'' and ''rooms'' can be grouped under a null object. Right-click the null object to select all its children, then use "Selection Only [x]" as saving option. That way all the planes can be quickly saved to a *.dae file.
* In Mod Tool ''ghosts'' and ''rooms'' can be grouped under a null object. Right-click the null object to select all its children, then use "Selection Only [x]" as saving option. That way all the planes can be quickly saved to a *.dae file.
;Danger quads
You can influence the pathfinding creation of dangerous zones with danger quads. Read on [[#marker textures|HERE]].
Another kind of influence is the [[#<Model>|gunk flag]] IgnoreGrid. It can be used to let OniSplit ignore the object during pathfinding creation. The grids in that place will be white.




Line 548: Line 556:
* ai2_chump
* ai2_chump
:: spawns a friendly striker that follows the player if possible, makes also pathfinding grids visible
:: spawns a friendly striker that follows the player if possible, makes also pathfinding grids visible
====<Textures>====
=====... used for exceptions=====
This tag is mandatory. Textures become imported as they are; in the texture section you declare exceptions.
                <Texture Name="GOO">
                    <Format>bgra4444</Format>
                    <GunkFlags>NoCollision</GunkFlags>
                    <Image>env/images/GOO.tga</Image>
                </Texture>
* There you can give a texture a special format, for example "bgra4444", to make it transparent.
* Use gunkflag "TwoSided" to make surfaces visible from both sides.
* If the texture comes with gunkflag "NoCollision" then all objects with that texture will have no collision. Characters would fall through it.
Both makes sense, let's say, for a water-like substance. The biolab use this for an area with green acid.
{| style="float:right"
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/making_a_surface_transparent_and_twosided_zpsa8950d1f.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/making_a_surface_transparent_and_twosided_tn_zpsae6709f0.png]
|}
'''TwoSided and transparent objects'''
It's also possible to set this in Mod Tool. Use one image source for diffuse and transparency.
It won't work with two image sources even if both sources use the same image. See screenshot if you are still unsure about this.
=====regular textures=====
OniSplit automatically imports textures of objects in the [[#<Model>|<Model> section]]. Those objects could be considered as AKEV core geometry.
'''one texture per object'''
Furniture and Physics objects are allowed to have only one texture per object.
AKEV core geometry can have also just one texture or multiple textures - that's up to you to decide.
'''multiple textures per object'''
[[Image:AKEV_single_object_multiple_textures.png|thumb|200px|right|one object with multiple textures, one per polygon cluster]]
[[Image:AKEV_single_object_multiple_textures_ingame.png|thumb|200px|right|ingame test, blue: twosided, glass: twosided and transparent, random metal: regular (onesided)]]
Question: How do we apply multiple textures to an AKEV core object?
Answer: Once again this is a list for ModTool guys:
* select some polygons
* goto Material > Phong
* hit [7] to open Render Tree
* add a texture and connect "Image" with "Phong", choose "diffuse" as illumination mode
* double-click "Image" to open Material page
* choose texture and UV, fine-tune UV via [alt]+[7]
Repeat this for each cluster you create.
Caution: textures will be fixed to one set of flags. You can't use the same texture A for an onesided cluster/object B and twosided cluster/object C. You would need to create a different named clone of that texture and apply that to cluster/object C.




=====marker textures=====
=====marker textures=====
Marker textures are used to import certain quads with special flags.
Marker textures are used to import certain objects with special flags. Import those object alongside [[#<Model>|AKEV core]] geometry.
 
Marker textures aren't imported automatically. Add those textures to the final package / plugin, e.g. by some sort of batch code.
 
onisplit -create:txmp out env/markers/*.tga


Transparent TwoSided NoOcclusion are only set if the same texture source is used for diffuse and transparency and if transparency setting are enabled.
 
The flags Transparent TwoSided NoOcclusion are only set if the same texture source is used for diffuse and transparency and if transparency setting are enabled. See subsection of "[[#... used for exceptions|... used for exceptions]]": "TwoSided and transparent objects".




Line 574: Line 645:
Normally, OniSplit decide how to color the grids. But it's possible to add own danger quads to fine tune zones of great danger. Those orange areas will be generated with the 4 different blue borders around it.
Normally, OniSplit decide how to color the grids. But it's possible to add own danger quads to fine tune zones of great danger. Those orange areas will be generated with the 4 different blue borders around it.


Danger quads can be imported with level geometry. They must have "'''_marker_danger'''" as texture name.
Danger quads must have "'''_marker_danger'''" as texture name.


Results in flags: Transparent TwoSided NoCollision Invisible NoOcclusion Danger
Results in flags: Transparent TwoSided NoCollision Invisible NoOcclusion Danger
Line 625: Line 696:
Appears not very useful. No effect to pathfinding creation.
Appears not very useful. No effect to pathfinding creation.


====<Textures>====
This tag is mandatory. Textures become imported as they are; in the texture section you declare exceptions.
                <Texture Name="GOO">
                    <Format>bgra4444</Format>
                    <GunkFlags>NoCollision</GunkFlags>
                    <Image>env/images/GOO.tga</Image>
                </Texture>
* There you can give a texture a special format, for example "bgra4444", to make it transparent.
* Use gunkflag "TwoSided" to make surfaces visible from both sides.
* If the texture comes with gunkflag "NoCollision" then all objects with that texture will have no collision. Characters would fall through it.
Both makes sense, let's say, for a water-like substance. The biolab use this for an area with green acid.
{| style="float:right"
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/making_a_surface_transparent_and_twosided_zpsa8950d1f.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/making_a_surface_transparent_and_twosided_tn_zpsae6709f0.png]
|}
;TwoSided objects
It's also possible to set this in Mod Tool. Use one image source for diffuse and transparency.
It won't work with two image sources even if both sources use the same image. See screenshot if you are still unsure about this.




8,452

edits