Author Topic: Crash with mesh bound particles  (Read 1893 times)

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Crash with mesh bound particles
« 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)
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Crash with mesh bound particles
« Reply #1 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  :(
« Last Edit: 13 March 2015, 22:38:52 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Crash with mesh bound particles
« Reply #2 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
« Last Edit: 3 April 2016, 16:28:19 by filux »
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Crash with mesh bound particles
« Reply #3 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
« Last Edit: 3 April 2016, 16:28:37 by filux »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Crash with mesh bound particles
« Reply #4 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)
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Crash with mesh bound particles
« Reply #5 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/
« Last Edit: 15 March 2015, 23:13:21 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Crash with mesh bound particles
« Reply #6 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.
« Last Edit: 3 April 2016, 16:27:45 by filux »
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Crash with mesh bound particles
« Reply #7 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.

« Last Edit: 16 March 2015, 01:18:35 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Crash with mesh bound particles
« Reply #8 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.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Crash with mesh bound particles
« Reply #9 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
 
« Last Edit: 17 March 2015, 09:24:22 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

 

anything