(C#) SetFrameLoop causes model distortion

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
enigmatic
Posts: 8
Joined: Mon Oct 13, 2003 1:06 pm

(C#) SetFrameLoop causes model distortion

Post by enigmatic »

This is in C# using the Irrlicht.Net.dll that came with the 1.1 release

Using the Milkshape 3d zombie file from

http://www.psionic3d.co.uk/cgi-bin/imag ... D%20Models

I get this result:
Image

But when I used SetFrameLoop I get this:
Image

Offending code
IAnimatedMeshSceneNode node;

public Zombie(IrrlichtDevice dev) :base()
{
device = dev;
mesh = device.SceneManager.GetMesh("../../../media/zombie02.ms3d");
node = device.SceneManager.AddAnimatedMeshSceneNode(mesh, null, -1);
node.SetMaterialTexture(0, device.VideoDriver.GetTexture("../../../media/zombie.jpg"));
node.Position = new Vector3D(2000, 4000, 2000);
node.AnimationSpeed = 1000;
node.SetFrameLoop(1, 16);
node.SetMaterialFlag(MaterialFlag.NORMALIZE_NORMALS, true);
node.Scale = new Vector3D(2, 2, 2 );
speed = 1;
}

The only difference in the two is the "node.SetFrameLoop(1, 16);" line was commented out in the first.
Mancuso Raffaele
Posts: 70
Joined: Sat Dec 17, 2005 4:43 pm
Location: licata (AG) italy
Contact:

Post by Mancuso Raffaele »

I also use the same model and i had the same problem.it is caused by the fact that the first frme of the model is that. use setframeloop with the first value >2
Bye all,
Mancuso Raffaele (Ares FPS game)
noone88
Posts: 49
Joined: Sat May 27, 2006 3:28 pm

Post by noone88 »

and you have to mulitply your framenumbers by something about 41.6... this value can change under some circumstances.

It's also possible that you get some strange rotations when you use ms3d files. this depends on the model.

I have also fixed this ms3d problems. if you want i can upload a patch
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Yes, please. :)
Post Reply