MegaGlest Forum

MegaGlest => Bug reports => Topic started by: wciow on 11 March 2015, 17:23:59

Title: Crash with mesh bound particles
Post by: wciow on 11 March 2015, 17:23:59
Im making a unit for my goblin faction which uses a flaming torch. I tried to use the mesh bound particles feature but the game crashes.

I'm using the lastest 64bit Linux release. Commenting out the code the game runs fine, also binding the particles to a non-existent mesh gives an error in terminal but the game works ok.  Binding particle to a mesh crashes on startup and give the following error in terminal -

(click to show/hide)
Title: Re: Crash with mesh bound particles
Post by: titi on 13 March 2015, 15:35:30
Can you provide the xml(s) which makes trouble ?
Ideally the whole techtree ?

update: I can reproduce it now  :(
Title: Re: Crash with mesh bound particles
Post by: wciow on 13 March 2015, 23:33:31
This s the XML file -

(click to show/hide)

commenting out the <meshName> line allows the game to run and the particles show up normally as unit particles.

This is a zipped file of the current Goblins progress and setup.

Code: [Select]
http://www.tinyupload.org/qbtmd8b6rfy
Title: Re: Crash with mesh bound particles
Post by: titi on 15 March 2015, 00:49:42
can you try git version (3.12-dev) and tell me if it fixes the problem ?

Binary here ( only .exe needed ):
Code: [Select]
http://snapshots.megaglest.org/windows/megaglest-binary-win32-i386-3.12-dev.7z
Title: Re: Crash with mesh bound particles
Post by: wciow on 15 March 2015, 14:59:53
I'm using Linux so I grabbed the linux binaries instead. Not sure if they also have the fix?

Sadly it didn't work  :(

(click to show/hide)
Title: Re: Crash with mesh bound particles
Post by: titi on 15 March 2015, 22:31:43
Ok this looks like something else. Can you give me the model you use to do this ?

The mesh in the model where you want to bind your particles, does it maybe not have any triangles ? You cannot export a single point as a mesh in g3d.

Update: if possible join the chat ( in the european evening) so we can hunt down the bug together.
http://chat.megaglest.org/
Title: Re: Crash with mesh bound particles
Post by: wciow on 15 March 2015, 23:12:36
This is the model I'm using -

Code: [Select]
http://www.tinyupload.org/r72t2l2obwo
Its 2 separate meshes, stick.002 is the torch and plane.005 is the main model.

I will try experimenting a bit to see if I can get other models to work.
Title: Re: Crash with mesh bound particles
Post by: titi on 15 March 2015, 23:13:59
Ok, I found the problem now.
First problem is that the model you used had only 1 frame and by this no animation. I need to find a way to work around this, but the main problem was that
somehow the meshes are merged on loading in the game which is a bad idea in this case. I think I can fix it tomorrow, now I know what's wrong.

Title: Re: Crash with mesh bound particles
Post by: wciow on 16 March 2015, 14:36:07
Thanks Titi,  it seems single frame models don’t work with bound particles. Converted to 2 frame animated model and its working now.

This needs to be in the wiki as it will save other modders the hassle of finding this out the hard way.
Title: Re: Crash with mesh bound particles
Post by: titi on 16 March 2015, 21:00:52
have a look at meshName in the wiki:

https://docs.megaglest.org/XML/Unit_particle#meshName

Update: I still have trouble....
Update: ok now it works!

And a hint for particle positioning in general:
https://docs.megaglest.org/XML/Faction#flat-particle-positions see flat-particle-positions