Mod Tool: Difference between revisions

13,582 bytes removed ,  16 July 2014
m
placing OniTools addon on its own page
m (Softimage development stopped, Softimage 2015 is the last version)
m (placing OniTools addon on its own page)
Line 1: Line 1:
<!-- keeping track of pages -->
<!-- keeping track of pages -->
{| class="wikitable" style="float:right;"
{| class="wikitable" style="float:right;"
|width="150px"|
|width="200px"|
;sub pages
;sub pages
: [[Mod_Tool/Scripting]]
: [[Mod_Tool/Scripting]]
: [[Mod_Tool/Rigging]]
: [[Mod_Tool/Rigging]]
: [[Mod_Tool/OniTools_addon]]
: [[Mod_Tool/Oni_level_rebuilder]]
|}
|}


Line 1,942: Line 1,944:
  ' INFO : global p7: 5,74764582364017 3,00250371537919 2,43916767056426
  ' INFO : global p7: 5,74764582364017 3,00250371537919 2,43916767056426
  ' INFO : size: 8 8 8
  ' INFO : size: 8 8 8
====Script ideas====
* Animated referencer
* Mod Tool addon
* [[Mod_Tool/Oni_level_rebuilder|Oni level rebuilder]]
* character auto-rigger
* character exporter (TRBS/TRMA/TXMP)
=====Animated reference=====
Every step on the timeline triggers an event, namely siOnTimeChangeEvent.
It could be used to exchange an the image of an object.
This could be either good for an animated textures (BINA3RAPd*.oni) or for an animated reference for TRAM creation.
'''Strategy:'''
* Making a folder named "Animated_Ref".
* Drag and drop the folder into Mod Tool.
* A grid becomes created on a new layer "Animated_Ref". Selection disabled.
* Mod Tool gets then the first image and looks for the pixels.
* Based on that pixels the grids becomes deformed to match the image's proportions.
* Then this "Animated_Ref" grid should be ready for usage.
Similar can be done with the Rotoscope.
Something like that:
function siOnTimeChangeEvent_OnEvent( in_ctxt )
' fixed code
'SetValue "Views.ViewD.RightCamera.camdisp.rotoenable", True
'SetValue "Views.ViewD.RightCamera.rotoscope.imagename", "Clips.Animated_Ref_N_jpg"
' flexible code
' find active viewport, set Rotoscope active and choose image
'SetValue GetViewCamera(GetViewIndex) & ".camdisp.rotoenable", True
'SetValue GetViewCamera(GetViewIndex) & ".rotoscope.imagename", "Clips.Animated_Ref_N_jpg"
current_frame = cstr(in_ctxt.GetAttribute("Frame"))
if GetValue(GetViewCamera(GetViewIndex) & ".camdisp.rotoenable") = true then
  ' Animated_Ref_60.jpg ' . becomes _
  SetValue GetViewCamera(GetViewIndex) & ".rotoscope.imagename", "Clips.Animated_Ref_" & current_frame & "_jpg"     
