md2 normal 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
papaonn
Posts: 30
Joined: Thu Jan 30, 2014 5:38 pm

md2 normal problem

Post by papaonn »

Hi,

May i know if someone also facing this problem?
I have my (.md2) model imported to irrlicht, but then the normal is just spoiled and the lighting is all wrong.

I had turned on the debugger for drawing the normals,
they are pointing the wrong directions and so i decided to recalculate normal again from blender and
tried export again but this time the normal lines had disappeared, and lightings are still wrong.

May i know how do i resolve this problem?

Thank you.
horvatha4
Posts: 12
Joined: Sun Feb 23, 2014 6:03 am
Location: Rheiland-Pfalz, Germany
Contact:

Re: md2 normal problem

Post by horvatha4 »

Hi!
There is a class -> irr::scene::IMeshManipulator. Try it! It has flip sufaces and many more function.
The doc say:
"An interface for easy manipulation of meshes.
Scale, set alpha value, flip surfaces, and so on. This exists for fixing problems with wrong imported or exported meshes quickly after loading. It is not intended for doing mesh modifications and/or animations during runtime."
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: md2 normal problem

Post by CuteAlien »

If you are scaling your model then you have to set NormalizeNormals in the material.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply