Page 1 of 1

B3D With Vertex Alpha | GUI

Posted: Sun Oct 21, 2007 12:28 pm
by WarShattrith
Hello,

Sorry for my english, I'm french.

I have two little problems :

1) I've created a terrain with T.Ed (from D-Grafix). I exported it as a B3D Mesh, with vertex alpha and a Negative Offset.

Here's what I get when I import it in irrEdit :
Image


2) My program is like this :

Code: Select all

#define SERVER_PORT 47850
#define RANDOM_DATA_SIZE 200
char randomData[RANDOM_DATA_SIZE];

#include <stdlib.h> // For atoi
#include <cstring> // For strlen
#include "IRR/Irrlicht.h"

#include "classNetClient.h"

#ifdef _WIN32
#include <windows.h> // Sleep
#else
#include <unistd.h> // usleep
#include <cstdio>
#endif

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
using namespace std;



int main(void)
{

    IrrlichtDevice *irrDevice = createDevice(EDT_OPENGL, dimension2d<s32>(800, 600),32,false,true,false,0);

    irrDevice->setWindowCaption(L"War of Shattrith");

    IVideoDriver* irrDriver = irrDevice->getVideoDriver();
    ISceneManager* irrSceneMgr = irrDevice->getSceneManager();
    IGUIEnvironment* irrGUIEnv = irrDevice->getGUIEnvironment();

    irrGUIEnv->addStaticText(L"Hello World! Irrlicht Project is here!!", rect<int>(10,10,200,30), true, true, 0, -1);


// Loading the level Mesh
	irrSceneMgr->loadScene("DATA\\Lands\\GlueScreen\\irrsc.irr");

// Adding an FPS Camera
    irrSceneMgr->addCameraSceneNodeFPS();

	//IGUIStaticText* textStatique1;
	IGUIStaticText* textStatique1 = irrGUIEnv->addStaticText(L"Test text 1", rect<int>(10,10,200,100),false);

    while(irrDevice->run())
    {
        irrDriver->beginScene(true, true, SColor(255,100,101,140));


		//textStatique1->setText(L"Texte changé");
		
        irrSceneMgr->drawAll();
		irrGUIEnv->drawAll();
	    irrDriver->endScene();
	}

    irrDevice->drop();
    return(0);




  return 0;
}
My scene is an OctTree and Particles.
When the GUI is draw, the mesh disappear.
If the GUI is not drawn, or if there's nothing to draw, the mesh is here.

I'm using irrEdit 1.4-alpha, and irrlicht 1.4beta. The OctTree is converted by irrEdit to an irrMesh.

Posted: Mon Oct 22, 2007 12:37 am
by Midnight
lol I use Alpha/Beta and my poop bugs out why is that?

lmfao seriously??!!

Posted: Thu Oct 25, 2007 4:37 pm
by WarShattrith
No other idea ?

Posted: Thu Apr 17, 2008 10:26 pm
by dgrafix
Im working with this to work out why. As far as i can tell so far, either irrlichts b3d loader does not import vertex alpha or something needs to be set first.
Im a total irrlicht noob so am still feeling my way round the engine.

You can always use the large texture export with a detail map to take away the bluriness.

Posted: Fri Apr 18, 2008 8:59 am
by hybrid
Irrlicht 1.4beta is quite old already, and the SVN has even more bugfixes, especially several for b3d loading and render state problems with teh GUI. Can you try to run your test app with Irrlicht SVN? Or can you provide the mesh and textures for testing?