RSS< Twitter< etc

Creating XMesh Loader From Existing Data

 

Introduction

In a XMesh Saver MX Video Tutorial, a 321 frames sequence of an animated Biped was saved to disk, combining its 31 meshes into one.

When the saving finished, an XMesh Loader was created automatically, including all necessary Material assignments.

But in practice, sometimes it might be necessary to create a completely new XMesh Loader object from the existing data, and the material created by the XMesh Saver has to be assigned to the XMesh Loader.

In the following Video Tutorial, we will look at the two possible ways to perform this - manually and automatically.

Creating An XMesh Loader From Existing Data Video Tutorial

The CREATE_XMesh_MultiWS31_.MS File

Here is the content of the MS file used in the video to recreate the XMesh Loader from the saved data: 

(
local theXMeshLoader = XMeshLoader()
local theXMeshLayer = LayerManager.getLayerFromName  "XMesh Loaders" 
if theXMeshLayer == undefined do theXMeshLayer = LayerManager.newLayerFromName "XMesh Loaders" 
theXMeshLayer.addnode theXMeshLoader 
theXMeshLoader.viewportSequenceID = 0 
theXMeshLoader.name = uniquename "XMesh_MultiWS31_" 
theXMeshLoader.enableViewportMesh = true 
theXMeshLoader.displayMode = 0 
theXMeshLoader.displayPercent = 5.0 
theXMeshLoader.limitToRange = true 
select theXMeshLoader 
theXMeshLoader.rangeFirstFrame = 0 
theXMeshLoader.rangeLastFrame = 320 
theXMeshLoader.viewportSequenceID = 0 
theXMeshLoader.proxySequence = "" 
theXMeshLoader.renderSequence = @"C:\Temp\xmeshes\XMESH_Biped_Bees_v001\Borislav\v0001\XMesh_MultiWS31_0000.xmesh" 
local theMatLibPath = @"C:\Temp\xmeshes\XMESH_Biped_Bees_v001\Borislav\v0001\XMesh_MultiWS31_.mat" 
if doesFileExist theMatLibPath do (
local theMatLib = loadTempMaterialLibrary theMatLibPath 
if theMatLib != undefined do theXMeshLoader.material = theMatLib[1] 
)
)