Crystal Space
Welcome, Guest. Please login or register.
December 18, 2014, 12:28:04 pm

Login with username, password and session length
Search:     Advanced search
9032 Posts in 2046 Topics by 9288 Members
Latest Member: Lorrainewhite
* 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 3258 times)
willjm
Newbie
*
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.


Quote
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.


Quote
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:
hydrant_dirty.cal3d
hydrant_dirty.cmf
hydrant_dirty.crf
hydrant_dirty.csf
hydrant_dirty.cfg

This is the contents of my hydrant_dirty.cal3d file.

Code:
<!-- 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. -->
<plugin>crystalspace.mesh.loader.factory.sprite.cal3d</plugin>

<params>
  <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. -->
<!--
  <hardtransform
    rot_axis_x="1"
    rot_axis_y="0"
    rot_axis_z="0"
    rot_angle="270" />
  <hardtransform
    rot_axis_x="0"
    rot_axis_y="1"
    rot_axis_z="0"
    rot_angle="180" />
-->
</params>
</meshfact>

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:
Code:
VFS.Mount.model/beach_ball = $@data$/cal3d_models$/hydrant$/



I'm not sure where I'm going wrong. I have read this page (http://www.crystalspace3d.org/docs/online/manual/MeshObject-SprCal3D.html) 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!
Logged
willjm
Newbie
*
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

Code:
<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.

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

works much better than

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

So much for copy, paste and modify.

Embarrassing, but solved.
Logged
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 5.319 seconds with 16 queries.