import 3ds file WITH textures ?
-
- Posts: 17
- Joined: Thu Aug 11, 2005 11:57 am
import 3ds file WITH textures ?
hi,
I made a 3ds max file of a level with textures from the material editor in 3ds max7. now i want to import it in irrlicht. but i dont see the textures when I run my c++ file. It seems I have to set the materials in the c++ code instead of in the max file. My question: is there a way to import a 3ds file WITH the textures?
this is the method I use now:
scene::IAnimatedMesh* mesh = smgr->getMesh(
"C:/eindwerk/code/media/hall.3ds");
I made a 3ds max file of a level with textures from the material editor in 3ds max7. now i want to import it in irrlicht. but i dont see the textures when I run my c++ file. It seems I have to set the materials in the c++ code instead of in the max file. My question: is there a way to import a 3ds file WITH the textures?
this is the method I use now:
scene::IAnimatedMesh* mesh = smgr->getMesh(
"C:/eindwerk/code/media/hall.3ds");
No, Irrlicht imports them !!!
Are all needet files in the same folder ???
Are all texture file names in old DOS style ???
Have you created a light source in Irrlicht (or disabled lightning) ???
Are all needet files in the same folder ???
Are all texture file names in old DOS style ???
Have you created a light source in Irrlicht (or disabled lightning) ???
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Are the textures in the same folder as your 3ds file?
they should load ok.
Just copy the jpgs or bmps from your ...\3dsmax7\maps\... folder.
If your material is not a bmp, that is if it is just diffusecolor settings, there may be something else to be done.
See what happens.
If it works do me a favor and respond to thishttp://irrlicht.sourceforge.net/phpBB2/ ... php?t=8176
EDIT: damn, Acki is quick
they should load ok.
Just copy the jpgs or bmps from your ...\3dsmax7\maps\... folder.
If your material is not a bmp, that is if it is just diffusecolor settings, there may be something else to be done.
See what happens.
If it works do me a favor and respond to thishttp://irrlicht.sourceforge.net/phpBB2/ ... php?t=8176
EDIT: damn, Acki is quick
-
- Posts: 17
- Joined: Thu Aug 11, 2005 11:57 am
doesnt work:
in the example they use the code:
scene::IAnimatedMesh* mesh = smgr->getMesh(
//"C:/eindwerk/code/media/room.3ds");
"C:/eindwerk/code/media/gang5.3ds");
smgr->getMeshManipulator()->makePlanarTextureMapping(
mesh->getMesh(0), 0.004f);
scene::ISceneNode* node = 0;
node = smgr->addAnimatedMeshSceneNode(mesh);
node->setMaterialTexture(0, driver->getTexture("C:/eindwerk/code/media/rockwall.bmp"));
node->getMaterial(0).EmissiveColor.set(0,0,0,0);
BUT I DONT WANT
node = smgr->addAnimatedMeshSceneNode(mesh);
node->setMaterialTexture(0, driver->getTexture("C:/eindwerk/code/media/rockwall.bmp"));
node->getMaterial(0).EmissiveColor.set(0,0,0,0);
my materials (jpg) dont appear from the 3dsfile created with 3ds, I can only set the material with the c++ code. without that last c++ code nothing from my scene apears
in the example they use the code:
scene::IAnimatedMesh* mesh = smgr->getMesh(
//"C:/eindwerk/code/media/room.3ds");
"C:/eindwerk/code/media/gang5.3ds");
smgr->getMeshManipulator()->makePlanarTextureMapping(
mesh->getMesh(0), 0.004f);
scene::ISceneNode* node = 0;
node = smgr->addAnimatedMeshSceneNode(mesh);
node->setMaterialTexture(0, driver->getTexture("C:/eindwerk/code/media/rockwall.bmp"));
node->getMaterial(0).EmissiveColor.set(0,0,0,0);
BUT I DONT WANT
node = smgr->addAnimatedMeshSceneNode(mesh);
node->setMaterialTexture(0, driver->getTexture("C:/eindwerk/code/media/rockwall.bmp"));
node->getMaterial(0).EmissiveColor.set(0,0,0,0);
my materials (jpg) dont appear from the 3dsfile created with 3ds, I can only set the material with the c++ code. without that last c++ code nothing from my scene apears
Using of My3DMeshLoader with Irrlicht (it's now a part of the engine)
is more easy then ever:
1) Patching Irrlicht:
a) Replace My3D Files in Irrlicht source directory:
CMY3DMeshFileLoader.cpp
CMY3DMeshFileLoader.h
CMY3DHelper.h
CMY3DStuff.h
Files CMY3DHelper.h and CMY3DStuff.h are in ../my3d_common/ directory
b) Made some other patches (if needed) . . .
Read file ../my3d_documents/my3d_irr_patch/irr_patch.txt for more
information about that.
b) Recompile Irrlicht
2) After that you can use My3D format in your programs like this:
// seeting path to textures
scmgr->getStringParameters()->setParameter(
scene::MY3D_TEXTURE_PATH, "path/to/your/textures"
);
// loading my3d mesh
scene::IAnimatedMesh* mesh = smgr->getMesh(
"path/to/my3d_mesh/mesh.my3d"
);
Thats all!
Zhuck Dimitry (ZDimitor)
---Here is a link to download Zdimitor's My3DTools.3.16 : http://my3dproject.nm.ru/
you will find there also the "howtos" for proper creating the scene in 3dmax 7.0, and patching the plugin and all you need to know...
is more easy then ever:
1) Patching Irrlicht:
a) Replace My3D Files in Irrlicht source directory:
CMY3DMeshFileLoader.cpp
CMY3DMeshFileLoader.h
CMY3DHelper.h
CMY3DStuff.h
Files CMY3DHelper.h and CMY3DStuff.h are in ../my3d_common/ directory
b) Made some other patches (if needed) . . .
Read file ../my3d_documents/my3d_irr_patch/irr_patch.txt for more
information about that.
b) Recompile Irrlicht
2) After that you can use My3D format in your programs like this:
// seeting path to textures
scmgr->getStringParameters()->setParameter(
scene::MY3D_TEXTURE_PATH, "path/to/your/textures"
);
// loading my3d mesh
scene::IAnimatedMesh* mesh = smgr->getMesh(
"path/to/my3d_mesh/mesh.my3d"
);
Thats all!
Zhuck Dimitry (ZDimitor)
---Here is a link to download Zdimitor's My3DTools.3.16 : http://my3dproject.nm.ru/
you will find there also the "howtos" for proper creating the scene in 3dmax 7.0, and patching the plugin and all you need to know...
to not mess you, if you have the irrlicht 0.11.0 release, you don't have to do the patching, just use it right away:
// seeting path to textures
scmgr->getStringParameters()->setParameter(
scene::MY3D_TEXTURE_PATH, "path/to/your/textures"
);
// loading my3d mesh
scene::IAnimatedMesh* mesh = smgr->getMesh(
"path/to/my3d_mesh/mesh.my3d"
);
// seeting path to textures
scmgr->getStringParameters()->setParameter(
scene::MY3D_TEXTURE_PATH, "path/to/your/textures"
);
// loading my3d mesh
scene::IAnimatedMesh* mesh = smgr->getMesh(
"path/to/my3d_mesh/mesh.my3d"
);
-
- Posts: 17
- Joined: Thu Aug 11, 2005 11:57 am
-
- Posts: 34
- Joined: Wed Aug 10, 2005 6:15 am
-
- Posts: 17
- Joined: Thu Aug 11, 2005 11:57 am
thanks!
next problem :s
1 - Draw scene (3d objects, lights, materials e.t.c)
2 - Bring up the Render-To-Texture Dialog. ('Rendering'->'Render To Texture' option)
3 - Mark a mesh you want to bake.
4 - In Output Rollout, click on the 'Add...' button in the RTT dialog
and chose LightingMap
5 - Assign 'Target Map Slot:' to Diffuse (only in MAX6,7)
step 5 doesnt work, i can't select anything
next problem :s
1 - Draw scene (3d objects, lights, materials e.t.c)
2 - Bring up the Render-To-Texture Dialog. ('Rendering'->'Render To Texture' option)
3 - Mark a mesh you want to bake.
4 - In Output Rollout, click on the 'Add...' button in the RTT dialog
and chose LightingMap
5 - Assign 'Target Map Slot:' to Diffuse (only in MAX6,7)
step 5 doesnt work, i can't select anything
-
- Posts: 34
- Joined: Wed Aug 10, 2005 6:15 am
-
- Posts: 17
- Joined: Thu Aug 11, 2005 11:57 am
-
- Posts: 17
- Joined: Thu Aug 11, 2005 11:57 am
-
- Posts: 34
- Joined: Wed Aug 10, 2005 6:15 am
Code: Select all
ISceneManager* smgr = device->getSceneManager();