Crystal Space
Welcome, Guest. Please login or register.
July 26, 2017, 06:04:56 am

Login with username, password and session length
Search:     Advanced search
9007 Posts in 2045 Topics by 64855 Members
Latest Member: Sherbojames484
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Game Content Creation
| | |-+  Blender2Crystal - textures not showing on RUN
« previous next »
Pages: [1] Print
Author Topic: Blender2Crystal - textures not showing on RUN  (Read 5755 times)
Posts: 3

View Profile WWW Email
« on: June 08, 2006, 06:23:15 pm »

Blender 2.41

I successfully export and run a world using Blender 2.41.? Of course, without putting textures on my meshes, I get the checkerboard texture look in walktest.? That's ok, because I didn't apply textures yet.

Soooo, from there, I tried to apply textures to my map using the UV editor.? (from a wiki article on blender2crystal).? The textures get applied successfully, and I can see them in my textured windows in Blender.? However, after running the exporter, my walktest command window says, for example, "could not open image file "textures/tex.jpg" on vfs!"? ..and the image of course does not show and I get the checker default image applied instead.

I'm thinking for some reason the blender2crystal exporter is not putting the texture in the vfs, or zip file for the world.? Any thoughts on how to fix this, or do I have the exporter not configured right?

"A waist is a terrible thing to mind."

« Reply #1 on: June 08, 2006, 10:29:01 pm »

There are several ways to resolve that, for example
if your file is in
put textures in
Posts: 3

View Profile WWW Email
« Reply #2 on: June 09, 2006, 12:36:25 pm »

Here is what I figured out last night --

After selecting the image to put on the face, I have to selet the "Pack/Unpack" icon in the UV editor.  Then, I had to select it again, and choose "Create //texture/tex1.jpg."  Seems like this puts it into the VFS.  Runs and looks great now.


"A waist is a terrible thing to mind."
Posts: 39

View Profile
« Reply #3 on: July 05, 2006, 04:58:47 am »


I have been having the same exact problem; however, I tried what you state you did and it didn't work for me. If you wouldn't mind reviewing my steps and possibly point out what I might have missed, it would be very helpful!

Mesh already made
UVs unwrapped
Texture made

In this case, my mesh is a beach ball.

Steps taken in Blender:
  • UV Face Select - select mesh
  • UV/Image Editor - Image -> Open... -> [textures\beach_ball_texture.png]
  • Click 'Open Image' button
  • Click 'Pack/Unpack this image' button (the button that looks like a wrapped up gift/package)
  • Click 'Pack/Unpack this image' button again
  • Select 'Create //textures/beach_ball_texture.png' from the 'UnPack file' select menu

The following entry is in my vfs.cfg file:
VFS.Mount.model/beach_ball = $@data$/cal3d_models$/beach_ball$/

The following is in my beach_ball.cal3d file:
<!-- The meshfact name is the CS name used to create instances of this object. -->
<meshfact name="beach_ball">

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

  <!--options rotate_x_axis="yes" flip_textures="no" /-->

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

  <!-- Scale the cally model. -->
  <scale value="0.25" />

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

  <!-- The cal3d mesh file used by the model. -->
  <mesh file="beach_ball.cmf" name="body" material="/model/beach_ball/textures/beach_ball_texture.png" />

The code used to load the model:
// Load a SpriteCal3D Mesh Object
csRef<iVFS> VFS(CS_QUERY_REGISTRY(object_reg, iVFS));

// beach ball
csRef<iMeshFactoryWrapper> imeshfact (loader->LoadMeshObjectFactory("/model/beach_ball/beach_ball.cal3d"));

if(imeshfact == 0)
csReport(object_reg, CS_REPORTER_SEVERITY_ERROR, "crystalspace.application.g_environment", "Error loading mesh object factory!");
return false;

csRef<iMeshWrapper> sprite =
            engine->CreateMeshWrapper(imeshfact, "beach_ball", engine->GetSectors()->FindByName("room"), csVector3(0, 2, 5));

Path to texture:

Your help is very much appreciated!!!

Blender 2.41
« Last Edit: July 05, 2006, 05:35:21 pm by willjm » Logged
Posts: 39

View Profile
« Reply #4 on: July 05, 2006, 06:01:09 pm »

I really think that the problem I'm having is less about the exporting and more about the VFS.

I replaced

<mesh file="beach_ball.cmf" name="body" material="/model/beach_ball/textures/beach_ball_texture.png" />


<mesh file="beach_ball.cmf" name="body" material="/lib/std/green.gif" />

and the gif is applied to my beach_ball mesh in the application.

