#author("2024-09-18T05:49:02+00:00","default:iseki","iseki") #author("2024-09-19T02:30:48+00:00","default:iseki","iseki") * OAR Converter for Unity/UE [#w9a5caae] ** Overview - This system converts from [[OAR]] of OpenSim to [[Collada]] / [[OBJ]] / [[glTF]] (glb) files for [[Unity]] / [[UE>Unreal_Engine]]. - This software was developed by [[Fumi Iseki>Fumi.Hax]], ''[[Austin Tate>http://www.aiai.ed.ac.uk/~bat/]]'', Daichi Mizumaki and Kohe Suzuki -- Copyright (c) 2014 - 2024 Fumi.Iseki, Austin Tate, D.Mizumaki and K.Suzuki, All rights reserved. ([[OARConvWin]] is from 2015) -- Blog of introductions by Austin: https://blog.inf.ed.ac.uk/atate/2024/06/10/oar-converter/ - Latest Version is v1.8.x - [[Howto Build Unity Appli >./Unity]] (our Memo) *** for MS Windows [#j6251fd6] - MS Windows UI is available. Please see ''[[OARConvWin]]''. ** Change Log [#n096cc75] - [[Change Log of Old Version>./Change Log]] *** v1.8.x **** v1.8.3 (2024/09/18) - implemented a function to expand OAR file for Regions with region names that contain characters that cannot be used as file names -- stop using tar32.dll -- stop using tar32/64.dll **** v1,8,2 (2024/09/15) - add handling of cases where objects with and without joints are mixed - GLTFAutoCollider.cs v1.1.1 for Unity **** v1.8.0 (2024/09/06) - support [[glTF/glb>glTF]] file output - support PNG image file - support UE5 Bug for glTF/glb with skeleton. - fixed some bugs ** Feature *** Functions. [#wc153255] | Normal Prim | OK | | | Sculpted Prim | OK | | | Mesh | OK |Textures are limited to 32 pieces | | Tree & Grass | Middling |Linden Tree is not supported. Some planar objects are used as substitutes. | | Flexible Prim | Middling | Become a normal object | | Terrain | Middling |Terrain Texture is not well | | Var Region | OK | | | Mega Region | Middling |Regions of non-root useless | | Avatar/NPC | No | | | Script/Particle System | No | | | Media | No | | | Water | No |Water level of Terrain will be 0m | | Others | No | | *** Bugs or Limitations [#l7c6d7ff] **** oarconv - %%Planar Texture is not supported.%% - Bumpmap Texture is not supported. **** Unity [#r79cdfe6] - Unity3D does not read some parameters from collada file. ex. light, glow, %%specular, bright%%. - %%コライダー設定(物理設定)は読み込まれない.%% **** Collada [#v0cf8b88] - Collada does not support ''BumpMap'' -- oarconv treats BumpMap as extra tag. ** Attentions [#u6c728fc] *** Functions Sorry Japanese Text - 全てのデータが問題なく変換できる訳ではありません.正確に変換できないオブジェクトがあります. - 最大限の変換効果を得るには,エディタ拡張の [[SelectOARShader>https://github.com/MTSGJ/oarconv/blob/main/Unity/Editor/SelectOARShader.cs]] を経由して Unityにインポートする必要があります. - その他,こちらで把握していない問題点が多数存在するものと思われます. - SL Viewer は真に偉大なソフトウェアです (とても真似できん!) **** Not Support (そもそもコーディングしていない機能) [#y0a5b55f] - サーポートしていないシェーディング方法があります(バンプマップ,スペキュラマップなど). - アバターはサポートしていません. - フレキシブルプリム,リンデンツリーはサポートしていません. - スクリプト(パーティクルシステム)はサポートしてません. - 水面・水中はサポートしていません.Unityのアセットを使用してください. **** Known Bugs (能力限界) [#g556f6ad] - テクスチャが(正確に)読み込めない場合があります. - アルファチャネルが正確に表示されない場合があります(アルファブレンディングなど). - 一部テクスチャが正確に貼り付けられない場合があります(チューブプリムの側面など). *** glTF/glb support **** for Common - %%A Texture folder is created when outputting a glb file, but this is for work purposes and can be deleted.%% **** for Unity - glTFast is used for import. - SelectOARShader.cs is not started when glTFast is used (because glTFast takes up the process) -- Shader settings are specified to some extent inside glTF/glb files. -- Since SelectOARShader.cs does not automatically select collider, GLTFAutoCollider.cs is added instead. **** for UE5 - UE 5.3/5.4 can also drag & drop as-is (.gltf, .glb files only) -- Check the “Combine Static Meshe” checkbox in the “Static Mesh” section when importing. -- If the “Are you sure you want to override asset Message” dialog box pops up frequently during import, hold down the ESC key (there may be another solution). - Do not use the OARSelectMaterial plugin, as it does not work properly. - Collider is set manually at import (the beginning of the file name is UCP_: with collider, UNC_: without collider) - When importing glTF/glb files with skeleton information, UE5 does not follow the glTF2.0 standard (*). In this case, OARConverter outputs a glTF/glb file that does not conform to the glTF2.0 standard in order to ensure that UE5 reads the data. -- (*) In glTF 2.0, matrix property is not required or should be ignored if skin property exists in node data, but in UE5, matrix property is required (depending on model structure) even if skin property exists. -- If you want to get the same general glTF/glb files with skeleton information, please output those for Unirty. ** Download [#bdedc2b4] *** Source Code - https://github.com/JunkBox-Library/JunkBox_Libpp - https://github.com/JunkBox-Library/JunkBox_Win_Lib - https://github.com/MTSGJ/oarconv ** Demos [#m41bf72b] *** WebGL - http://blackjack.nsl.tuis.ac.jp/unity/TUIS_NM/ TUIS with Unity Chan - http://blackjack.nsl.tuis.ac.jp/unity/TUIS_HW/ with Halloween Unity Chan - http://blackjack.nsl.tuis.ac.jp/unity/TUIS_SD/ with SD Unity Chan - http://blackjack.nsl.tuis.ac.jp/unity/TUIS_TWIN/ with Unity Chan and SD Unity Chan - http://blackjack.nsl.tuis.ac.jp/unity/Marineville/ with ILTan (Data from [[Austin Tate>http://www.aiai.ed.ac.uk/~bat/]]) - http://blackjack.nsl.tuis.ac.jp/unity/OpenVCE/ with Naka-Chan (Data from [[Austin Tate>http://www.aiai.ed.ac.uk/~bat/]]) *** Youtube - https://youtu.be/AOnfXmVD5uM (v1.6.0) - https://youtu.be/LUhqNJHLCuM (v1.2.0) - https://youtu.be/eOd5Vsb85q4 (v1.0.0) *** Videos at BlackJack - https://blackjack.nsl.tuis.ac.jp/video/PronamaChan_are_go.mp4 (v1.7.x with Joints) - https://blackjack.nsl.tuis.ac.jp/video/OARConvWin1.6.0_UE_Demo.mp4 (v1.6.0) ** Download [#f6b9aa88] - OAR Converter needs ''[[JunkBox_Lib]]'': https://github.com/JunkBox-Library/JunkBox_Lib - OAR Converter Source Code: https://github.com/MTSGJ/oarconv *** ''[[for MS Windows Binary>OARConvWin]] '' - [[OARConvWin-1.8.3.zip>https://blackjack.nsl.tuis.ac.jp/Download/Release/OARConverter/OARConvWin-1.8.3.zip]] - [[OARConvWin-1.7.12.zip>https://blackjack.nsl.tuis.ac.jp/Download/Release/OARConverter/OARConvWin-1.7.12.zip]] - [[OARConvWin-1.6.0.zip>https://blackjack.nsl.tuis.ac.jp/Download/Release/OARConvWin-1.6.0.zip]] - [[OARConvWin-1.5.0.zip>https://blackjack.nsl.tuis.ac.jp/Download/Release/OARConvWin-1.5.0.zip]] ** Compile of Source Code [#t5fa69f9] *** Needed External Libraries [#zd40935b] **** zlib devel package - If you can use yum command, please execute ''yum install zlib-devel'' command. # dnf install zlib-devel -y **** [[OpenJpeg2>OpenJpeg]] - https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz # wget https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz # tar zxfv version.2.5.tar.gz # cd openjpeg-version.2.5 # cmake . # make # make install *** JunkBox Library and OAR Converter - OAR Converter needs JunkBox Library <pre> # git clone https://github.com/JunkBox-Library/JunkBox_Lib.git # cd JunkBox_Lib # ./config.sh # ./configure --enable-jpeg --enable-openjpeg=/usr/local:2.5 # make # cd C++Lib # make # cd ../.. # git clone https://github.com/MTSGJ/oarconv # cd oarconv # make </pre> ** Usage [#o31ca9b8] **** Example [#h438d24d] - Show help message % oarconv -h - You will get collada files in ./DAE directory. % mkdir OAR % cd OAR % tar zxfv (any directory)/oarfile.oar % cd .. % oarconv -i OAR -o DAE - convert only xxxx.xml object. % oarconv -i OAR -o DAE -f OAR/objects/xxxx.xml - convert only terrain data % oarconv -i OAR -o DAE -e 0 - get a STL file of one object % oarconv -i ABYSS -o STL -f ABYSS/objects/Venus_428-154-3720__e633f42c-abb2-498b-aadb-ea6781506f98.xml -b - support joint for DAE % oarconv -i OAR -a /usr/local/opensim/bin/assets/TexturesAssetSet:./assets --dae --unity --joint - support Wavefront OBJ file for UE # oarconv -i OAR -a /usr/local/opensim/bin/assets/TexturesAssetSet:./assets --obj --ue --dg -d **** Help message [#a90ff5f4] oarconv [-i OAR_directory] [-o output_directory] [-a adding_assets_directories_that_separated_by_':'] [-f object_xml_file] [-t terrain_texture_scale] [-c external_convert_command_of_jp2] [-s start_no.] [-e end_no.] [-x shift_of_x_direction] [-y shift_of_y_direction] [-z shift_of_z_direction] [--oar OAR_file] [--dae | --obj | --gltf | --glb | --stl] [--unity | --ue] [--dg | --nooffset] [--joint] [-d] [-v] [-h | --help] -i : specify OAR directory. default is ./ -o : specify output directory. default is DAE/ -f : specify object xml file. only specified file is converted. -a : specify adding assets directories that separated by ':'. default is /usr/local/share/oarconv/assets/:./assets/ -t : specify Terrain texture scale. default is 7.000000 -c : specify external convert command from jp2 to other image. default is "/usr/local/bin/j2k_to_image -i "%s" -o "%s" >/dev/null 2>&1" -s : specify start number of xml file. default is 0. -e : specify end number of xml file. count from zero. default is -1 (minus number means infinity). -x : specify shift of x direction of all objects. default is 0.0 -y : specify shift of y direction of all objects. default is 0.0 -z : specify shift of z direction of all objects. default is 0.0 --oar : specify OAR file. The -i option has priority. --dae : output Collada DAE file(s). --obj : output Wavefront OBJ file(s). --gltf: output glTF file(s). --glb : output glb file(s). --stl : output STL ASCII file(s). --unity : for Unity Engine. --ue : for Unreal Engine. --dg : degenerate shift data to the origin. --tga : use TGA file as texture. --png : use PNG file as texture. (default) --nooffset : same for --dg --joint : Process Joints -d : debug mode. display debug information. -v : display version information. -h : display this help messages. --help : display this help messages. ex.) oarconv -i OAR -a /usr/local/opensim/bin:./assets --dae --unity --joint --tga ex.) oarconv -i OAR -a /usr/local/opensim/bin/assets/TexturesAssetSet:./assets --obj --ue --dg -d ex.) oarconv -i OAR -s 0 -e 0 --dae --unity # output terrain data only ** Trouble Shooting [#s3f53a84] **** Error messages: "OARTool::ConvertTexture: ERROR: texture ..... convert error (-21, 127)." [#s73c3046] - OpenJpeg v1.x can not convert those textures. Please install OpenJpeg v2.x, too. ** License [#t9bbafac] - OAR Converter is provided under the following BSD type license. <pre> License of OAR Converter OAR Converter Copyright (c) 2014-2016 Fumi.Iseki, Austin Tate, D.Mizumaki and K.Suzuki, https://www.nsl.tuis.ac.jp/ All rights reserved. BSD 3-Clause License Copyright (c) 2023, Metaverse Technology Study Group of Japan Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </pre> *** Exemption from responsibility. [#i7a1fccc] This software is not guaranteed at all. The author doesn't assume the responsibility for the problem that occurs along with use, remodeling, and the re-distribution of this software at all. Please use everything by the self-responsibility. *** Address of thanks. [#g24aa86c] - This system uses the source code and resource of OpenSim in part. see also http://opensimulator.org/ - This system uses the source code of OpenMetaverse in part. see also http://openmetaverse.org/ - This system uses OpenJpeg command and library. see also http://www.openjpeg.org/ - This system uses zlib library. http://www.zlib.net/ - Thank you very much for all contributors!! *** [[Memos of Development>./devel]] [#i9436202] #br