.

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

.

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 2:06 pm, edited 5 times in total.
Guest

Post by Guest »

Great!

I have a simple suggestion;

For emitters;

Code: Select all

	virtual void setMaxLifeTime( u32 minLT ) { MaxLifeTime = minLT; }
	virtual void setMinLifeTime( u32 maxLT ) { MinLifeTime = maxLT; }
just like setMinParticlesPerSecond and setMaxParticlesPerSecond function.

For more control over emitters ...

PS: Those functions are for on the fly changes to emitters right ? For preventing reinitiliazition of emitters ... With these we can start, stop and change direction ...
coolsummer
Posts: 24
Joined: Fri Nov 04, 2005 1:44 pm
Location: Grafenwoehr, Germany

Post by coolsummer »

Great work Spintz!

Question: Do you exchange your information about bugs / fixes, new features with niko, so that we can expect them in the next official release?

Andi
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 2:06 pm, edited 1 time in total.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 2:06 pm, edited 1 time in total.
coolsummer
Posts: 24
Joined: Fri Nov 04, 2005 1:44 pm
Location: Grafenwoehr, Germany

Post by coolsummer »

Spintz wrote: ... I should email him and let him know about the new version and features ... ;)
Think that will help Niko in receiving necessary information faster and he need not to read every thread :)
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

Ive got my physics to a place where I'm ready to try getting terrain collision going again, so I'm going to try out Spintz now. I'll let you know how it goes.

Okay, problems with initial build. Figure its best to ask you directly how these things were modified (especially with the Mesh stuff).

Firstly, my function for loading Mesh data into OPAL:

Code: Select all

bool IRRtoOPAL_AddMeshBufferToSolid( opal::Solid* solid, irr::scene::IMeshBuffer * meshBuffer ) {
	opal::MeshShapeData meshData;
	meshData.numVertices = 0;
	meshData.numTriangles = 0;

	meshData.numVertices = meshBuffer->getVertexCount();
	meshData.numTriangles = meshBuffer->getIndexCount()/3;

	meshData.vertexArray = new opal::real[3 * meshData.numVertices];
	meshData.triangleArray = new unsigned int[3 * meshData.numTriangles];

	// Copy vertex data.
	irr::video::S3DVertex*	normVerts = (irr::video::S3DVertex*)(meshBuffer->getVertices());
	irr::video::S3DVertex2TCoords* txrVerts = (irr::video::S3DVertex2TCoords*)(meshBuffer->getVertices());
	irr::video::S3DVertexTangents* tangyVerts = (irr::video::S3DVertexTangents*)(meshBuffer->getVertices());
	for(unsigned int i = 0; i < meshBuffer->getVertexCount(); ++i) 
	{      

		switch(meshBuffer->getVertexType()) 
		{ 
		case irr::video::EVT_STANDARD: 
			{ 
				meshData.vertexArray[3 * i + 0] = normVerts[i].Pos.X;      
				meshData.vertexArray[3 * i + 1] = normVerts[i].Pos.Y;      
				meshData.vertexArray[3 * i + 2] = normVerts[i].Pos.Z;       
			} 
			break; 
		case irr::video::EVT_2TCOORDS: 
			{ 
				meshData.vertexArray[3 * i + 0] = txrVerts[i].Pos.X;        
				meshData.vertexArray[3 * i + 1] = txrVerts[i].Pos.Y; 
				meshData.vertexArray[3 * i + 2] = txrVerts[i].Pos.Z; 
			} 
			break; 
		case irr::video::EVT_TANGENTS: 
			{ 
				meshData.vertexArray[3 * i + 0] = tangyVerts[i].Pos.X;         
				meshData.vertexArray[3 * i + 1] = tangyVerts[i].Pos.Y; 
				meshData.vertexArray[3 * i + 2] = tangyVerts[i].Pos.Z;        
			} 
			break; 
		default: 
			{ 
				// you will need to handle the vertex type 
				assert(false); 
			} 
			break; 
		} 
	}

	// Copy triangle data.
	uint16* meshIndices = (uint16*)meshBuffer->getIndices();
	for (unsigned int i = 0; i < meshData.numTriangles; ++i)
	{
		meshData.triangleArray[i*3 + 0] = meshIndices[i*3 + 0]; 
		meshData.triangleArray[i*3 + 1] = meshIndices[i*3 + 1]; 
		meshData.triangleArray[i*3 + 2] = meshIndices[i*3 + 2]; 
	}
	solid->addShape(meshData);

	return true;
}
Which (when I switch to IrrSpintz) results in compile errors:

Code: Select all

