.X file format, works, almost....ideas anyone?

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
jdoyle1983
Posts: 5
Joined: Thu Mar 09, 2006 10:03 am

.X file format, works, almost....ideas anyone?

Post by jdoyle1983 »

This is probably a simple fix, and beleive me, I've shuffled through the forums for almost 4 hours, and nothing.

I've am playing with maps, in an attempt to find a decent way to create maps using blender. Got the maps made, export them in .X format, load them in MVIEWER, everything look hunky-dorey, but wehn loaded into irrlicht, it draws the texture on the wrong side of the faces!

So I did the obvious, I flipped the normals during export, loaded into MVIEWER (where they appeared inversed), and loaded it back into irrlicht, SAME THING.

Okay, step 2, turn off back culling, did that, SAME THING. Apparently somewhere along the line there is an issue that I'm over looking, if someone could give me some pointers, I would greatly appreciate it!

The Image in Blender:
http://www.realityshift.co.nr/jdoyle/helppics/1.png

MVIEWER No Flip Normals:
http://www.realityshift.co.nr/jdoyle/helppics/2.png

Irrlicht Render With No Flip Normals (Looking Up From The Bottom):
http://www.realityshift.co.nr/jdoyle/helppics/3.png

MVIEWER With Flip Normas:
http://www.realityshift.co.nr/jdoyle/helppics/4.png

Irrlicht Render With Flip Normals (Looking Up From The Bottom):
http://www.realityshift.co.nr/jdoyle/helppics/5.png

The pics may be a bit hard to see, but it's applying the texture to the underside of the mesh, rather than the top, no matter if I flip normals or not.

Enabling no back culling doesn't seem to have any effect either.. Any clues anyone??? It's got to be a simple mistake, and one I would greatly appreciate someone pointing out, thanx in advance!
<PLACE WITTY COMMENT HERE>
Heizi
Posts: 30
Joined: Mon Oct 10, 2005 11:23 am
Location: Steinach/Baden

Post by Heizi »

I dont know whether it helps you but
you could import the x file in Deled
and try to save it in dmf. Or use
another tool and try another format.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

How are you flipping the normals in the one loaded into irrlicht? are you flipping them in blender or within irrlicht with the mesh manipulator?
Image Image Image
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

I am an artis, and don't know really irrlicht, but...

try inside blender a recalc normals outside (ctrl+n )

Then apply the material.

Try to uncheck double sided inside blender. Do a render now to check what happens.

Also, sometimes vertex face order inverter has similar effects than flip normals, but if not detected, no matter how much yyou flip normals as wont happen.

You have, inlatest Blender 2.41 and latest Ben's x plugin -download from his site- a setting to flip normals. As I happen to think it well could be he ensures an only possibility of exporting...hmmm...NO. The mview already showed cool the inverted normals.

Also...Optic...effects. Sometimes it looks like inverted, while is what happens when there's no light: your actually not seing in the perspective you think u're seing, and it's really inverted perspective. Put a light so to check.

Also, maybe is not though for looking from inside. maybe is an engine glitch...look only from outside as normally would, to check in engine...


pd: very few 3d tools can change verex face order...Blender can't I think.
Finally making games again!
http://www.konekogames.com
jdoyle1983
Posts: 5
Joined: Thu Mar 09, 2006 10:03 am

Post by jdoyle1983 »

JP, I wasn't aware you could do this within Irrlicht, I'll look into that and see if it helps.

vermeer, I guess I really didn't give enough information, I'm using Blender 2.41 with Bens latest exporter, and mviewer shows it correctly, so I pretty sure it has to be in irrlicht somewhere. Also, I turned lighting off on the mesh, so it *shouldn't* need an external light (my understanding anyway, correct me if I'm wrong, but never needed one before). If back culling is one, the "top" where the object should extrude from, is invisible, but the bottom is is perfect, so I'm pretty sure it's an issue with which way the faces are being drawn.

I'll look into changing it in irrlicht, and let you all know how it turned out.

Thanx for the ideas!
<PLACE WITTY COMMENT HERE>
jdoyle1983
Posts: 5
Joined: Thu Mar 09, 2006 10:03 am

Post by jdoyle1983 »

Just want to let everyone know, flipping the mesh in irrlicht did the trick, draws it perfect, JP, thanx for the tip, I really appreciate it.

Everyone, thanx for you help.

And people actually have the nerve to say the help forums here are terrible......*sigh* I don't understand people......

Thanx again.
<PLACE WITTY COMMENT HERE>
Guest

Post by Guest »

JP, I wasn't aware you could do this within Irrlicht, I'll look into that and see if it helps.

vermeer, I guess I really didn't give enough information, I'm using Blender 2.41 with Bens latest exporter, and mviewer shows it correctly, so I pretty sure it has to be in irrlicht somewhere. Also, I turned lighting off on the mesh, so it *shouldn't* need an external light (my understanding anyway, correct me if I'm wrong, but never needed one before). If back culling is one, the "top" where the object should extrude from, is invisible, but the bottom is is perfect, so I'm pretty sure it's an issue with which way the faces are being drawn.

I'll look into changing it in irrlicht, and let you all know how it turned out.

Thanx for the ideas!
Post Reply