Difference between revisions of "HowToTestModelsIngame"
Ghoulsblade (Talk | contribs) |
Ghoulsblade (Talk | contribs) |
||
Line 20: | Line 20: | ||
you will probably have to rescale and rotate it. | you will probably have to rescale and rotate it. | ||
+ | if you just want to see your model without bothering about rescaling, a quick workaround is adding ", gfx_meshrad=0.5" to force a certain modelsize ingame, e.g. | ||
+ | |||
+ | RegisterObjectType("furniture/generator", "furniture", {name="generator", gfx_mesh="sd_generator.mesh", gfx_meshrad=0.5 }) | ||
if you want to make a new data/subfolder, add the path to resources.cfg | if you want to make a new data/subfolder, add the path to resources.cfg |
Revision as of 13:03, 23 August 2007
you have to convert the model to the ogre .mesh format, there are exporters for all major modelling programs, including blender,3dsmax,maya,wings3d,... see the http://ogre3d.org for details (TODO : link to ogre wiki page about exporters. link to ogre addons page where the exporters are.)
place the .mesh in the game dir under data/model/
you can just replace either replace existing .mesh files if you want to try things out, or you can add new object types types to the lua file
data/plugins/common.objecttypes.lua
e.g for adding a type of furniture don't need to be a programmer, just dublicate a line like this :
RegisterObjectType("furniture/generator", "furniture", {name="generator", gfx_mesh="sd_generator.mesh" })
and replace both "generator" occurrences with whatever your model is called, and replace sd_generator.mesh by the filename.
you can then place the furniture type inside the spaceship by selecting it form the rightclick menu.
you will probably have to rescale and rotate it.
if you just want to see your model without bothering about rescaling, a quick workaround is adding ", gfx_meshrad=0.5" to force a certain modelsize ingame, e.g.
RegisterObjectType("furniture/generator", "furniture", {name="generator", gfx_mesh="sd_generator.mesh", gfx_meshrad=0.5 })
if you want to make a new data/subfolder, add the path to resources.cfg