faceted reflection

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
AMAZINGAHMED
Posts: 8
Joined: Thu Apr 28, 2005 12:19 pm
Location: Egypt

faceted reflection

Post by AMAZINGAHMED »

hi there
i have a little problem that when i use the reflection material, the mesh becomes faceted. here is my code:

material_stainless.Texture1 = driver->getTexture("../../media/lake3.jpg");
material_stainless.Texture2 = driver->getTexture("../../media/galvplat.jpg");
material_stainless.Lighting = true;
material_stainless.MaterialType=EMT_REFLECTION_2_LAYER;
material_stainless.EmissiveColor=SColor(100,150,150,150);


i fount also this happens with any other MaterialType.
i get my model from 3dmax as a .3ds file and in max it looks smooth, so how can i smooth it in irrlicht? am i missing something here?
plz hlp
thnks
THERE IS ALWAYS A FIRST TIME
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

Irrlicht doesn't (currently 0.9) support smoothing groups for 3ds. 3ds meshes will always be flat shaded. Try another mesh format (x, obj, ...).
It is like it is. And because it is like it is, things are like they are.
omaremad

Post by omaremad »

build a mesh with tangents it helps a bit

http://uk.geocities.com/omar.emad@btint ... rsgame.zip

heres my game with ai look in the source to knoe how to build meshes with normals

i think it is by using this code


IAnimatedMesh* planem = smgr->getMesh("smallcube2.3ds");
IMesh* mesh = smgr->getMeshManipulator()->createMeshWithTangents( planem->getMesh(0));

hii egypt

im from egypt nasr city
Post Reply