Halaman

Minggu, 21 Oktober 2012

[Irrlicht]Blender 2.6X as your game scenes editor?

Just a quick note for me to implement scene / level editor in the future,
You could generate your UVs, Images, Vertices, Faces (even triangulates them) through the python scripting library..

And by using blender's "Append / Link" along with "Custom Properties" , we should be able to load / re-use and do almost everything to compose our game world. Wouldn't it be great to have msvc express for the IDE, angelscript / lua as the scripting interface, and Blender as your modeler and game scene editor?

For the 'future me" here is a list of scripts function which will help you.. :p
  1. dont forget the 'dir' command! example: dir(bpy.data.meshes['mesh_id']
  2. bpy.data.images['IMAGE_ID'].filepath for retrieving physical location of the image file used as the texture
  3. bpy.data.libraries['LIB_ID'] for your external files..
  4. list(bpy.data.meshes["YOUR_MESH_ID'].vertices) this is an array of your vertices
  5. list(bpy.data.meshes[' YOUR_MESH_ID '].faces[1].vertices) this is the face, and the indexs of your vertices
  6. it is a bit longer to get this one.. but here it is.., to get the texture coordinates: bpy.data.meshes["YOUR_MESH_ID"].uv_textures['UVMap'].data[1].uv# with # being 1 to 4..
  7. a simple tutorial on wikibook : exporting scene!
Now there you have it.. a complete arsenal to represent a 3d world (vertices, faces, textures, texture coordinates, and transforms..) what? owh yes.. what about animation you asked? well.. for the time being, if you need an animated mesh, you should consider manually add them to your 'static' world ;)

cheers!

Tidak ada komentar:

Posting Komentar