{"id":361,"date":"2018-10-09T22:40:30","date_gmt":"2018-10-09T22:40:30","guid":{"rendered":"https:\/\/www.xlsoft.com\/doc\/kudan\/?page_id=361"},"modified":"2018-10-18T00:58:37","modified_gmt":"2018-10-18T00:58:37","slug":"kudan-ar-toolkit-guide","status":"publish","type":"page","link":"https:\/\/www.xlsoft.com\/doc\/kudan\/kudan-ar-toolkit-guide\/","title":{"rendered":"Kudan AR Toolkit Guide"},"content":{"rendered":"<p>A comprehensive guide on how to use the toolkit to create AR content<\/p>\n<hr>\n<p>Kudan&#8217;s AR SDKs utilise a number of custom operations to improve performance on mobile devices. These include:<\/p>\n<ul>\n<li><code>.KARMarker<\/code>\u00a0marker set &#8211; This provide a way to store multiple images in a single file, useful for loading batches of markers all at once, or for reducing the overall file size.<\/li>\n<li><code>.armodel<\/code>\u00a0model file &#8211; This provides a lightweight, fast-loading model format, optimised for use on mobile devices.<\/li>\n<li>Video encoding &#8211; This allows us to convert high bitrate videos and optimise them for use in a mobile application.<\/li>\n<li>Alpha Videos &#8211; This provides a way to select chroma keyed PNG files to create a video that will show with an alpha channel using KudanAR.<\/li>\n<\/ul>\n<h2>Marker Conversion<\/h2>\n<p>The marker converter tool takes a selection of image files and creates a\u00a0<code>.KARMarker<\/code>file from them. This can be loaded in the KudanAR frameworks as a set of markers.<\/p>\n<p>To use the marker converter tool, open the\u00a0<code>Marker Converter<\/code>\u00a0tab and click the\u00a0<code>New<\/code>button, choose a name for the file, and click\u00a0<code>Save<\/code>. This will create a new AR Project and save a corresponding\u00a0<code>.ARProject<\/code>\u00a0file that can be opened by the toolkit. This will save your progress and allow you to edit your marker sets later.<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/1d92192-Toolkit-Marker-New-Set.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/1d92192-Toolkit-Marker-New-Set.png\" alt=\"Create a new Marker set\" \/><\/a><\/figure>\n<p>Create a new Marker set\n<\/p>\n<p>Next, click\u00a0<code>Add Marker<\/code>\u00a0and select an image file to add to this marker set. If you plan to scale nodes based on the marker&#8217;s size, it is a good idea at this point to make a note of the image&#8217;s dimensions. If you are using the Unity plugin, it is necessary to make a note of the image&#8217;s name \/ ID. Repeat this process as many times as desired. If you want to remove an image, make sure the image you want to remove is selected, then click the\u00a0<code>-<\/code>\u00a0icon at the bottom of the window. You can also uncheck the \u201cExport\u201d box so that it isn\u2019t included in the set when it is exported.<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/4ac7d8b-Toolkit-Marker-Add-Image.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/4ac7d8b-Toolkit-Marker-Add-Image.png\" alt=\"Add an image to the set\" \/><\/a><\/figure>\n<p>Add an image to the set\n<\/p>\n<p>Once you have added al your images, click\u00a0<code>Export<\/code>, choose a name and click\u00a0<code>Save<\/code>. You will now have a\u00a0<code>.KARMarker<\/code>\u00a0file with the specified name. This can be loaded into the Image Tracker in the KudanAR frameworks. For more information, see our\u00a0<a class=\"doc-link\" href=\"https:\/\/www.xlsoft.com\/doc\/kudan\/markers\/\" data-sidebar=\"markers\">Markers<\/a>\u00a0page for how to add\u00a0<code>.KARMarker<\/code>\u00a0files to the tracker in the native SDKs, and our\u00a0<a href=\"https:\/\/www.xlsoft.com\/doc\/kudan\/kudan-ar-toolkit-guide\/\">Unity Markers<\/a>\u00a0page for how to add one in the Unity Plugin.<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/dffa47f-Toolkit-Marker-Export.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/dffa47f-Toolkit-Marker-Export.png\" alt=\"Export the Marker set\" \/><\/a><\/figure>\n<p>Export the Marker set\n<\/p>\n<h2>3D Model Conversion<\/h2>\n<p>\nThe model converter tool takes a 3D model in\u00a0<code>.FBX<\/code>,\u00a0<code>.OBJ<\/code>\u00a0or\u00a0<code>.DAE<\/code>\u00a0format and creates a\u00a0<code>.armodel<\/code>\u00a0file from it. This can be loaded in the native KudanAR SDKs.<\/p>\n<div class=\"su-note\"  style=\"border-color:#c9d3d8;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#e3edf2;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n<h3 style=\"color:#5bc0de;\"><i class=\"fa fa-info-circle\" title=\"Info\"><\/i> Unity<\/h3>\n<p style=\"color: gray;\">\nYou don&#8217;t have to use the model converter tool to use models with Kudan&#8217;s Unity Plugin. Because Unity handles all the rendering, we simply hook into it, meaning that the plugin is compatible with every model type that Unity supports, and no conversion is necessary. Just drop the models directly into Unity&#8217;s assets like you normally would.<\/p>\n<\/div><\/div>\n<p>\nTo convert your existing 3D model to be compatible with the KudanAR SDKs, select the 3D Model tab within the Toolkit. Click\u00a0<code>Select 3D Model<\/code>\u00a0and select the model you wish to convert.<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/971ffe4-Toolkit-Model-Input.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/971ffe4-Toolkit-Model-Input.png\" alt=\"Select a model to convert\" \/><\/a><\/figure>\n<p>Select a model to convert\n<\/p>\n<p>\nNext, click\u00a0<code>Select Save Location<\/code>\u00a0and navigate to the directory you want to save your\u00a0<code>.armodel<\/code>\u00a0in.<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/734d202-Toolkit-Model-Save-Location.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/734d202-Toolkit-Model-Save-Location.png\" alt=\"Select a save location\" \/><\/a><\/figure>\n<p>Select a save location\n<\/p>\n<p>\nLastly, click\u00a0<code>Convert<\/code>. An\u00a0<code>.armodel<\/code>\u00a0file will appear in the specified save location.<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/153c6a1-Toolkit-Model-Convert.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/153c6a1-Toolkit-Model-Convert.png\" alt=\"Convert the model\" \/><\/a><\/figure>\n<p>Convert the model\n<\/p>\n<div class=\"su-note\"  style=\"border-color:#c9d3d8;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#e3edf2;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n<h3 style=\"color:#5bc0de;\"><i class=\"fa fa-info-circle\" title=\"Info\"><\/i> Android<\/h3>\n<p style=\"color: gray;\">\nIn Android, you&#8217;ll need to make sure your\u00a0<code>.armodel<\/code>\u00a0does not get compressed when the app is built, otherwise it can&#8217;t be loaded properly and may cause a crash. To do this, either rename the extension of the model file to\u00a0<code>.jet<\/code>\u00a0or add a\u00a0<code>noCompress<\/code>\u00a0block to your\u00a0<code>build.gradle<\/code>.<\/p>\n<\/div><\/div>\n<div class=\"su-note\"  style=\"border-color:#c9d3d8;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#e3edf2;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n<h3 style=\"color:#5bc0de;\"><i class=\"fa fa-info-circle\" title=\"Info\"><\/i> Windows<\/h3>\n<p style=\"color: gray;\">\nIn the Windows toolkit, when converting your model, you will have an option in the save window to save it either as a\u00a0<code>.armodel<\/code>\u00a0or as a\u00a0<code>.jet<\/code>\u00a0file.\u00a0<em>ALWAYS USE\u00a0<code>.armodel<\/code><\/em>. If you want to use the\u00a0<code>.jet<\/code>\u00a0method for avoiding Android compression, make a\u00a0<code>.armodel<\/code>\u00a0and rename it.\u00a0<em>DO NOT USE THE\u00a0<code>.jet<\/code>OPTION<\/em>. It does not work correctly at present and the framework will fail to import your model.<\/p>\n<\/div><\/div>\n<p>\nThe new file will have the same name as the original, but it will have the\u00a0<code>.armodel<\/code>file extension.<\/p>\n<p>For more information on models using Kudan, as well as how to load your model into an AR application, see our\u00a0<a class=\"doc-link\" href=\"https:\/\/www.xlsoft.com\/doc\/kudan\/3d-models\/\" data-sidebar=\"3d-models\">3D Models<\/a>\u00a0page.<\/p>\n<h2>Video Encoding<\/h2>\n<p>\nThe Video Encoder tool will allow you to encode your high bitrate videos into a format that is more optimised for use on mobile devices, reducing file size and improving performance.<\/p>\n<p>Kudan&#8217;s AR engine renders at 30fps, for example, so it is of no use having a video that is of a higher framerate. High bitrate videos are also bloated with data that most mobile devices cannot display. Unnecessary data and extra frames are stripped from the video to considerably reduce the size of the file.<\/p>\n<p>To encode your video with the Toolkit, select the\u00a0<code>Video Encode<\/code>\u00a0tab. Click\u00a0<code>Select Video<\/code>\u00a0and open the file you wish to process. The file path of the video will be displayed, along with its dimensions.<\/p>\n<div class=\"su-note\"  style=\"border-color:#c9d3d8;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#e3edf2;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n<h3 style=\"color:#5bc0de;\"><i class=\"fa fa-info-circle\" title=\"Info\"><\/i> Supported File Types<\/h3>\n<p style=\"color: gray;\">\nThe latest version of the toolkit supports encoding\u00a0<code>.mp4<\/code>,\u00a0<code>.mov<\/code>,\u00a0<code>.avi<\/code>\u00a0and\u00a0<code>.mkv<\/code>\u00a0files.<\/p>\n<\/div><\/div>\n<div class=\"su-note\"  style=\"border-color:#c9d3d8;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#e3edf2;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n<h3 style=\"color:#5bc0de;\"><i class=\"fa fa-info-circle\" title=\"Info\"><\/i> Video Dimensions<\/h3>\n<p style=\"color: gray;\">\nFor the encoder to function correctly, please ensure your video&#8217;s height and width are both divisible by 2.<\/p>\n<\/div><\/div>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/5cf000b-Toolkit-Video-Select-Video.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/5cf000b-Toolkit-Video-Select-Video.png\" alt=\"Select a Video\" \/><\/a><\/figure>\n<p>Select a Video\n<\/p>\n<p>Next, click\u00a0<code>Select Output<\/code>\u00a0to choose a save location for your new video.<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/d09766f-Toolkit-Video-Save-Location.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/d09766f-Toolkit-Video-Save-Location.png\" alt=\"Select a save location\" \/><\/a><\/figure>\n<p>Select a save location\n<\/p>\n<p>\nOnce you have selected your input file and output location, you can also change the frame rate of the video. You will be able to select one of the following options:<\/p>\n<ul>\n<li>Same as source<\/li>\n<li>20<\/li>\n<li>25<\/li>\n<li>30<\/li>\n<\/ul>\n<p>If one of these options does not appear, it means your input file has a lower frame rate than that option. For example, if you have a 24fps video, then you will only see the\u00a0<em>Same as source<\/em>\u00a0and\u00a0<em>20<\/em>\u00a0options. The tool will not allow you to encode your file at a framerate that is higher than that of the source, because doing so would worsen the quality of the video.<\/p>\n<p>Once you&#8217;re happy with the options you&#8217;ve selected, simply click\u00a0<code>Encode<\/code>. Your input file will be processed and the result will be saved in the same format as the input file and with the same name.<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/b6b3f66-Toolkit-Video-Encode.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/b6b3f66-Toolkit-Video-Encode.png\" alt=\"Encode your video\" \/><\/a><\/figure>\n<p>Encode your video\n<\/p>\n<h2>Alpha Video Creation<\/h2>\n<p>\nThe Alpha Video tool allows you to select chroma keyed PNG files to create a video that will render with an alpha channel within KudanAR.<\/p>\n<p>To create an Alpha Video, select the\u00a0<code>Alpha Video<\/code>\u00a0tab. Click\u00a0<code>Select Images<\/code>\u00a0under\u00a0<code>Input<\/code>\u00a0to load a number of\u00a0<code>.png<\/code>\u00a0files, the paths of which will be displayed in the main window.<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/64daa26-Toolkit-Alpha-Select-Images.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/64daa26-Toolkit-Alpha-Select-Images.png\" alt=\"Load your image frames\" \/><\/a><\/figure>\n<p>Load your image frames\n<\/p>\n<p>\nYou can then select both a source and target FPS for your video. These determine the overall &#8220;speed&#8221; of your video, which you can alter in order to better showcase your content. Ideally, if you have set up your images to play as a specific frame rate, both these values will be the same.<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/9ef57ff-Toolkit-Alpha-FPS.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/9ef57ff-Toolkit-Alpha-FPS.png\" alt=\"Select the source and target FPS\" \/><\/a><\/figure>\n<p>Select the source and target FPS\n<\/p>\n<p>\nOnce you&#8217;re happy with your settings and the images you have selected, you can click\u00a0<code>Select Output<\/code>\u00a0to choose a save location for the output, then click\u00a0<code>Process<\/code>\u00a0to create your Alpha Video.<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/663ddc9-Toolkit-Alpha-Select-Output.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/663ddc9-Toolkit-Alpha-Select-Output.png\" alt=\"Select an output save location\" \/><\/a><\/figure>\n<p>Select an output save location\n<\/p>\n<p><figure><a class=\"block-display-image-parent block-display-image-size-smart \" href=\"https:\/\/files.readme.io\/42215f1-Toolkit-Alpha-Process.png\"><img decoding=\"async\" src=\"https:\/\/files.readme.io\/42215f1-Toolkit-Alpha-Process.png\" alt=\"Process your Alpha Video\" \/><\/a><\/figure>\n<p>Process your Alpha Video\n<\/p>\n<div class=\"su-note\"  style=\"border-color:#c9d3d8;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#e3edf2;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n<h3 style=\"color:#5bc0de;\"><i class=\"fa fa-info-circle\" title=\"Info\"><\/i> Empty File<\/h3>\n<p style=\"color: gray;\">\nIf the encoder returns a file with a size of 0 Bytes, it has created a new file but encountered an error when processing the frames.<\/p>\n<p>Please ensure that both the height and width of each of your selected images is divisible by 2.<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A comprehensive guide on how to use the toolkit to create AR content Kudan&#8217;s AR SDKs utilise a number of custom operations to improve performance on mobile devices. These include: .KARMarker\u00a0marker set &#8211; This provide a way to store multiple images in a single file, useful for loading batches of markers all at once, or &#8230; <a title=\"Kudan AR Toolkit Guide\" class=\"read-more\" href=\"https:\/\/www.xlsoft.com\/doc\/kudan\/kudan-ar-toolkit-guide\/\">Read more<span class=\"screen-reader-text\">Kudan AR Toolkit Guide<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"bekko_page_header":""},"_links":{"self":[{"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/pages\/361"}],"collection":[{"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/comments?post=361"}],"version-history":[{"count":9,"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/pages\/361\/revisions"}],"predecessor-version":[{"id":1355,"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/pages\/361\/revisions\/1355"}],"wp:attachment":[{"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/media?parent=361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}