Author Topic: Thenior's guide to exporting to Crystal space  (Read 2862 times)

Thenior

  • Hydlaa Resident
  • *
  • Posts: 78
    • View Profile
Thenior's guide to exporting to Crystal space
« on: December 03, 2004, 04:58:35 pm »
Introduction
All you devs out this will know this already. This is for everyone else... You can use this with any 3D program, as long as it can export to .obj. It is easy to get around this, but the this guide is dedicated to .OBJ.

Termology
UVs These are coordinates on a 3D object that indicate how a texture should wrap aroudn the 3D object.
Normals A poly only has one side. The side that you see is the way the normal is facing. If you were on one side, and the normal was facing the other way, it would appear that it was not there, but if you tried to run into it, you would stop ...

Exporting
First, Create your object fully UV mapped in your 3D software of choice. Now Export it to .OBJ. Open Blender, go to File->import->.OBJ.

Now select the model by right clicking it. It should Turn pink. Hit the F key. Now in the top left corner you should see a "I." Click it, and go to UV/Image Editor. Now just between the Menus and the 3d view, if you put your mouse there, the window resize cursor should popup.

Move the window down to reveal the UV editor. Go to Image->Open then find your desired Texture. To test things in Crystal Space, you must have the normals correct. You must have a cube room with normals pointing in, otherwise you will fall and fall. Where the Camera is, that is the starting point in the CS world. Put as many lights in there as you want also. the lights will always be the same type, even if you change it. It will sense the light color too. All the Cameras and lights must be made in Blender. Now that you have everything done, go to the place where the "I" was, and open the pull down menu, Select the I (user preferences). Go to File, save as. Save it in the Crystal space root Directory.

Now download blend2cs and save it in the CS dir. Now keep in mind you must have the compiled version of CS to do this. For instruction on how to compile, go the the crystalspace website www.crystalspace3d.com.

Now open the MSYS (in Windows) and change the dir to the cyrstal space root. Type ./blend2cs yourfile.blend outputfile. Your output file should be just world. Like ./blend2cs barn.blend world would be the way to save it as world. Now go to your CS root, go to Data/flarge. This is the way I do it. I reaplace the flarge info, but back it up first. stick the World files in there, and all the textures. Now do ./walktest -relight in MSYS. Everytime you change the file the -relight has to be added. if not change were done, and you just want to see the file again, just do ./walktest. There are MEL scripts for Maya users in cs/scripts/maya. I do not use it as I have Maya 3 and the scripts dont run in Maya 3 (yet).

Now, in the Crystal/data dir, you should be able to create a .zip with all the files in it (world and Texture files). Say you had a file called barn.zip, you could then type ./walktest barn.zip and it should execute, make sure all the files in the zip file are in the root of that zip file not in an additional subdirectory.

Hope this helps you users who want to play with Crystal Space.
Note: If your Crystal Space files that you make look funny, open them in Notepad, go to the bottom. The place where is says <zuse> change it to <zfill>, and vice versa. That should fix any problems you have



[Formatting fixed --Santiago]
« Last Edit: April 25, 2006, 09:54:58 pm by Santiago »

AKA Manadora

Thenior

  • Hydlaa Resident
  • *
  • Posts: 78
    • View Profile
(No subject)
« Reply #1 on: December 04, 2004, 06:12:15 am »
Could someone stick this in the Tech Forum or General or something.... this was a stupid place to put it....

AKA Manadora

Nikolia

  • Hydlaa Resident
  • *
  • Posts: 124
    • View Profile
(No subject)
« Reply #2 on: December 04, 2004, 07:08:18 am »
Good Job, this could be very usefull for some people
I think the Devs should make this a sticky :)

Moogie

  • Forum Legend
  • *
  • Posts: 4551
  • Artist/Flash Animator
    • View Profile
(No subject)
« Reply #3 on: December 11, 2004, 06:08:21 am »
This seems as good a place as any to sticky it. :) 3D is Art, after all.

Good work Thenior. :)

Thenior

  • Hydlaa Resident
  • *
  • Posts: 78
    • View Profile
(No subject)
« Reply #4 on: December 11, 2004, 07:07:38 am »
yay someone noticed :D

BTW, there is a redo of this if you want it :D

AKA Manadora

Moogie

  • Forum Legend
  • *
  • Posts: 4551
  • Artist/Flash Animator
    • View Profile
(No subject)
« Reply #5 on: December 11, 2004, 04:59:11 pm »
If you want to replace this with a new version, just edit your post and delete the old text. :P

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: Thenior's guide to exporting to Crystal space
« Reply #6 on: August 20, 2006, 12:58:49 am »
I'm creating a planeshift docs site, would you mind if I added this as a tutorial?