Models come out freaky in IRRLicht

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
ntitan
Posts: 21
Joined: Tue Mar 22, 2005 2:44 pm

Models come out freaky in IRRLicht

Post by ntitan »

Hello all, I've just started using IRRLicht and am quite excited about it. I've made a simple PlaneMesh, and I've incorporated Newton. YAY.
OK, so thats all great.

But now anytime I try and add a model that didnt come with the engine I get ugly icky weird stuffness. :roll: Basically with lots of large pieces missing.

Is there some trick I missed? Do I not understand something about exporting models out of 3DStudioMax in 3ds format?

I've tried using models I've found online, making my own, and even making ridiculously simple models out of only rectangles. But the only thing that seems to come out right when I view it in irrlicht is a single box or ball.

:?: Help! :?:

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

Post by afecelis »

could you post a screenshot and your loading model code?

that would help us help you better :D
Fingers
Posts: 38
Joined: Thu Feb 10, 2005 10:17 am
Location: South Africa

Flying off the Edge here but ....

Post by Fingers »

I Had a bit of trouble too ....

My solution was to make sure the objects were Editable Meshes .... (I Was creating Editable Poly's )

If it's not a Editable Mesh, It comes out funny in Irrlicht, so if it's not a editable Mesh, just Right Click on the Object in 3DS Max, Choose Convert to: --> Editable Mesh ...

Then Export ...

Hope it works for you ...
ntitan
Posts: 21
Joined: Tue Mar 22, 2005 2:44 pm

Post by ntitan »

OK, so here's what it looks like in 3DStudio Max:
Image

And here's what happens in IRRLicht:
Image

And here is the 3ds file I made
http://www.claim.md/ntitan/ncraft1.3ds
Guest

Post by Guest »

It looks like you have a lot of backfaces in your model.

In MAX you probably don't see a difference, but for 3D cards there is a difference between faces that are like this:

Code: Select all

    1
   / \
  3---2
and faces that are like this:

Code: Select all

    1
   / \
  2---3
Depending on what is defined as front-face (clockwise or counterclockwise) one of the two is a frontface (visible) and the other is a backface (invisible).

There are some settings that can be changed w.r.t. front/backface rendering by the way, but that is expensive.

It's best to reverse the faces.

Unfortunately I don't know how to do that with 3D Studio since I don't have it.
Guest

Post by Guest »

Well, I tried to make it an editable mesh, still no luck.

The backfaces thing makes sense. But I cant figure out how to turn them around. Any 3DStudio max wizards out there know how to do this?

Thanks,
Nihal
ntitan
Posts: 21
Joined: Tue Mar 22, 2005 2:44 pm

Post by ntitan »

More updates:
So now its looking less like its a normals/backface problem. I told it to not show the object as to sided, and I found where to flip the normals, and I'm pretty sure all the faces are pointing the right direction.

Any other suggestions?

What is everyone else using to make their models for IRRLicht?

Nihal
eXodus
Posts: 320
Joined: Tue Jan 04, 2005 10:07 am
Location: Canada
Contact:

Post by eXodus »

I always got such results using 3DS format. Try to export your model in X format. Search "panda x" on the forum.
Fingers
Posts: 38
Joined: Thu Feb 10, 2005 10:17 am
Location: South Africa

Hope this Helps

Post by Fingers »

I Loaded your model into Anim8tor (You can find this by checking tools), then told Anim8tor to Fix Normals, Exported and it loaded fine with Irrlicht ...
Soulil
Posts: 6
Joined: Tue Mar 08, 2005 7:52 pm

Post by Soulil »

What is everyone else using to make their models for IRRLicht?
So far i've been using .3ds files to load my models into Irrlicht and i had no problem at all :)

in my pov 3ds is fine though a little bit limited, so you can use it with Irrlicht.

my first Demo with the engine here : http://ben.kicks-ass.net/FanDemo.zip

all 3ds inside :)

i haven't yet looked at your model in Max but if i can i will and try to load it in Irrlicht to see what it does ....
ntitan
Posts: 21
Joined: Tue Mar 22, 2005 2:44 pm

Post by ntitan »

YAY, so it looks like exporting the file into .X did the trick.
Fingers, I couldnt find Anim8tor, is that a seperate piece of software? I'd still like to find a way to 'Fix Normals' since apparently 3DSMax 7 is not 'supported' by Panda's DirectX exporter.

However, it seemed to work anyway.

Here is the link I found the exporter at, incase any one cares:
http://www.andytather.co.uk/Panda/direc ... loads.aspx

Thanks everyone for your help!
eXodus
Posts: 320
Joined: Tue Jan 04, 2005 10:07 am
Location: Canada
Contact:

Post by eXodus »

.X format will also give you support for animation and 2 levels of textures. Don't know the exact name for this, I'm not an artist...
thecraft
Posts: 4
Joined: Tue Mar 22, 2005 10:59 pm
Location: Texas
Contact:

Post by thecraft »

Post Reply