Crystal Space
Welcome, Guest. Please login or register.
November 18, 2017, 08:20:38 pm

Login with username, password and session length
Search:     Advanced search
9081 Posts in 2051 Topics by 80411 Members
Latest Member: Uyomkew
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Game Content Creation
| | |-+  Could not load cal3d model using viewmesh
« previous next »
Pages: [1] Print
Author Topic: Could not load cal3d model using viewmesh  (Read 4400 times)
Posts: 39

View Profile
« on: February 20, 2008, 05:38:08 am »

Hello all,

I am attempting to load a model that was created using Blender 3D and exported to cal3d format. When I attempt to load the model an error message is displayed.

crystalspace.spritecal3dfactoryloader.parse.badfile: Could not load cal3d skeleton file <hydrant_dirty.csf>.
[node: meshfact(name=hydrant_dirty),params,skeleton]

After clicking the Ok button I receive another pop up message.

crystalspace.mesh.sprite.cal3d: Cal3d: No error found in (-1

I have placed the model in the following path: C:\CS\data\cal3d_models\hydrant

In that directory I have the following files:

This is the contents of my hydrant_dirty.cal3d file.

<!-- The meshfact name is the CS name used to create
     instances of this object. -->
<meshfact name="hydrant_dirty">

<!-- The plugin line specifies the plugin to use to parse
     the succeeding 'params' tag. -->

  <options rotate_x_axis="no" flip_textures="no" />

  <!-- Path specifies the OS-dependent directory path to
       where all the other files are located. (optional) -->
  <path dir="/model/hydrant/" />

  <!-- The cally model is much too large. -->
  <scale value="0.25" />

  <!-- Specify cal3d skeleton file used by model. -->
  <skeleton file="hydrant_dirty.csf"/>

  <!-- Animations specify the filename to load, and the
       CS-accessible name of this animation.  The type attribute
       is used to distinguish various types of animations.
       Recognized types are "idle", "travel", "cycle",
       "style_cycle", and "action". base_vel specifies the
       speed of translation which should be used when the
       animation is playing alone.  min_vel and max_vel are
       used by the blender to achieve a specified desired
       velocity.  min_random and max_random are interval to be
       used in idle override actions, in seconds.  idle_pct is a
       number between 0 and 100, which is the % probability
       of that action being the override action. -->
  <!-- None Specified Right Now -->

  <!-- Materials are VFS filenames because they are CS
       materials and not cal3d materials. (optional) We
       can not use the real .xrf files because CS can't load
       that format.  -->
  <material file="/model/hydrant/textures/hydrant_dirty.png" name="skin" />

  <!-- Meshes specify each attachable part of the model.
       The name is the CS-accessible name which will be used
       to select/deselect it for the model.  The material
       specified is the default CS material used by this
       mesh.  -->
  <mesh file="hydrant_dirty.cmf" name="hydrant_dirty" material="/model/hydrant/textures/hydrant_dirty.png" />

  <!-- The following rotates the model and all animations around
       the Y axis by 180 degrees.  Any axis and angle may be
       specified, and translation may also be specified. -->
    rot_angle="270" />
    rot_angle="180" />

I have placed and entry in vfs.cfg to provide the correct location to the cal3d data for this model to the virtual file system:
VFS.Mount.model/beach_ball = $@data$/cal3d_models$/hydrant$/

I'm not sure where I'm going wrong. I have read this page ( that suggests that the skeleton name is incorrect. Maybe I'm blind and don't see something obvious. Some help getting this model loading in viewmesh would be much appreciated.

Thanks in advance!
Posts: 39

View Profile
« Reply #1 on: February 21, 2008, 05:42:22 am »

OK, I found the culprit in my .cal3d file that was causing my grief. I still don't know why but when I find out I'll post again.

I simply commented out this line and I could view my model in viewmesh

<path dir="/model/hydrant/" />

Well... now that I just suspected my entry into the vfs.cfg file... I should have noticed the glaring mistake that is posted in my original message.

VFS.Mount.model/hydrant = $@data$/cal3d_models$/hydrant$/

works much better than

VFS.Mount.model/beach_ball = $@data$/cal3d_models$/hydrant$/

So much for copy, paste and modify.

Embarrassing, but solved.
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.628 seconds with 15 queries.