Hi, i have started out what hopefully will be my town. I have some houses, their textures and lightmaps. Successfully imported one of my houses and assigned collision to it. (based on the collision tutorial)
Do the following for each of my objetcs in order to make it work correctly?:
scene::IAnimatedMesh *mesh = smgr->getMesh("media/house1.obj");
scene::ISceneNode *node (0);
if (node) {
node->SetMaterialFlag(EMF_LIGHTING, false);
node ->setMAterialTexture (0, driver->getTexture ("media/house1.tga")); }
node->SetMaterialFlag(EMF_FOG, true); // i want fog on my scene
if (node){
selector= smgr ->createOctTreeTriangleSelector(
mesh ->getMesh(), node, 128);
node->setTriangleSelector(selector);
selectpor->(drop)
}
is there an alternative to it? where can i see a sample of loading different meshes (ok, collision tutorial has 3 faeries, but it seems they are instances of the one pointed out by faerie). I thought on making a class for all of my data, however just don't know how to implement it (class buildings which would contain collision and fog states). Still trying to learn c++
Sorry for so many newbie questions, i'm more on the art side of the pond. Thanks.
Best way to load several meshes?
Yes wolfsb, you're right, i have lots of typos (happily enough code is running ok, as it is on another machine, wo. these mistakes).
Yesterday i played a lot and found a nice pipeline for my stuff, here it goes:
- Once my model is done, lightmap it and bake my texture AND the lightmap into the same object.
- Place everyhouse in their own position, in my 3d app, set neutral pose
- Export each one as an .obj
- Load into Ultimate Unwrap, each house has now its own place (as defined in 3d app)
- Export as .x
- Reopen and resave in mview
And that's pretty much it !
I hope this lines might help some other newbies. If anyone else has a pipeline that would like to share, please let me know.
Now i better i get to do some work, thanks for reading.
Yesterday i played a lot and found a nice pipeline for my stuff, here it goes:
- Once my model is done, lightmap it and bake my texture AND the lightmap into the same object.
- Place everyhouse in their own position, in my 3d app, set neutral pose
- Export each one as an .obj
- Load into Ultimate Unwrap, each house has now its own place (as defined in 3d app)
- Export as .x
- Reopen and resave in mview
And that's pretty much it !
I hope this lines might help some other newbies. If anyone else has a pipeline that would like to share, please let me know.
Now i better i get to do some work, thanks for reading.