Transparent matrial confuse me , need help please

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

Transparent matrial confuse me , need help please

Post by Emil_halim »

Transparent matrial confuse me , need help please

Hi all

i want to blend sydney mesh with my background ,so i do the following

Code: Select all

IAnimatedMesh* mesh;                        
mesh = irrSceneMgr->getMesh("media/sydney.md2");                         
IAnimatedMeshSceneNode* node; 
node = irrSceneMgr->addAnimatedMeshSceneNode(mesh,0,666);
node->setMaterialType(EMT_TRANSPARENT_ALPHA_CHANNEL);
node->setMaterialFlag(EMF_LIGHTING, false);
node->setFrameLoop(0, 310);
node->setMaterialTexture( 0, irrVideo->getTexture("media/sydney.bmp"));
node->getMaterial(0).AmbientColor.setAlpha(255/2);
node->getMaterial(0).DiffuseColor.setAlpha(255/2); 
but when run the program it renders without Transparent, did i make something wrong.

please help
Vox
Posts: 47
Joined: Fri Apr 01, 2005 5:25 pm

Post by Vox »

You need texture with alpha channel. Replace sydney.bmp with particle.bmp just for test and you will see that it is transparent now.
Jedive
Posts: 146
Joined: Wed Apr 28, 2004 5:51 pm

Post by Jedive »

Do you really thing that this stuff is of advanced level? It fits better in the Beginner Forums.
Guest

Post by Guest »

Jedive wrote:Do you really thing that this stuff is of advanced level? It fits better in the Beginner Forums.
I agree, but please keep-in-mind that beginner to some can be advance to others... for example Algebra can be considered "advance math" to some, its all a matter of perspective.

/later
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

Post by Emil_halim »

Jedive wrote:Do you really thing that this stuff is of advanced level? It fits better in the Beginner Forums.
yes , i think that i choosed the right one, because there are many ideas and effects that could be
applied by this code if it works well,for example i can Fade in ,ore out my mesh in my scene,
do you think fading is advanced level or not.

by the way if i were you, i will answer and try to help instead of point the user to the correct
forum.
Jedive
Posts: 146
Joined: Wed Apr 28, 2004 5:51 pm

Post by Jedive »

Forum sections are done to be respected. This way advanced users who does not want to read the beginner forums and prefer to concentrate on discussions about advanced stuff do not really have to.
hybrid

Post by hybrid »

Well, the subject for advanced forum says "If you are an advanced programmer", thus depends on personal opinion of the poster. Furthermore it says "no questions on C++ programming" which was respected in this thread, and it says "no questions which have been answered in FAQ", which I did not check, yet. But I guess the thread is conforming to the current restrictions of this forum. You might want to change those, but right now I would not object this thread. I would however appreciate to have this kind of questions in beginner's forum, too.
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

Post by Emil_halim »

Jedive wrote:Forum sections are done to be respected. This way advanced users who does not want to read the beginner forums and prefer to concentrate on discussions about advanced stuff do not really have to.
i see that you are the ONLY one here in this forum who insist on your opinion,so i have no more words to say for you.
Post Reply