end if
siOnTimeChangeEvent_OnEvent = true
end function
=====OniTools addon=====
Install by drag'n'drop '''[https://dl.dropboxusercontent.com/u/139715/OniGalore/xsi_OniTools_addon_7.1.2.zip OniTools.xsiaddon]''' into Mod Tool's viewport.
[http://youtu.be/2_3xo8-31-U Demo vid.]
'''tips'''
* while in point (vertex) mode, creating a flag/powerup/TV/weapon will move it to the selected point
* while in object mode, creating a flag/powerup/TV/weapon will spawn it at 0, 0, 0
** check the ''point snap'' checkbox, then use move tool [V] with [Control] to move object to desired point
'''version roadmap'''
{| border=0 cellpadding=0 style="float: right;"
| [https://dl.dropboxusercontent.com/u/139715/OniGalore/display_flag_id_via_ICE.jpg https://dl.dropboxusercontent.com/u/139715/OniGalore/display_flag_id_via_ICE_tn.jpg]<br>flag id displayed via ICE
|}
* v7.1.7 TRGV: change to layer system + auto-update properties
* v7.1.8 FLAG: exchange tex/UV-based id display with ICE-based id display (better performance)
* v7.1.9 CRSA: support master xml file + load corpses from xml to Mod Tool (?)
* v7.? turrets: basic import/export
* v7.? furniture: advanced import (OFGA*.xml / BINACJBOFurniture.xml) & export (OFGA*.xml/.oni as new class, BINACJBOFurniture.xml)
* v7.? turrets: advanced import/export
* ...
* v8 final Oni Object Library
* ...
* v10 starting Oni level rebuilder ?
'''known issues of v7.1'''
* FURN particle not yet supported by export
* not compatible with OBJ drag and drop plug-in (it appears to be taken down anyway)
'''known issues of v4-v7'''
* manager windows sometime don't ''update'' what results in another opened instance
* slow flag import, I will probably make the flag numbering (textures) optional in a later version (then turned off by default)
* broken weapon depot update function (temporary solution: delete depot and add all dae file to folder)
'''version 7.1.1 - 7.1.6'''
* bug fix: TRGV writing/reading
* CRSA (corpse array) import
* scaling support for TRGV
* print absolute position and rotation of selected objects
* print relative position and rotation of selected objects
* furniture library (alpha)
* basic OFGA import / FURN export
'''version 7'''
* a "character export (TRAM)" button (select one bodypart and hit the button, it will select the tree automatically)
* the code includes the "Make Rotation Keys Continuous"
* the addon will change your save file settings (to framerate 60 fps)
: one person can send a new *.exp file and the other person can make a *.dae from it
: old *.exp (that were created based on a 30 fps setting) needs to be [[#Animating|scaled down]] by a factor of 2
* currently removed the features made in version 6 (hopefully we will not need that any longer)
'''version 6'''
<!--[[Image:xsi_addon_repair_character_rotation.png|thumb|200px|right|repair rotation flips]]-->
* repair major character rotation flips (beta)
** select a body part and set keyframe range and flip amount
** fine-tune problematic zones by hand
'''version 5'''
* pathfinding manager (alpha: ghosts can be created on edges)
* trigger volume manager (plus BINACJBOTrigger Volume'''.oni''' drag'n'drop support)
* bugfix: flag xml code
'''version 4'''
* flag manager (plus BINACJBOFlag'''.oni''' drag'n'drop support)
* "(un)hide" button works now properly
'''version 3'''
* weapon manager (plus BINACJBOWeapon'''.oni''' drag'n'drop support)
* disables transparency on weapon textures
* button to access OniXSI resources folder
* fixes glitchy PPGs (manager windows sometimes switched from "locked" to "refresh" mode, etc.)
'''version 2'''
* better support for future custom resources (check out the readme files in OniXSI resources folder)
** for example new LSIs can be added at ...\Softimage\Softimage_Mod_Tool_7.5\OniXSI_resources\PowerUps\LSI
'''version 1'''
* powerups manager (plus BINACJBOPowerUp'''.oni''' drag'n'drop support)
** LSIs gets imported with a placeholder geometry (there's no easy way to detect what actual LSI is used for a level)
** using LSIs from the manager works though (just keep in mind that levels are fixed to one type of LSI)
* drag'n'drop support for OniSplit update
'''todo list'''
* addon to make easily use of onisplit within Mod Tool [done]
** supports drag and drop of onisplit [done]
* import/export of flag collection [done]
* import/export of patrol path collection
* import/export of powerup collection [done]
* import/export of trigger volumes [done]
* import/export of weapons collection [done]
* semi-automatic BNV and ghost creation
* easy use of marker_textures
* [...]
<!--
pushed back
* camera OBAN: DnD import / export
-->
These points are less certain. Maybe they will be added, maybe not.
* making loops from parts of animations
* copying animation data from one character to another
=====New camera animations=====
{| border=0 cellpadding=0 style="float: right;"
| last frame of OBANOutroCam02<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/Mod_Tool/camera_OBAN_examination_zpsaf16d39e.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/Mod_Tool/camera_OBAN_examination_tn_zpsc8295474.png]
|}
There's already an excel macro available but now I want to build cam anims without excel.
The last frame's rotation of level1_Final file OBANOutroCam02 is: -0.0158410165 0.854542 0.0261086561 -0.518483639.
Those quaternions are sorted in X Y Z -W order, so we've to watch out a bit when setting the input for converting them to euler rotations in degrees.
If a newly created object (in this case a cube) shall serve as camera placeholder then the X output has to be multiplied by -1 and the Y output has to be reduced by -180. Those changes must repeated again when exporting the object's rotation to xml.
'''Update: Sept. 29, 2012'''
If camera is a real one then the additional X and Y changes aren't necessary. (Primitive > Camera > ''any should do'')
Positions and rotations keyframes can be applied to the camera root object.
=====Adding multiple textures to level geometry=====
Material and textures are normally stored right under the object. But AKEV geometry can have more than one texture. Here comes polygon clusters in to play.
An example:
set oCube = Application.ActiveProject.ActiveScene.Root.AddGeometry("Cube","MeshSurface")
SelectObj "cube", , True
SelectGeometryComponents "cube.poly[LAST]"
CreateCluster
AddToCluster "cube.polymsh.cls.Polygon, cube.poly[2-4]"
RemoveFromCluster "cube.polymsh.cls.Polygon, cube.poly[3]"
The cube has now a polygon cluster. More can be added. Each cluster must get its own material before a texture can be applied to the desired polygons.
[...]
=====TRBS-fitting TRMA creation=====
{| width="100%"
|valign="top"|
With the following code ...
* the objects get listed one after another (TRMA-ready)
* the textures get listed for TRMA and TXMP creation
* the texture sizes get checked to see if "-large" argument is necessary
One more idea is to add support for reflective textures.
Current status:
* http://youtu.be/RqSsXTzHTA8
* drag and drop [http://mods.oni2.net/system/files/Oni_Character_Helper_with_onisplit_dnd_updater_wip.zip add-on file] into Mod Tool to install it
* no LOD, no envmap support
|style="float:right"|
hexhound hierarchy
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/hexhound_hierarchy_zpsf32e971c.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/hexhound_hierarchy_tn_zpsd82230ce.png]
|}
if selection.count > 0 then
' any part could be selected, let's find the root body part
SelectNeighborObj selection(0), 4
' get all members including the pelvis
set bodyparts = '''selection(0).FindChildren( , , siMeshFamily)'''
for each member in bodyparts
logmessage "object name: " & member.name
if not typename(member.Material.CurrentImageClip) = "Nothing" then
logmessage "texture: " & member.Material.CurrentImageClip.source.filename.value
'logmessage "material: " & member.Material.name
'logmessage "shader: " & member.Material.shaders(0).name
logmessage "X: " & member.Material.CurrentImageClip.source.Parameters("XRes").Value
logmessage "Y: " & member.Material.CurrentImageClip.source.Parameters("YRes").Value
end if
logmessage "----------------------------------------------------------"
next
logmessage "counted body parts: " & bodyparts.count
else
logmessage "no object was selected"
end if
{{divhide|logmessage examples}}
' INFO  : object name: A
' INFO  : texture: C:\Users\RRM\Desktop\A.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: R
' INFO  : texture: C:\Users\RRM\Desktop\R.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: S
' INFO  : texture: C:\Users\RRM\Desktop\S.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: P
' INFO  : texture: C:\Users\RRM\Desktop\P.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: Q
' INFO  : texture: C:\Users\RRM\Desktop\Q.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: N
' INFO  : texture: C:\Users\RRM\Desktop\N.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: O
' INFO  : texture: C:\Users\RRM\Desktop\O.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: L
' INFO  : texture: C:\Users\RRM\Desktop\L.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: M
' INFO  : texture: C:\Users\RRM\Desktop\M.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: B
' INFO  : texture: C:\Users\RRM\Desktop\B.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: C
' INFO  : texture: C:\Users\RRM\Desktop\C.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: D
' INFO  : texture: C:\Users\RRM\Desktop\D.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: E
' INFO  : texture: C:\Users\RRM\Desktop\E.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: F
' INFO  : texture: C:\Users\RRM\Desktop\F.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: G
' INFO  : texture: C:\Users\RRM\Desktop\G.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: H
' INFO  : texture: C:\Users\RRM\Desktop\H.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: I
' INFO  : texture: C:\Users\RRM\Desktop\I.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: J
' INFO  : texture: C:\Users\RRM\Desktop\J.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : object name: K
' INFO  : texture: C:\Users\RRM\Desktop\K.tga
' INFO  : X: 512
' INFO  : Y: 512
' INFO  : ----------------------------------------------------------
' INFO  : counted body parts: 19
{{divhide|end}}




8,452

edits