My model is in - C:\CS\data\cal3d_models\beach_ball\beach_ball.blend
My texture is in - C:\CS\data\cal3d_models\beach_ball\textures\beach_ball_texture.png

My cal3d .csf file is in - C:\CS\data\cal3d_models\beach_ball\beach_ball.csf
My cal3d .cmf file is in - C:\CS\data\cal3d_models\beach_ball\beach_ball.cmf
My cal3d .crf file is in - C:\CS\data\cal3d_models\beach_ball\beach_ball.crf

I attempted to map the C:\CS\data\cal3d_models\beach_ball directory to /model/beach_ball/ by modifing the vfs.cfg file with VFS.Mount.model/beach_ball = $@data$/cal3d_models$/beach_ball$/.

If my texture is in the textures directory wouldn't defining the material in my mesh tag as /model/beach_ball/textures/beach_ball_texture.png work?
I'm not getting any errors stating that it can't find the image.

Can anyone please help me with this problem? I'm trying to get my thesis done and the problems I've been having with exporting models either in Blender or in MilkShape have caused me tremendous set backs.
Posts: 39

View Profile
« Reply #5 on: July 06, 2006, 05:27:08 am »

Ok, I need to rephrase... I've been having a different problem. I say this because I'm not getting the message, "could not open image file "textures/tex.jpg" on vfs!". I have been getting no message, which would indicate that the texture does get loaded. All I get is a grey ball mesh. This leads me to go back to wondering if this is an exporting problem. Here's a screenie of what I'm looking at.

Just for kicks I'll toss up what the command window has for output. Maybe something in there will have a clue to my problem that I'm missing.

WARNING: 'Saveable' flag not set in engine. Saved worlds can be incomp

  GL driver: atioglxx.dll

  Applied: Work around broken ATI point sprites
  Applied: ATI: Can't handle GL_BLEND texenv for GL_INTENSITY textures

  Applied: ATI: Can't handle compressed formats for RECT textures
  Applied: ATI: RECT texture extension support apparently sucks
  Applied: ATI: Use AFP for some 2D drawing

  OpenGL renderer: FireMV 2400 PCI DDR x86/SSE2 (vendor: ATI Technolog
  Inc.) version 1.3.1030 Win2000 Release
  Using windowed mode at resolution 640x480.
  Pixel format: Color: 32 Alpha: 8 Depth: 24 Stencil: 8 AccumColor: 0
  AccumAlpha: 0 MultiSamples: 0

  VSync is disabled.
        loading definitions file /aws/windows_skin.def...
        load successful (0 windows, 1 skins loaded.)
        loading definitions file /varia/viewmesh.def...
        load successful (1 windows, 0 skins loaded.)
        loading definitions file /aws/stddlg.def...
        load successful (1 windows, 0 skins loaded.)
aws-debug: setting up global AWS palette...
aws-debug: finished palette setup.

  Lightmaps are not up to date (no 'lm_precalc_info' found in cache).
  Recalculation of lightmaps forced.
  Initializing lighting (1 meshes).
  Shining lights (3 lights).
  Time taken: 0.0170 seconds.

  Multitexture units: acceptable 6
cd data
cd cal3d_models
cd beach_ball

Chances are darek is right about your particular case krolrules. When you exported your mesh, did you change the 'image prefix'? If you didn't then it was looking for the texture in a texture sub-directory within the directory where your scene.blend file was located. So, when you clicked on the 'Pack/Unpack' button and selected 'Create //texture/tex1.jpg' it should have created the texture sub-directory for you. In addition to that it should have placed the image within that directory. This is probably why your issue was resolved.

- willjm
« Last Edit: July 06, 2006, 05:38:04 am by willjm » Logged
Posts: 39

View Profile
« Reply #6 on: July 11, 2006, 03:51:38 am »

Ok, I figured it out! What I think happened was I created the texture and did the UV mapping. I ended up changing the texture. I erased the link to the texture by pressing the 'Clear' button and deleted the texture. I then opened my new image and did the mapping again. Everything looked fine except when I exported it. Well after fishing around I went into Object mode, pressed the 'Shading' button and then the 'Material buttons'. I decided to try to add a texture since I didn't see one there. I then clicked on the 'Map Input' tab and clicked the 'UV' and 'Flat' buttons. From there I clicked on the 'Texture buttons' and selected 'Image' in the 'Texture Type' select box. I then clicked the 'Load Image' button, found my texture and loaded it. Then, my 'Preview' pane showed my texture. I then clicked the 'Material buttons' button again and the texture was in the 'Preview' pane there too. I decided to save it and then export it. I started the viewmesh Crystal Space application, loaded my model and it was finally textured.

It took me a little while, but I'm just happy that I finally got it!
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 8.466 seconds with 16 queries.