3D Model view problem

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Mh025
Posts: 16
Joined: Wed Jul 11, 2007 4:10 pm

3D Model view problem

Post by Mh025 »

Hi all,
i'm new to irrlicht and i'm trying to load a .3ds that i'v maked with Cinema 4D, but when i load the model on irrlicht i get a strange error, if i move or rotate camera (FPS custom camera) some faces of the model become invisible but they would have to be visible!!
Is this due to a programming error or i haven't add some stuff??
Please help me!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

In case you use the software renderer (tutorial 1 with a different model) than this is expected behavior. Simply change to directx or opengl or the burningvideo renderer. In case this happens all the time you should upload the 3ds somewhere for us to check. Could be a problem with materials in 3ds. Or it's simply the camera settings (near plane etc) which you can rule out by loading the mesh with the mesh viewer.
Mh025
Posts: 16
Joined: Wed Jul 11, 2007 4:10 pm

Post by Mh025 »

hybrid wrote:Or it's simply the camera settings (near plane etc) which you can rule out by loading the mesh with the mesh viewer.
What do you mean with this?

Anyway i will try with different render settings, but i don't think that is this the problem :P
Mh025
Posts: 16
Joined: Wed Jul 11, 2007 4:10 pm

Post by Mh025 »

I'v tryed with OPENGL rendering and the problem seems to reduce much but is not completly solved...
There are particular stuff about camera settings?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You could try to disable culling and change the near and far planes to very small and very large values (in case your mesh is large).
And please provide screenshots such we don't have to stake in the dark.
Mh025
Posts: 16
Joined: Wed Jul 11, 2007 4:10 pm

Post by Mh025 »

hybrid wrote:You could try to disable culling and change the near and far planes to very small and very large values (in case your mesh is large).
Yeah the problem are the near and far settings because now only far faces are invisible, what are the things to change?

I'wll upload a screenshot and model soon.
Thanks for your help.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

It's in the camera: setFarValue and setNearValue.
Mh025
Posts: 16
Joined: Wed Jul 11, 2007 4:10 pm

Post by Mh025 »

I have changed a bit far and near value, now the far faces are visible, but the problem is not completly solved, there are many strange bug...
There are some screenshots:

This is the normal tunnel:
Image

And this is the bugged tunnel (it appears half invisible if a move the camera)
Image

This is the normal wall:
Image

And this is the bugged wall (it appears half invisible if a move the camera)
Image

Finally, this is a wall that appears completly invisible, but is visible from the extern:
Image

Any suggestions?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Do you use OctTrees? And is the last wall always invisible from the inside? Please not that if you have backface culling enabled (default) you won't see backfaces. So maybe the wall is just wrongly orientated.
Mh025
Posts: 16
Joined: Wed Jul 11, 2007 4:10 pm

Post by Mh025 »

hybrid wrote:Do you use OctTrees?
Yeah I'm using OcTrees
hybrid wrote:And is the last wall always invisible from the inside?
Yes, is always invisible from the inside.
hybrid wrote:Please not that if you have backface culling enabled (default) you won't see backfaces. So maybe the wall is just wrongly orientated.
I don't have changed culling settings so it are enabled (how change it?)
For the invisible wall the problem may be this, but for the other face that become half invisible if a move camera?
Mh025
Posts: 16
Joined: Wed Jul 11, 2007 4:10 pm

Post by Mh025 »

I'v changed OcTrees with a simple IAnimatedMesh and the problem is solved!!!
The only thing that persist is the invisible wall, how i can disable culling?

EDIT: I have to think that OcTrees work only on quake models :D
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The invisible wall should be fixed with a 3d modeller, because enabling backface drawing is fillrate consuming. But you can change the material flag to disable the culling.
OctTrees should work for other models as well, but there are some pecularities with the culling which may lead to holes. These are probably bugs in the algorithms, who knows. BTW: Do you use Irrlicht 1.3.1?
Mh025
Posts: 16
Joined: Wed Jul 11, 2007 4:10 pm

Post by Mh025 »

hybrid wrote:Do you use Irrlicht 1.3.1?
I use Dev-cpp with Irrlicht 1.3

Anyway, I have fixed the model and now it work perfectly, thanks of all hybrid :D
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The thing is that we fixed some culling problems in 1.3.1 so you might be able to use octtrees without problems with the latest release. Furthermore it's much faster for animated meshes and should be code compatible with 1.3 (such that you just have to recompile your app with the new library).
Post Reply