Jump to content

Mod Tool: Difference between revisions

6,318 bytes removed ,  22 January
Update notice w/ summary
mNo edit summary
(Update notice w/ summary)
Tags: Mobile edit Mobile web edit
 
(63 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==General information==
{{update|This article contains links to the now defunct Oni Central Forum. Sections: Selected Wisdom}}
Various modders of the community use [http://www.moddb.com/downloads/autodesk-softimage-mod-tool-75 "Autodesk Softimage Mod Tool"]. Usually we just call it "Mod Tool" or "XSI" (old name of the program).
Autodesk's Mod Tool used to be the main choice for modders when working on level and character models (at least in Windows, since it's Windows-only). It was a free and accessible program, but has long since been discontinued. Nowadays, modders are encouraged to use [[Blender]] instead.
 
{| class="wikitable" style="float:right;"
Beside the free version, there's also the retail and student version "Autodesk Softimage [year]"
|width="200px"|
: Those versions are also available as 64-bit versions.
;sub pages
: If you are a student you can get Autodesk Software for free if your school is a partner of Autodesk.
: [[Mod_Tool/Scripting]]
:: In that case you can register with your email address given by your school.
: [[Mod_Tool/Rigging]]
 
: [[Mod_Tool/OniTools_addon]]
But in the very most cases "Mod Tool" isn't really in disadvantage towards the retail version when it comes to modding Oni.
: [[Mod_Tool/Oni_level_rebuilder]]
|}


There's also the possibility to get files that extent Mod Tool's range of functions.
==Installation==
: Those are scripts (.vbs, .js), toolbars (.xsitb) and addons (.xsiaddon).
Full name: "Autodesk Softimage Mod Tool". Usually we just call it "Mod Tool" or "XSI", the old name of the program.
: They can be created on one's own and also shared with other users.


'''Download'''
* '''Get it from [https://www.moddb.com/downloads/autodesk-softimage-mod-tool-75 Mod DB].'''
* It's no longer possible to download Softimage from Autodesk because the [https://www.autodesk.com/products/softimage/overview software was discontinued] by Autodesk in favor of their major software packages Maya and 3ds Max.


'''Wanted knowledge:'''
'''Newer Windows installations usually require .NET 2.0 to be installed before the XSI installer can fully run.'''
* How to setup particle in Mod Tool? We still need an Oni particle editor!
: Downloading and installing .Net 2.0 manually from the internet might not work.
* How to rig models and then extract the animation data?
: '''Therefore use the Windows search and look for "features".''' (Enable/disable Windows features.)
: From the Windows feature page install '''".NET framework 3.5 (includes .NET 2.0 and 3.0)"'''.


There are various ways to extend Mod Tool's range of functions: scripts (.vbs, .js), toolbars (.xsitb) and addons (.xsiaddon). They can be created on one's own and also shared with other users.


==Extensions==
===Extensions===
'''links'''
'''links'''
* [http://www.si-community.com/community/viewtopic.php?f=35&t=796 "Roadkill" UV Tool]
* [https://www.si-community.com/community/viewtopic.php?f=35&t=796 "Roadkill" UV Tool]
* [http://www.xsidatabase.com/content/drag_and_drop_obj_files_jscript drag and drop support for OBJ files]  
* [http://web.archive.org/web/20121001104022/http://www.xsidatabase.com:80/content/drag_and_drop_obj_files_jscript drag and drop support for OBJ files]  
* [http://www.si-community.com/community/viewtopic.php?f=35&t=797 OBJ exporter]
* [https://www.si-community.com/community/viewtopic.php?f=35&t=797 OBJ exporter]
* [http://mods.oni2.net/node/210 OBJ + OFGA exporter] for Oni
* [http://mods.oni2.net/node/210 OBJ + OFGA exporter] for Oni
** might need the regular OBJ exporter to be installed first
** might need the regular OBJ exporter to be installed first
* [http://mods.oni2.net/node/210 adjusting existing fw throws] [http://www.youtube.com/watch?v=Zcbv7y5HvRI (instructions)]
* [http://mods.oni2.net/node/210 adjusting existing fw throws] [https://www.youtube.com/watch?v=vDTPYfvMf4M (instructions)]
* ''put more links here''




Line 54: Line 58:




'''[http://softimage.wiki.softimage.com/sdkdocs/cus_addons_WalkthroughBuildinganAddon.htm building add-ons]'''
'''building add-ons (<nowiki>http://softimage.wiki.softimage.com/sdkdocs/cus_addons_WalkthroughBuildinganAddon.htm</nowiki>, dead link)'''
* Building an add-on file needs more effort than the other 'extensions' but for the end user it's best because it can hold all other files: toolbars, plugins (scripts), etc.
* Building an add-on file needs more effort than the other 'extensions' but for the end user it's best because it can hold all other files: toolbars, plugins (scripts), etc.
** The user can install a newer version of the addon by repeating the installation with the new file: it's unnecessary to remove the old version.
** The user can install a newer version of the addon by repeating the installation with the new file: it's unnecessary to remove the old version.
Line 146: Line 150:
  end if
  end if
  end function
  end function


==Selected wisdom==
==Selected wisdom==
We've also a [http://oni.bungie.org/community/forum/viewtopic.php?id=1229 tutorial thread on OCF.]
We've also a [http://oni.bungie.org/forum/viewtopic.php?id=1229 tutorial thread on OCF.]


Hotkey list can be found [http://www.keyxl.com/aaacbe0/415/SoftImage-XSI-keyboard-shortcuts.htm here].
Hotkey list can be found [http://www.keyxl.com/aaacbe0/415/SoftImage-XSI-keyboard-shortcuts.htm here].
Line 189: Line 192:
** B) goto Model > Modify > Poly. Mesh > Bridge Boundary Points/Edges (if blue lines appear try to disable the checkbox "Angle > 90")
** B) goto Model > Modify > Poly. Mesh > Bridge Boundary Points/Edges (if blue lines appear try to disable the checkbox "Angle > 90")
* merging two objects at blue lines: merge the objects at first, then proceed with the point above "filling a hole"
* merging two objects at blue lines: merge the objects at first, then proceed with the point above "filling a hole"
* '''merging two objects with UVs''': Create > Poly. Mesh > [http://cryrid.com/images/temp/XSI/merge_materials.jpg Merge]
* '''merging two objects with UVs''': Create > Poly. Mesh > [https://web.archive.org/web/20160225163131/http://cryrid.com/images/temp/XSI/merge_materials.jpg Merge]
** extracted Oni characters have their materials and hence textures directly grouped under the mesh (see Explorer)
** extracted Oni characters have their materials and hence textures directly grouped under the mesh (see Explorer)
** when adding (merging) a new part to the existing mesh, the materials/textures will be grouped under (Explorer again) mesh > Polygon Mesh > Clusters > ...
** when adding (merging) a new part to the existing mesh, the materials/textures will be grouped under (Explorer again) mesh > Polygon Mesh > Clusters > ...
** Samer reported that saving the file via fbx solves a problem when trying to convert TRBS
** Samer reported that saving the file via fbx solves a problem when trying to convert TRBS
** one would need to [http://www.youtube.com/watch?v=Sd09YP_Bl9M&t=1m15s move the content by hand] in the explorer to bypass the fbx
** one would need to move the content by hand in the explorer to bypass the fbx
* hiding some objects/polygons: select object/polygon and hit [H], use [Control] + [H] to unhide all
* hiding some objects/polygons: select object/polygon and hit [H], use [Control] + [H] to unhide all
* mirroring an object: select object, Modify > Poly. Mesh > Symmetrize Polygons
* mirroring an object: select object, Modify > Poly. Mesh > Symmetrize Polygons
Line 245: Line 248:


===Material and texture===
===Material and texture===
[[Image:apply_new_main_texture_in_Mod_Tool.png|thumb|200px|right|how to apply a new main texture]]
[[Image:apply_new_polygon_cluster_texture_in_Mod_Tool.png|thumb|200px|right|how to apply a new polygon cluster texture]]
* objects use the scene material by default, objects need their own material if they should have individual textures
* objects use the scene material by default, objects need their own material if they should have individual textures
* selecting a material and surface: Model > Material > Phong (simply close the windows that pops up)
* selecting a material and surface: Model > Material > Phong (simply close the windows that pops up)
Line 254: Line 259:
** choose "diffuse" as illumination mode (for instance "ambient" won't work - the texture would be visible in Mod Tool but Onisplit can't use it)
** choose "diffuse" as illumination mode (for instance "ambient" won't work - the texture would be visible in Mod Tool but Onisplit can't use it)
* now "Image" can be double-clicked (the Texture Editor will pop up), in the section "Image" click on "New" to choose an image
* now "Image" can be double-clicked (the Texture Editor will pop up), in the section "Image" click on "New" to choose an image
* to change textures '''don't drag and drop textures directly one meshes''', this creates textures layers which are ignored by OniSplit




Line 278: Line 284:


Things to test:
Things to test:
* http://vimeo.com/67783125
* https://vimeo.com/67783125
 
 
===Rendering===
Rendering doesn't work well on my PCs.--[[User:Paradox-01|paradox-01]] ([[User talk:Paradox-01|talk]]) 01:09, 9 March 2016 (CET)
 
Especially PNG, it works one time. But as soon as I import another dae the next render will fail.
 
 
So, for creating a object library we might use blender. Nice thing is, it can also render in the background when called from CMD. This means you could keep working in XSI and render images in blender at the same time.
 
 
example of a batch file:
cd C:\Program Files\Blender Foundation\Blender
blender -b --python C:\Users\Paradox-01\Desktop\blender-out\pythonScript.py
 
 
example of a render script:
import bpy
# delete blender default cube object
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_by_type(type='MESH')
bpy.ops.object.delete(use_global=False)
# load new object
bpy.ops.wm.collada_import(filepath = "C:/Oni/r.dae")
# render settings
bpy.data.scenes['Scene'].render.resolution_x = 900
bpy.data.scenes['Scene'].render.resolution_y = 900
# default resolution percentage seems to be 50
bpy.data.scenes['Scene'].render.resolution_percentage = 100
bpy.data.scenes['Scene'].render.use_antialiasing = True
# 5 | 8 | 11 | 16
bpy.data.scenes['Scene'].render.antialiasing_samples = "8"
#TGA IRIS JPEG MOVIE IRIZ RAWTGA
#AVIRAW AVIJPEG PNG BMP FRAMESERVER
#no gif ? could be created by more code, maybe merging single frames of jpgs
bpy.data.scenes['Scene'].render.image_settings.file_format = 'JPEG'
bpy.data.scenes['Scene'].render.image_settings.quality = 100
# file suffix is overwritten by file_formate
#bpy.data.scenes['Scene'].render.filepath = 'C:/Oni/renders/test.jpg'
bpy.data.scenes['Scene'].render.filepath = 'C:/Oni/renders/test'
# start render
bpy.ops.render.render( write_still=True )




Line 372: Line 426:
Open the animation mixer with [Alt]+[0].
Open the animation mixer with [Alt]+[0].


Further information over [http://softimage.wiki.softimage.com/xsidocs/nla_mixer.htm#Rdw10200 HERE.]
Further information over [http://web.archive.org/web/20170103065301/http://softimage.wiki.softimage.com/xsidocs/nla_mixer.htm#Rdw10200 HERE.]


Here are a few videos:
Here are a few videos:
* '''http://www.youtube.com/watch?v=-xC31Q7zpM0'''
* '''https://www.youtube.com/watch?v=-xC31Q7zpM0'''
* http://www.youtube.com/watch?v=njLrAIpDOFU
* https://www.youtube.com/watch?v=njLrAIpDOFU
* http://www.youtube.com/watch?v=PRDZaEo5CGo
* https://www.youtube.com/watch?v=PRDZaEo5CGo




Line 383: Line 437:
Within the animation mixer also sounds can be added.
Within the animation mixer also sounds can be added.


Further information over [http://softimage.wiki.softimage.com/xsidocs/audio_LoadingAudioFilesintheAnimationMixer.htm#Rdy36984 HERE.]
Further information over [http://web.archive.org/web/20170102120711/http://softimage.wiki.softimage.com/xsidocs/audio_LoadingAudioFilesintheAnimationMixer.htm#Rdy36984 HERE.]


This could be used to synchronize sounds effect with physical actions in the scene.
This could be used to synchronize sounds effect with physical actions in the scene.
Line 403: Line 457:


'''Links'''
'''Links'''
* [http://softimage.wiki.softimage.com/index.php?title=Scripting_Tips_and_Tricks_%28XSISDK%29 xsi wiki page about scripting]
* [http://web.archive.org/web/20160803061035/http://softimage.wiki.softimage.com/index.php?title=Scripting_Tips_and_Tricks_%28XSISDK%29 xsi wiki page about scripting]
* '''[http://softimage.wiki.softimage.com/sdkdocs/scriptsdb/scriptsdb/scrdb_vbscript.htm many vbscript examples]'''
* '''[http://web.archive.org/web/20170616035120/http://softimage.wiki.softimage.com/sdkdocs/scriptsdb/scriptsdb/scrdb_vbscript.htm many vbscript examples]'''
* '''[http://ss64.com/vb/ vbs commands]'''
* '''[https://ss64.com/vb/ vbs commands]'''
* [http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/filesfolders/files/ objFSO/objWSHShell: Scripts to manage Files] (replace "Wscript.Echo" with "logmessage")
* [https://web.archive.org/web/20070510173452/https://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/filesfolders/files/ objFSO/objWSHShell: Scripts to manage Files] (replace "Wscript.Echo" with "logmessage")
* [http://activexperts.com/activmonitor/windowsmanagement/adminscripts/other/textfiles/ objFSO/objWSHShell: Scripts to manage Text Files]
* [https://web.archive.org/web/20150504221146/http://activexperts.com/activmonitor/windowsmanagement/adminscripts/other/textfiles/ objFSO/objWSHShell: Scripts to manage Text Files]
* [http://www.kxcad.net/Softimage_XSI/Softimage_XSI_Documentation/script_basics_IncludingExternalScripts.htm using external scripts]
* [http://web.archive.org/web/20080905102848/http://www.kxcad.net/softimage_xsi/Softimage_XSI_Documentation/script_basics_IncludingExternalScripts.htm using external scripts]
* [http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_om/XSIUIToolkit.html,topicNumber=si_om_XSIUIToolkit_html progress bar and open file dialog<!-- (hm, InitialDirectory code for quick save idea ?)-->]
* [https://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_om/XSIUIToolkit.html,topicNumber=si_om_XSIUIToolkit_html progress bar and open file dialog<!-- (hm, InitialDirectory code for quick save idea ?)-->]
<!--* [http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=files/cus_ppg_FileBrowserWidget.htm,topicNumber=d30e11980,hash=WS34BA39B437A993419C80CAB58E3BEFA1-0059 text box]-->
<!--* [http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=files/cus_ppg_FileBrowserWidget.htm,topicNumber=d30e11980,hash=WS34BA39B437A993419C80CAB58E3BEFA1-0059 text box]-->


Line 429: Line 483:


* The commands are not case-sensitive, e.g. you can write "LogMessage" or "logmessage".
* The commands are not case-sensitive, e.g. you can write "LogMessage" or "logmessage".
* Vbs functions can be found [http://www.w3schools.com/vbscript/vbscript_ref_functions.asp HERE.]
* Vbs functions can be found [https://web.archive.org/web/20150707131602/https://www.w3schools.com/vbscript/vbscript_ref_functions.asp HERE.]


  ' while it is possible to use + in strings,
  ' while it is possible to use + in strings,
Line 486: Line 540:
| Logs the object name.
| Logs the object name.
|-
|-
| logmessage selection(0).Material.Name
| logmessage selection(0).Materials(0).Name
| Logs the material name.
| Logs the material name.
|-
|-
|valign=top| logmessage selection(0).Material.CurrentImageClip.source.filename.value
| logmessage selection(0).Materials(0).Library.name
| Logs the material library name.
|-
| logmessage selection(0).Materials(0).shaders(0).name
| Logs the material shader (e.g. phong).
|-
|valign=top| logmessage selection(0).Materials(0).CurrentImageClip.source.filename.value
| Logs absolute path of the texture. Output example:
| Logs absolute path of the texture. Output example:
: ''C:\Users\RRM\Desktop\TV_tex.png''
: ''C:\Users\RRM\Desktop\TV_tex.png''
|-
|-
|valign=top| logmessage selection(0).Material.CurrentImageClip.source.Parameters("XRes").Value<br>logmessage selection(0).Material.CurrentImageClip.source.Parameters("YRes").Value
|valign=top| logmessage selection(0).Materials(0).CurrentImageClip.source.Parameters("XRes").Value<br>logmessage selection(0).Material.CurrentImageClip.source.Parameters("YRes").Value
| Logs the horizontal (X) and vertical (Y) pixel length of the texture. Output example:
| Logs the horizontal (X) and vertical (Y) pixel length of the texture. Output example:
: ''512''
: ''512''
Line 523: Line 583:
: ToggleSelection "grid2,grid3"
: ToggleSelection "grid2,grid3"
|-
|-
|valign=top| [http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_cmds/SelectAllUsingFilter.html,topicNumber=si_cmds_SelectAllUsingFilter_html SelectAllUsingFilter] <nowiki>[SelFilter], [CheckComponentVisibility], [AffectSelectionList], [CheckObjectSelectability]</nowiki>
|valign=top| [https://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_cmds/SelectAllUsingFilter.html,topicNumber=si_cmds_SelectAllUsingFilter_html SelectAllUsingFilter] <nowiki>[SelFilter], [CheckComponentVisibility], [AffectSelectionList], [CheckObjectSelectability]</nowiki>
|Selects everything that matches the filter and other options. Example:
|Selects everything that matches the filter and other options. Example:
: SelectAllUsingFilter "object", siCheckComponentVisibility  
: SelectAllUsingFilter "object", siCheckComponentVisibility  
Line 541: Line 601:
| Makes all changes final. But saving those changes is still necessary. (Click on key symbol so it gets red.)
| Makes all changes final. But saving those changes is still necessary. (Click on key symbol so it gets red.)
|-
|-
| [http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_cmds/Translate.html,topicNumber=si_cmds_Translate_html Translate] <nowiki>[InputObjs], [X], [Y], [Z], [Delta], [RefMode], [Center], [AxesFilter], [Snap], [SnapReference], [SnapFilter], [SplitLocalComponents], [PropTagOnly], [Pivot], [PivotX], [PivotY], [PivotZ], [ConstructionMode], [SlideComponents]</nowiki>
| [https://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_cmds/Translate.html,topicNumber=si_cmds_Translate_html Translate] <nowiki>[InputObjs], [X], [Y], [Z], [Delta], [RefMode], [Center], [AxesFilter], [Snap], [SnapReference], [SnapFilter], [SplitLocalComponents], [PropTagOnly], [Pivot], [PivotX], [PivotY], [PivotZ], [ConstructionMode], [SlideComponents]</nowiki>
| see link
| see link
|-
|-
| [http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_cmds/Rotate.html,topicNumber=si_cmds_Rotate_html Rotate] <nowiki>[InputObjs], [X], [Y], [Z], [Delta], [RefMode], [Center], [AxesFilter], [Reference], [SplitLocalComponents], [PropTagOnly], [Pivot], [PivotX], [PivotY], [PivotZ], [ConstructionMode], [SlideComponents]</nowiki>
| [https://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_cmds/Rotate.html,topicNumber=si_cmds_Rotate_html Rotate] <nowiki>[InputObjs], [X], [Y], [Z], [Delta], [RefMode], [Center], [AxesFilter], [Reference], [SplitLocalComponents], [PropTagOnly], [Pivot], [PivotX], [PivotY], [PivotZ], [ConstructionMode], [SlideComponents]</nowiki>
| see link
| see link
|}
|}
Line 553: Line 613:


If you see absolute paths adapt them so that the code works on your system too.
If you see absolute paths adapt them so that the code works on your system too.
([[Mod_Tool/Scripting|Here]]'s another page for math related code pieces.)


{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
Line 606: Line 668:
| [38] fbx export
| [38] fbx export
| [39] import an image clip only once
| [39] import an image clip only once
|-
| [40] layers
| [41] onisplit update
| [42] get vertex color
|-
| [43] get all used textures
| [44] get global point position
|
|}
|}


Line 865: Line 935:
  ' '''[8] message box'''
  ' '''[8] message box'''
   
   
  [http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_om/XSIUIToolkit.MsgBox.html,topicNumber=si_om_XSIUIToolkit_MsgBox_html msgbox] "message", , "title"
  [https://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_om/XSIUIToolkit.MsgBox.html,topicNumber=si_om_XSIUIToolkit_MsgBox_html msgbox] "message", , "title"




Line 904: Line 974:
  ' '''[13] reading out environment variables'''
  ' '''[13] reading out environment variables'''
   
   
  ' some infos about env vars: [http://softimage.wiki.softimage.com/xsidocs/config_envirovars.htm (1)], [http://softimage.wiki.softimage.com/xsidocs/EnvVars_SettingandUsingEnvironmentVariables.htm (2)], [http://softimage.wiki.softimage.com/xsidocs/EnvVars_EnvironmentVariableReference.htm (3)]
  ' some infos about env vars: [http://web.archive.org/web/20170309190841/http://softimage.wiki.softimage.com/xsidocs/config_envirovars.htm (1)], [http://web.archive.org/web/20180416194626/http://softimage.wiki.softimage.com/xsidocs/EnvVars_SettingandUsingEnvironmentVariables.htm (2)], [http://web.archive.org/web/20170617095054/http://softimage.wiki.softimage.com/xsidocs/EnvVars_EnvironmentVariableReference.htm (3)]
  ' those variables are stored inside the setenv.bat, two disadvantages:
  ' those variables are stored inside the setenv.bat, two disadvantages:
  ' adding or editing those vars appears to not work in vbs or I just did it wrong
  ' adding or editing those vars appears to not work in vbs or I just did it wrong
  ' anyway, new vars can only be read out after app restart
  ' anyway, new vars can only be read out after app restart
  ' therefore let's concentrate on reading out existing ones and then how to create our own via txt files (example: [https://dl.dropbox.com/u/139715/OniGalore/ModToolScript/Oni_env_vars.txt Oni_env_vars.txt])
  ' therefore let's concentrate on reading out existing ones and then how to create our own via txt files (example: <nowiki>https://dl.dropbox.com/u/139715/OniGalore/ModToolScript/Oni_env_vars.txt Oni_env_vars.txt</nowiki> (dead link))
  ' code for reading out:
  ' code for reading out:
  logmessage XSIUtils.ResolvePath("$SI_HOME/")
  logmessage XSIUtils.ResolvePath("$SI_HOME/")
Line 936: Line 1,006:
     logmessage "created folder " & strDirectory
     logmessage "created folder " & strDirectory
  End If
  End If
' ### or simply:
dir = "C:\test"
XSIUtils.EnsureFolderExists (dir)




Line 1,098: Line 1,172:




' '''[] remove xml nodes'''


  ' '''[19] create txt file + write lines'''
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
Dim XMLFile
XMLFile = "C:\Softimage\Softimage_Mod_Tool_7.5\OniLevels\ONLV\test\ONLVAirport.xml"
objXMLDoc.load(XMLFile)
Set nodes = objXMLDoc.selectNodes("Oni/CRSA/*")
For Each node In nodes
    node.parentNode.removeChild(node)
Next
objXMLDoc.Save(XMLFile)
 
 
  ' '''[19] create txt file + write lines'''
   
   
  txt_location = "C:\Softimage\Softimage_Mod_Tool_7.5\test.txt"
  txt_location = "C:\Softimage\Softimage_Mod_Tool_7.5\test.txt"
Line 1,178: Line 1,267:
  ' alternative to cmd: call onisplit via winmgmts
  ' alternative to cmd: call onisplit via winmgmts
   
   
  ' slightly modified code from [http://blogs.technet.com/b/heyscriptingguy/archive/2006/12/08/how-can-i-start-a-process-and-then-wait-for-the-process-to-end-before-terminating-the-script.aspx that site]
  ' slightly modified code from [https://devblogs.microsoft.com/scripting/how-can-i-start-a-process-and-then-wait-for-the-process-to-end-before-terminating-the-script/ that site]
  ' ''logmessage "onisplit finished."'' will be executed after the conversion finished, there should be also an delay of 3 seconds to support very slow computers  
  ' ''logmessage "onisplit finished."'' will be executed after the conversion finished, there should be also an delay of 3 seconds to support very slow computers  
  ' if you are going to use this method consider to extent the code to check if input file and output directory exist
  ' if you are going to use this method consider to extent the code to check if input file and output directory exist
Line 1,207: Line 1,296:




{| border=0 cellpadding=0 style="float:right"
[[Image:XSI_Mod_Tool_PPG.png|thumb]]
| [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XSI_modding/PPG_zpsda38090b.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XSI_modding/PPG_tn_zps84e07fe6.png]
|}


  ' '''[23] building a form (PPG)'''
  ' '''[23] building a form (PPG)'''
Line 1,288: Line 1,375:




{| border=0 cellpadding=0 style="float:right"
[[Image:XSI_Mod_Tool_UserDataBlob.png|thumb]]
| [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/UserDataBlob.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/UserDataBlob_tn.png]
|}


  ' '''[24] UserDataBlob'''
  ' '''[24] UserDataBlob'''
Line 1,508: Line 1,593:
  ' '''[33] getting bounding box values'''
  ' '''[33] getting bounding box values'''
   
   
  ' this could be useful to create a bounding box for [[OBD_talk:OFGA#XML|OFGA files]]
  ' this could be useful to create a bounding box for [[XML:OFGA|OFGA files]]
   
   
  ' let's get the bounding box of a simple cylinder
  ' let's get the bounding box of a simple cylinder
Line 1,531: Line 1,616:
   
   
  ' this could be used open an output folder ...
  ' this could be used open an output folder ...
  strPath = "[http://support.microsoft.com/kb/152457 explorer.exe /e]," & XSIUtils.ResolvePath("$SI_HOME/")
  strPath = "[http://web.archive.org/web/20150212074443/http://support.microsoft.com/kb/152457 explorer.exe /e]," & XSIUtils.ResolvePath("$SI_HOME/")
  Set objShell = CreateObject("Wscript.Shell")
  Set objShell = CreateObject("Wscript.Shell")
  objShell.Run strPath
  objShell.Run strPath
Line 1,539: Line 1,624:




{| border=0 cellpadding=0 style="float: right; padding-top: 10px"
[[Image:XSI_Mod_Tool_SelectNeighborObj_obj_5.png|thumb|SelectNeighborObj obj 5]]
| SelectNeighborObj obj 5<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XSI_modding/SelectNeighborObj_obj_5.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XSI_modding/SelectNeighborObj_obj_5_tn.png]
|}
  ' '''[35] working with hierarchies'''  
  ' '''[35] working with hierarchies'''  
   
   
Line 1,650: Line 1,733:
  logmessage XSIUtils.ResolvePath("$XSI_HOME/") & "Application\DSScripts\Model.vbs"
  logmessage XSIUtils.ResolvePath("$XSI_HOME/") & "Application\DSScripts\Model.vbs"
  ' C:\Softimage\Softimage_Mod_Tool_7.5\Application\DSScripts\'''Model.vbs'''
  ' C:\Softimage\Softimage_Mod_Tool_7.5\Application\DSScripts\'''Model.vbs'''
A backup of the original file can be found '''[https://dl.dropboxusercontent.com/u/139715/OniGalore/ModToolScript/Model.vbs here.]'''
A backup of the original file can be found here: '''<nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/ModToolScript/Model.vbs</nowiki> (dead link)'''


There are two issues that can be fixed by modifying this file.
There are two issues that can be fixed by modifying this file.
Line 1,741: Line 1,824:




====Script ideas====
'''[40] layers'''
* Mod Tool addon
* character auto-rigger
* character exporter (TRBS/TRMA/TXMP)


The following sections feature some thoughts/code about those and other ideas.
[[Image:ModTool_layers.png|thumb|200px|right|how to access scene layers]]


To access scene layers switch from Main Control Panel (MCP) to Keying Panel/Layers (KP/L) and then click "Scene".


=====OniTools addon=====
After the user became used to layers, they can help to organize work in a scene. This is especially interesting for some scripting tasks like getting TRGV/FURN data for xml files.
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.]
' get current layer
GetCurrentLayer CurrentLayer
logmessage CurrentLayer




'''tips'''
' create a new layer named "FurnLayer" if it doesn't already exist
* while in point (vertex) mode, creating a flag/powerup/TV/weapon will move it to the selected point
' make new layer the current layer
* while in object mode, creating a flag/powerup/TV/weapon will spawn it at 0, 0, 0
if typename(ActiveProject.ActiveScene.Layers("FurnLayer")) = "Nothing" then
** check the ''point snap'' checkbox, then use move tool [V] with [Control] to move object to desired point
SICreateLayer , "FurnLayer", FurnLayer
SetCurrentLayer FurnLayer
else
SetCurrentLayer "Layers.FurnLayer"
end if




'''version roadmap'''
' get objects in FurnLayer and count objects
* v7.1 furniture: basic import (OFGA*.xml) & export (BINACJBOFurniture.xml)
' exit sub if there are no objects
* v7.2 turrets: basic import/export
SelectMembers "Layers.FurnLayer"
* v7.? furniture: advanced import (OFGA*.xml / BINACJBOFurniture.xml) & export (OFGA*.xml/.oni as new class, BINACJBOFurniture.xml)
if selection.count = 0 then
* v7.? turrets: advanced import/export
MsgBox "No OFGA data found to export.", , "Export canceled"
* ...
exit sub
* v8 final Oni Object Library
end if


' if there are Furn objects
for each obj in selection
' do something e.g. create xml
next


'''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)


' '''[41] onisplit update'''
' this downloads and unzips the last attachment from the [http://mods.oni2.net/node/38 onisplit page]
output_dir = "F:\test\"
' get onisplit link ################################################
set xmlhttp = createobject ("msxml2.xmlhttp.3.0")
xmlhttp.open "get", "http://mods.oni2.net/node/38/index.html", false
xmlhttp.send
<nowiki>webtext = xmlhttp.responseText
webtext = replace(replace(webtext, vbcr,""),vblf,"")
webtext = split(webtext, "<table class=""sticky-enabled""> <thead><tr><th>Attachment</th>" )(1)
webtext = split(webtext, "</td> </tr></tbody></table>") (0)</nowiki>
link_start = instrrev(webtext, "http")
link_end = instrrev(webtext, ".zip"" type") + 4 ' + zip
' mid (text, begin, length)
link = mid(webtext, link_start, link_end - link_start)
logmessage "last link in attachment: " & link
dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
dim bStrm: Set bStrm = createobject("Adodb.Stream")
xHttp.Open "GET", link, False
xHttp.Send
' get file name ###################################################
hdr = xHttp.getResponseHeader("Content-Disposition")
hdr = replace (hdr, "attachment; filename=""", "")
hdr = replace (hdr, """", "")
logmessage hdr
' save file #######################################################
filename = output_dir & hdr
with bStrm
.type = 1 '//binary
.open
.write xHttp.responseBody
.savetofile filename, 2 '//overwrite
end with
' extract file ####################################################
UnzipFile filename, output_dir
Function UnzipFile(ZipFile, ExtractTo)
Set fso = CreateObject("Scripting.FileSystemObject")
If NOT fso.FolderExists(ExtractTo) Then
fso.CreateFolder(ExtractTo)
End If
set objShell = CreateObject("Shell.Application")
set FilesInZip=objShell.NameSpace(ZipFile).items
objShell.NameSpace(ExtractTo).CopyHere(FilesInZip)
Set fso = Nothing
Set objShell = Nothing
End Function


'''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)


' '''[42] get vertex color'''
set oGeometry = selection(0).activeprimitive.geometry
set oTriangles = oGeometry.Triangles
for each oTriangle in oTriangles
    logmessage oTriangle.Name
    for each oVertex in oTriangle.Points
        set oColor = oVertex.Color
        logmessage vbTab & "RGBA(" & _
          oColor.red & "," & _
          oColor.green & "," & _
          oColor.blue & "," & _
          oColor.alpha & ")"
    next
next


'''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)


' '''[43] get all used textures'''
DeleteAllUnusedMaterials
DeleteUnusedImageClips
'DeleteUnusedImageSources
for each i in Application.ActiveProject.ActiveScene.ExternalFiles
if i.filetype = "Pictures" then
logmessage i
end if
next


'''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


' ''' [44] get global point position'''
set oObj = selection(0)
set oTrans = oObj.Kinematics.Local.Transform
set oPoint0 = oObj.ActivePrimitive.Geometry.Points(0)
set oPoint7 = oObj.ActivePrimitive.Geometry.Points(7)
set oPos0 = oPoint0.Position
set oPos7 = oPoint7.Position
' scaling must be frozen to 1 before we can calculate the size from local values
ResetTransform selection(0), siCtr, siScl, siXYZ
logmessage "local p0: "& oPos0.X & " " & oPos0.Y & " " & oPos0.Z
set oGlobalPos0 = XSIMath.MapObjectPositionToWorldSpace( oTrans, oPos0)
logmessage "global p0: "& oGlobalPos0.X & " " & oGlobalPos0.Y & " " & oGlobalPos0.Z
logmessage "local p7: "& oPos7.X & " " & oPos7.Y & " " & oPos7.Z
set oGlobalPos7 = XSIMath.MapObjectPositionToWorldSpace( oTrans, oPos7)
logmessage "global p7: "& oGlobalPos7.X & " " & oGlobalPos7.Y & " " & oGlobalPos7.Z
 
logmessage "size: " & oPos7.X - oPos0.X & " " & _
oPos7.Y - oPos0.Y & " " & _
oPos7.Z - oPos0.Z
' with a rotation of: -3,8792 16,4039 -13,5017
' INFO : local p0: -4 -4 -4
' INFO : local p7: 4 4 4
' INFO : global p0: -5,74764582364017 -3,00250371537919 -2,43916767056426 ' TRGV start point
' INFO : global p7: 5,74764582364017 3,00250371537919 2,43916767056426
' INFO : size: 8 8 8


'''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


===Interactive Creative Environment (ICE)===
* [[wikipedia:Autodesk_Softimage#ICE_Interactive_Creative_Environment|ICE]]


'''version 4'''
'''tutorials:'''
* flag manager (plus BINACJBOFlag'''.oni''' drag'n'drop support)
* https://www.youtube.com/watch?v=ioMQ2rBVO4g
* "(un)hide" button works now properly
* http://dot3d.blogspot.com/2009/10/softimage-ice-tree-building-step-by.html
* [https://www.si-community.com/community/viewtopic.php?f=41&t=1707 an ICE tutorial thread]
* [https://download.autodesk.com/global/docs/softimage2013/en_us/userguide/index.html?url=files/ICE_trees_DebuggingICETrees.htm,topicNumber=d30e269791 ICE trees Debugging]
* <nowiki>https://support.solidangle.com/display/SItoAUG/ICE</nowiki> (dead link)


==Wanted knowledge==
* How to set up particles in Mod Tool? We still need an Oni particle editor!
* How to rig models and then extract the animation data?
* How to make complex new UV maps?


'''version 3'''
[[Category:Modding tutorials]][[Category:Outdated modding tools]][[Category:Windows-only modding tools]]
* 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 [wip]
* import/export of weapons collection [done]
* semi-automatic BNV and ghost creation
* easy use of marker_textures
* [...]
<!--
pushed back
* Trigger volumes: import / add / export
* 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
 
 
=====Selection tracking camera=====
* https://dl.dropbox.com/u/139715/auto_selection_tracking.txt
 
' enable automatic tracking
set_auto_tracking ("yes")
' disable automatic tracking
set_auto_tracking ("no")
 
There could be other buttons to jump to previous/next object grouped under their parent.
SelectNeighborObj , 2
SelectNeighborObj , 3
 
 
=====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}}
 
 
=====New door animations=====
Final door animation depends on:
* BINACJBODOOR position and rotation
* OBAN positions and rotations
* ZAxisUp (Does this flag do something else?)
 
 
'''Theory of the (Oni to ModTool) import from scratch:'''
 
* import BINACJBODOOR
* get door classes
* extract M3GM from DOOR, etc.
 
* import M3GM
* move center to lower bounding box Z
* move object to Z = 0
* import OBAN
* apply rotations and positions to object
 
* create null object
* make null a parent of door object
* rotate null in X = -90 (to make Z axis pointing up)
* add BINACJBODOOR rotation and position to null object
 
The current version of onisplit (v0.9.68.0) imports the doors from AKEV without animations.
 
Those door have there centers at the lower bounding box Z, got corrected from their ZAxisUp, and have (BINACJBODOOR) rotation and position.
 
Writing an own combined import would not only take more time, also it wouldn't be so fast and efficient. So, I will go with the existing import but then do some changes on the doors (appling null object, custom properties, etc.)
 
The door objects can be identified by their naming. Each name contains the BINACJBODOOR ID, e.g. <DOOR Id="7294">.
 
There could be a loop scanning all objects for those numbers.
 
 
=====Hierarchy builder for characters=====
Based on old knowledge. See [[Mod_Tool#exchange_of_meshes_in_hierarchies|HERE]] for an easy manual way to change the meshes in hierarchies.
 
 
 
'''(old notes in the following)'''
 
{| border=0 cellpadding=0 style="float: right;"
| hierarchy breaker beta<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/hierarchy_breaker_beta.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/hierarchy_breaker_beta_tn.png]
|}
 
(Automatic rigging.) Maybe null objects could stand for the centers of body parts. Then one click and the real centers gets positioned. The [[User:Paradox-01/for_WIP_pages#Mod_Tool:_putting_a_character_together_while_preserving_body_part_positions|rotations are known]] and the names would lead to the correct hierarchy.
 
In order to make edits there is also a need of destroying the hierarchy again while preserving the rotation and position of the meshes.
 
 
code pieces
 
 
hierarchy breaker
* [https://dl.dropbox.com/u/139715/OniGalore/ModToolScript/hierarchy_breaker_beta.txt hierarchy_breaker_beta.txt] (works only with strict correct names)
 
 
hierarchy builder
* [https://dl.dropbox.com/u/139715/OniGalore/ModToolScript/delete_keyframes.txt delete_keyframes.txt] (deletes keys, saves and reloads character)
* [...]
 
 
'''Keyframe affects hierarchy building'''
 
situation: "cube" and "cube1" were created
 
* case 1:
** apply 45° y rotation to cube
** make cube1 a child of cube
** cube1 will not inherit the 45°
 
* case 2:
** apply 45° y rotation to cube
** make rotation keyframe for cube1
** make cube1 a child of cube
** cube1 inherit the 45°
 
* case 3:
** apply 45° y rotation to cube
** make rotation keyframe for cube1
** remove that keyframe again
** make cube1 a child of cube
** cube1 inherit the 45°
 
* case 4:
** apply 45° y rotation to cube
** make rotation keyframe for cube1
** remove that keyframe again
** save both cube to a dae file
** make new scene and load dae
** make cube1 a child of cube
** cube1 will not inherit the 45°
 
Case 1 might be a bug (case 4 is a variant of it) but it simplify the hierarchy creation.
 
 
While doing those test you can observe red letters next to the meshes in the Schematic window.
: A means the presence of keyframes. Removing the keyframe doesn't remove the A. Object must be saved and reloaded.
: D means that mesh center was changed by rotation or translation (center mode) or by clicking Transform > Freeze(...). D can be removed by clicking the normal Freeze button. Yea, whatever...
: C can be seen next to camera objects, present when Camera_Interest is horizontal attached to it.
 
[[Category:Windows-only modding tools]]
21

edits