My3D Tools v.3.15 Updated

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

My3D Tools v.3.15 Updated

Post by ZDimitor »

My3D Tools v.3.15 Updated:

New features:

1) Made some changes in My3D Example
2) New materials automaticaly loading from *.my3d files:
EMT_TRANSPARENT_ALPHA_CHANNEL
EMT_SPHERE_MAP

To download My3DTools and read more info about using My3D with Irrlicht please visit this page:
http://my3dproject.nm.ru

Its now possible to create trees in tree[d] and export them in *my3d format ( special to Afecelis :) )

Note: You must patch Irrlicht to use with new my3d capabilities! Read about patch on my page.

Here some ScreenShoots:
Image
Last edited by ZDimitor on Tue May 17, 2005 1:22 am, edited 2 times in total.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

@ZDimitor,
good news from you like ever :D
It's very interesting that now is possible exporting of giles trees with shadows.

What is your opinion, what is better? - Using of max or giles for lightmapping for irrlicht?
Since I understood giles my3d makes more memory saving files for Irrlicht right?
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

YYYYYYYYAAAAAAAAAAAAAAAAAAAAAAAYYYYYYYYYYYYYY!

I got a smile from here to China! :D

thnx Dmitri! dloading and trying out immediately!

I'll let you know of my results. You really surprised me, you did it in no time! :wink:

can't wait to add some trees to the level.

ps. as usual, I'll mirror your stuff.

regards,
Alvaro
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

@etcaptor:
Reasons why I'm starting to like My3d in Giles more than max:
1. Less expensive $$$$ (very important)
2. Only one lightmap is generated, whereas Max generates many (heavier-slower)
3. Easier material manipulation from giles: you get transparency, alpha, opacity, self iluminated materials in a glitch and they display properly in My3d. With self iluminated materials (if you got GI on) you don't even need a light; while trying to achieve this in max requires a little more of experience.
4.Excellent and fast global ilumination: the ambient lighting generated by Giles is simply amazing. I know, i know; max has got Mental ray and final render and brazil, and vray, but go make it work properly for realtime graphics!!!! it's a pain!!!
5. With V3.15; Treed trees with proper transparency generating lovely shadows on the map!!!
6. You can blur 1x, 2x, 4x, etc directly from Giles; no extra tweaking required with a paint program.

and a ton of options Giles has, specifically designed fopr realtime graphics!!!
:D
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

@Zdimitor: do we still need the my3dhelper and my3dstuff files?

or just the file loaders? (my3dhelper and my3dstuff are only to be included when using my3d as external loader?)
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Just used the loader files and dll compiles ok.

Just tried it, and I don't know if it's just an impression but I got a major boost in fps performance! cool! :D

but I still got an issue with transparency with the png files:
Image

any ideas Zdimitor? (perhaps an Irrlicht patch I missed?)

and as usual stuff is mirrored here (you got to correct the binar path, form binary to "bin"):
http://www.danielpatton.com/afecelis/Zd ... 15.bin.zip
http://www.danielpatton.com/afecelis/Zd ... 5.full.zip
http://www.danielpatton.com/afecelis/Zd ... .light.zip
http://www.danielpatton.com/afecelis/Zd ... 3DHelper.h
http://www.danielpatton.com/afecelis/Zd ... Loader.cpp
http://www.danielpatton.com/afecelis/Zd ... leLoader.h
http://www.danielpatton.com/afecelis/Zd ... Y3DStuff.h

cheers!
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

2Afecelis:
Yes of course you must patch Irrlicht!!!
Read file my3d_documents/my3d_irr_patch/IRR_PATCH.txt for this
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

2Etcaptor:

Last time i prefered Gile[s] to creating lightmaps (less memory usage, more quality lightmaps). I agree with Afecelic opinion at 100%
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

thnx Dmitri!

tress now show up ok in opengl but still with problems in DX.

could you post or send me your files?
COpenGLMaterialRenderer.h
CD3D8MaterialRenderer.h
CD3D9MaterialRenderer.h

thnks! :D
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

Did you try My3D Example? Is it ok for you?

Show me your screenshoot.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

opengl:
Image

directx:

Image
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

I think you not patched D3D driver.

Post here the code of the class CD3D8MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL (from file CD3D8MaterialRenderer.h) you are using to compile Irrlicht.dll
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

It's the one included in your patch:

for dx8:

Code: Select all

//! Transparent alpha channel material renderer
class CD3D8MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL : public CD3D8MaterialRenderer
{
public:

	CD3D8MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL(IDirect3DDevice8* p, video::IVideoDriver* d)
		: CD3D8MaterialRenderer(p, d) {}

	virtual void OnSetMaterial(SMaterial& material, const SMaterial& lastMaterial,
		bool resetAllRenderstates, IMaterialRendererServices* services) 
	{
		if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates)
		{
			pID3DDevice->SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTOP_MODULATE ); 
			pID3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); 
			pID3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_CURRENT ); 
			pID3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP,   D3DTOP_DISABLE ); 
			pID3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP,   D3DTOP_SELECTARG1 ); 
			pID3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE ); 

			pID3DDevice->SetTextureStageState( 1, D3DTSS_COLOROP,   D3DTOP_DISABLE ); 
			pID3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP,   D3DTOP_DISABLE ); 

			pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); 
			pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);

			pID3DDevice->SetRenderState(D3DRS_ALPHAREF,127); 			
			pID3DDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL);
		}

		services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
	}

	virtual void OnUnsetMaterial()
	{
		pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); 
	}	

	//! Returns if the material is transparent. 
	virtual bool isTransparent() 
	{
		return true; 
	}
};
for directx9:

Code: Select all

//! Transparent alpha channel material renderer
class CD3D9MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL : public CD3D9MaterialRenderer
{
public:

	CD3D9MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL(IDirect3DDevice9* p, video::IVideoDriver* d)
		: CD3D9MaterialRenderer(p, d) {}

	virtual void OnSetMaterial(SMaterial& material, const SMaterial& lastMaterial,
		bool resetAllRenderstates, IMaterialRendererServices* services) 
	{
		if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates)
		{
			pID3DDevice->SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTOP_MODULATE ); 
			pID3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); 
			pID3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_CURRENT ); 
			pID3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP,   D3DTOP_DISABLE ); 
			pID3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP,   D3DTOP_SELECTARG1 ); 
			pID3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE ); 

			pID3DDevice->SetTextureStageState( 1, D3DTSS_COLOROP,   D3DTOP_DISABLE ); 
			pID3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP,   D3DTOP_DISABLE ); 

			pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); 
			pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);

			pID3DDevice->SetRenderState(D3DRS_ALPHAREF,127); 			
			pID3DDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL);
		}

		services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
	}

	virtual void OnUnsetMaterial()
	{
		pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); 
	}	

	//! Returns if the material is transparent. 
	virtual bool isTransparent() 
	{
		return true; 
	}
};

ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

Try to add this string in your main.cpp file:

Code: Select all

driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); 
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

hehehe, lovely!!! :D

I hadn't checked that in your source file. Thnx man! Thnx for the trees! you make my life green! :mrgreen: :mrgreen:

gonna try the new options immediately.

as usual, let us know of any updates! :D
Post Reply