c:\IrrlichtRPG\src\IrrlichtRPG\Physics\IrrToOPAL.cpp(30): error C2039: 'S3DVertex2TCoords' : is not a member of 'irr::video'
c:\IrrlichtRPG\src\IrrlichtRPG\Physics\IrrToOPAL.cpp(30): error C2065: 'S3DVertex2TCoords' : undeclared identifier
c:\IrrlichtRPG\src\IrrlichtRPG\Physics\IrrToOPAL.cpp(30): error C2065: 'txrVerts' : undeclared identifier
c:\IrrlichtRPG\src\IrrlichtRPG\Physics\IrrToOPAL.cpp(30): error C2296: '*' : illegal, left operand has type ''unknown-type''
c:\IrrlichtRPG\src\IrrlichtRPG\Physics\IrrToOPAL.cpp(30): error C2297: '*' : illegal, right operand has type ''unknown-type''
c:\IrrlichtRPG\src\IrrlichtRPG\Physics\IrrToOPAL.cpp(30): error C2039: 'S3DVertex2TCoords' : is not a member of 'irr::video'
c:\IrrlichtRPG\src\IrrlichtRPG\Physics\IrrToOPAL.cpp(30): error C2059: syntax error : ')'
c:\IrrlichtRPG\src\IrrlichtRPG\Physics\IrrToOPAL.cpp(44): error C2039: 'EVT_2TCOORDS' : is not a member of 'irr::video'
c:\IrrlichtRPG\src\IrrlichtRPG\Physics\IrrToOPAL.cpp(44): error C2065: 'EVT_2TCOORDS' : undeclared identifier
How exactly did you change the internal representation of the mesh?
a screen cap is worth 0x100000 DWORDS
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 2:07 pm, edited 1 time in total.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

Okay, took care of that. I'm also getting weird 'does not take X parameters' errors. First I had a problem with irr::core::vector2df xzDir( cam.X, cam.Z); -- but I wrote code to initialize it without the constructor. But I get the same problem with m_smgr->addLightSceneNode(0, IRRVector3Df(1500,700,1350), IRRColorf(50, 200, 50), 100); (ie: "function does not take 5 parameters").

However, when I look at the IrrSpintz headers it looks like it should work fine. I'm working on this some more..

--- Okay, apparently you did change the header for this, and its just Visual Studio intellisense messing up and using the hold header values on me.
Last edited by keless on Mon Nov 28, 2005 8:53 pm, edited 1 time in total.
a screen cap is worth 0x100000 DWORDS
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 2:07 pm, edited 1 time in total.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

Okay, got it building and running (using the appropriate lib and DLLs of course). I have to comment out my IRRtoOPAL_AddMeshBufferToSolid( m_TESTLevelSolid, irrMesh->getMeshBuffer(mb) ); however, or the game crashes when my physics simulator runs.

This means that the way the mesh buffer is returning verts/indicies no longer behaves well with the function I gave before. I'm running this on a BSP mesh as follows:

Code: Select all

	irr::scene::IMesh* irrMesh = m_TESTLevelmesh->getMesh(0);
	for( int mb=0; mb < irrMesh->getMeshBufferCount() ; mb++ ) {
		IRRtoOPAL_AddMeshBufferToSolid( m_TESTLevelSolid, irrMesh->getMeshBuffer(mb) );
	}
The particular BSP file is map-20kdm2.pk3 from the irrlicht examples.
a screen cap is worth 0x100000 DWORDS
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 2:07 pm, edited 1 time in total.
Guest

Post by Guest »

Thank Spintz. It compiled straight.

- invoking help screen does make the cylinder particles blocky
- anisotropic filtering doesn't work
- low frame rate with terrain demos
- for some reason using dx doesn't work for me. If i choose dx the app closes straight

Using DevCpp 4.992, OpenGL, AMD2400+, NvidiaGF4TI
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

Yeah, changing to 32 bits fixed the crash.

Now I'm implementing physics loaded from the ITerrainSceneNode mesh-- however simply using getMesh() does not give me a valid mesh to collide with. I'm trying LOD now..

EDIT: LOD method returns basically the same result. This is basically the same as what was happening in pure Irrlicht (which is a shame, because this was the only reason I considered switching to Spintz in the first place).

Also: does setMaterialFlag(EMF_LIGHTING, false) no longer work? Or perhaps it is like that and I'm just seeing the result of the lightmap on the BSP (in octTreeSceneNode ) being used by default.. its a lot darker than in regular irrlicht.
Last edited by keless on Tue Nov 29, 2005 12:30 am, edited 2 times in total.
a screen cap is worth 0x100000 DWORDS
Trebuchet

Post by Trebuchet »

What can i do with the eight textures support? Lightmapped bumpmapping? That would be nice.
Ideas and/or example would be very appreciated.
Post Reply