3D max to irrlicht?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Atz666
Posts: 5
Joined: Sat Nov 01, 2008 5:44 pm

3D max to irrlicht?

Post by Atz666 »

I have a level in 3d max. I'd like to export it to irrlicht somehow to be able to walk around in it. BSP's seams not to be the answer since If I'd use them I'd have to remake everything in GTkRadiant or so. Is it possible to export to b3d (or something that saves mapping) and add it to a irrlicht scene as a octtree?
I really don't want to remodel the whole thing since it's quite big.

Thanks.
Dronchik
Posts: 36
Joined: Sun Feb 17, 2008 1:30 pm
Location: Kazahstan::Astana
Contact:

Post by Dronchik »

Hi Atz666. In past, I had this problem.

For map, you must export your map to x, b3d, or obj format and load your map as octtree. If you will need code, about load map as octtree, I'll sended it.
Atz666
Posts: 5
Joined: Sat Nov 01, 2008 5:44 pm

Post by Atz666 »

I figuread that about short time ago. The octtree past doesn't seam hard. B3d doesn't know of normal maps, and neither does obj. Does x sport that?. I'd like to use normal maps on most of the walls/floors.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can use normal maps with all kinds of meshes manually. Irrlicht 1.5 will feature automatic load support for normal maps in .obj and .3ds files.
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

hybrid wrote:You can use normal maps with all kinds of meshes manually. Irrlicht 1.5 will feature automatic load support for normal maps in .obj and .3ds files.
yey!
Gideon
Posts: 26
Joined: Sat Oct 25, 2008 11:28 am
Location: Russian
Contact:

Post by Gideon »

Am... How load the *.3ds level in Irrlicht? With texture... I do this 3 days yet... please, hepl... :cry:
P.S. I shall happy if anybody write the code of load *.3ds map with a texture=)
P.P.S. Sorry, I'am Russian and have more problem with English... :oops:
Dronchik
Posts: 36
Joined: Sun Feb 17, 2008 1:30 pm
Location: Kazahstan::Astana
Contact:

Post by Dronchik »

Hi Gideon :) Знакомые лица :D When you exporting your map to 3ds, 3D Max have function "export material library" in eporter to 3ds. If you checked that function, you map will export with textures. And with your map going to create file *map's name*.mtl. This file must be in folder next to your map.
skumar
Posts: 201
Joined: Thu Feb 14, 2008 6:24 pm
Location: kerala state india
Contact:

Post by skumar »

Get b3d pipeline from

www.onigirl.com

it worked for me for exporting lightmaps and static models....
skumar
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

3ds files should always load textures which are linked from the 3ds files automatically, unless the texture name is not written into the 3ds file. However, in many cases the filename or path to file are wrong, which would create warning messages on the console!
Gideon
Posts: 26
Joined: Sat Oct 25, 2008 11:28 am
Location: Russian
Contact:

Post by Gideon »

Thank's. I was download the gile[s] and didэр have problem now. This programm save world in *.b3d, *.x and *.obj format. But... When I load my level I see the bad picture...
Look:
Image
What is it?

P.S. Code:

Code: Select all

#include <irrlicht.h>
#include <iostream>

using namespace irr;

#pragma comment(lib, "Irrlicht.lib")

int main()
{
        IrrlichtDevice *device =
                createDevice(video::EDT_OPENGL, core::dimension2d<s32>(640, 480));

        if (device == 0)
                return 1; 
        video::IVideoDriver* driver = device->getVideoDriver();
        scene::ISceneManager* smgr = device->getSceneManager();
        device->getFileSystem()->addZipFileArchive("../../media/mapppeZ!.zip");
        scene::IAnimatedMesh* mesh = smgr->getMesh("ee.b3d");
        scene::ISceneNode* node = 0;
        
        if (mesh)
                node = smgr->addOctTreeSceneNode(mesh->getMesh(0), 0, -1, 128);
        if (node)
                node->setPosition(core::vector3df(-1300,-144,-1249));
        smgr->addCameraSceneNodeFPS();
        device->getCursorControl()->setVisible(false);
        int lastFPS = -1;

        while(device->run())
        {
                if (device->isWindowActive())
                {
                        driver->beginScene(true, true, video::SColor(255,200,200,200));
                        smgr->drawAll();
                        driver->endScene();

                        int fps = driver->getFPS();

                        if (lastFPS != fps)
                        {
                                core::stringw str = L"gently caress!!!!!!!!!";
                                str += driver->getName();
                                str += " | FPS:";
                                str += fps;

                                device->setWindowCaption(str.c_str());
                                lastFPS = fps;
                        }
                }
                else
                        device->yield();
        }
        device->drop();
        return 0;
}
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Read the console output: You're rendering more than 65535 vertices per Meshbuffer. This can be easily fixed by defining different materials or mesh groups. Each one is allowed to hold 2^16 vertices.
Gideon
Posts: 26
Joined: Sat Oct 25, 2008 11:28 am
Location: Russian
Contact:

Post by Gideon »

How I can start in the center of my mesh?
Atz666
Posts: 5
Joined: Sat Nov 01, 2008 5:44 pm

Post by Atz666 »

I solved most of the problems... just one left. I'm using b3d pipeline.
How can I just set a color to a mesh from the map?
How can I apply a glass material to a mesh from the map?
Irrlicht doesn't seem to read the alpha value from the b3d material.
skumar
Posts: 201
Joined: Thu Feb 14, 2008 6:24 pm
Location: kerala state india
Contact:

Post by skumar »

hi,
You can set alpha of a material in b3d by applying a small bitmap of desired and and setting alpha blend in material editor...i think alpha settings will take effect only if lighting is enabled...just try it...
skumar
Dronchik
Posts: 36
Joined: Sun Feb 17, 2008 1:30 pm
Location: Kazahstan::Astana
Contact:

Post by Dronchik »

Hi gyes. Gideon, if you don't need use normalmapping in 3d max for you map in game, you can use it: http://www.onigirl.com/pipeline/ , else you can use it: http://www.andytather.co.uk/Panda/direc ... loads.aspx
Post Reply