tiistai 15. joulukuuta 2009

Tutorial to import scene from Blender to realXtend

Requirements:
Blender
Ogre mesh exporter plugin (http://www.ogre3d.org/wiki/index.php/Blender_Exporter)
Ogre scene exporter plugin (http://www.ogre3d.org/wiki/index.php/Blender_dotScene_Exporter)
ModreX trunk or branch 0.1.2-rc



First you need to export all meshes from the scene. Select all meshes in scene by pressing 'a'. Then select OGRE mesh export tool from File->Export->OGRE Meshes. Ensure that you have selected all meshes from the "Selected" box. Select your favorite options and ensure that you have selected at least options "Fix Up Axis to Y" and OgreXMLConverter. OgreXMLConverter option may require that you specify the path to your OgreXMLConverter in the properties section.



In some cases not all textures are copied to the destination directory. To export textures from .blender file select File->External Data->Unpack into files. This will extract all textures from scene to location of your .blender file.



After exporting meshes you need to also export the scene file. This includes information on where the objects are placed in the scene. Select scene export tool from File->Export->OGRE Scene. In this dialog, ensure that all meshes are selected and that "Fix Up Axis to Y" is NOT selected.



Now after exporting scene and mesh files, we are ready to import them. Copy scene-, material-, mesh and texture files to OpenSim bin folder. Ensure that the name of the scene and material files are same expect for the file extension of course. Boot up your simulator if it isn't already running. Apply offset if necessary with command "ogrescene offset x,y,z", where x, y and z are the offset values of x, y and z axis. X and Y values of the objects in Scene file need to be between 0-256m and Z needs to be higher than 0. Otherwise the objects won't show up. By applying the offset command you can affect these values. Note that usually waterlevel in OpenSim is at 20 meters. Import scene with command "ogrescene import X", where X is the name of the scene without the .scene file extension.



After inputting the import command it may take a while to import all the objects. Sometimes there might be errors when importing the scene or when exporting to OGRE format and objects might not view exactly the same as in Blender.


Notes by Antti: The above example .blend file was retrieved from this site: http://gryllus.net/Blender/StudentGallery.html

Also note that the export tools for blender are quite specific about the format of the textures. You need to create UV maps for the textures and have the TexFace selection on in the Blender material menu.

1 kommentti:

André Verwijs kirjoitti...

link to blender dotScene Exporter is:
http://www.ogre3d.org/tikiwiki/Blender+dotScene+Exporter&structure=Tools

André