Author Topic: G3dHack - alpha9  (Read 18004 times)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: G3dHack - alpha6
« Reply #25 on: 25 May 2011, 17:50:34 »
I scanned 2.4 without issue (though it took some time to get through those howitzer models... hint, hint), could you check G3dScan.log and see what file it balked on... must be something new, I need that g3d!
Hmm, working now, perhaps I just didn't give it enough time. Went totally unresponsive for a while, so made a bad assumption that it failed. Oh, yes, and something will have to be done about that Howitzer... Never realized how out of wack the poly count was.
« Last Edit: 25 May 2011, 17:54:26 by Omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: G3dHack - alpha7
« Reply #26 on: 28 May 2011, 00:20:27 »
Alpha7

Adds mesh delete & some animation hacking functions to g3dhack,
 * strip alternate frames
 * re-animate (interpolates new key-frames, use with caution)

and g3dscan can batch auto-optomise, performing the following steps on each g3d,
 * remove any unreferenced verts
 * weld duplicate verts
 * strip entire animation if actually static
 * if the mesh can be split into moving and static parts, it is, static parts have anim removed, all the submeshes from the split are re-merged into two new meshes.

Re texture manipulation,
Texture resampling can be done very easily with .NET, all in-built... but ImageMagick looks nice, for extended file support (and animated gifs) and could be integrated with ease.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: G3dHack - alpha7
« Reply #27 on: 28 May 2011, 06:51:29 »
Works great, yet, I still seem to be seeing that "refresh bug". Is it just me, or does anyone else see it?

ATI HD 4650, latest drivers
Windows 7 HP 64-bit SP1

Also, G3D Scan is crashing every time for me now, when I put Military's path in, on different files each time, so doesn't seem to be related to the file. No error message, just a generic windows error which doesn't even create a generic message, just says it has stopped working and only gives an option to close the program. :(
« Last Edit: 28 May 2011, 07:10:34 by Omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: G3dHack - alpha8
« Reply #28 on: 28 May 2011, 16:06:23 »
Ok, lets try again...
alpha8

fixed a couple of obscure bugs, and wrapped the g3d scan in a try {} catch {} block, so even if there are errors now, the scan will continue, the error message will just be embedded in the report. (the only file I know it fails on is tree1.g3d, (in core/data/menu/about_models/) which is actually completely unused, and besides that is a V2 g3d, which was always likely to be problematic.

I think I got the refresh bug properly this time, not sure why it was refreshing for me previously now!!

Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: G3dHack - alpha8
« Reply #29 on: 28 May 2011, 18:35:23 »
Woo! G3D scan worked, and far faster than before (except the howitzer, of course :P). Refresh bug is also gone. Good work. :D
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: G3dHack - alpha8
« Reply #30 on: 26 June 2011, 17:21:14 »
Hey, tried it out and i find it very useful, I am currently using it to re link textures, and shrink animations, for Annex which is being developed on megaglest. Game loads just fine and i'm able to play a game normally. However when i closed out i saw the debugger window full of errors! all are "...Error v4 model is missing texture...." upon checking the files all meshes have appropriate textures linked, and even in game said units have their textures displayed normally, and no crashes. Are G3D edited by this somehow incompatible with megaglest?

Btw all items that have this bug are edited from G3D hack...
« Last Edit: 26 June 2011, 17:29:39 by Ishmaru »
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: G3dHack - alpha8
« Reply #31 on: 26 June 2011, 19:09:48 »
Are G3D edited by this somehow incompatible with megaglest?
They shouldn't be, to my knowledge... Can you upload one (with its texture)?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: G3dHack - alpha9
« Reply #32 on: 29 June 2011, 00:44:06 »
Hey, tried it out and i find it very useful, I am currently using it to re link textures, and shrink animations, for Annex which is being developed on megaglest. Game loads just fine and i'm able to play a game normally. However when i closed out i saw the debugger window full of errors! all are "...Error v4 model is missing texture...." upon checking the files all meshes have appropriate textures linked, and even in game said units have their textures displayed normally, and no crashes. Are G3D edited by this somehow incompatible with megaglest?

My bad, there was a bug in alpha8 and any models saved by it will have all five texture slots marked as in use, but contain empty strings for paths (on those unused slots).  I actually fixed this a few weeks ago, and thought I had uploaded a new one... Must have got side tracked!

Fixed in alpha 9.

The models saved should all work fine in MG, the 'no select' flag is not supported by MG, and if you add textures to anything other than the diffuse slot you are just wasting texture memory (MG will load them, but not use them for anything).

NB: G3dHack monitors all loaded textures, if they are changed in another program, they are automagically reloaded, so if you are working on textures, this is probably a lot more convenient than using the G3dViewer ;)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: G3dHack - alpha9
« Reply #33 on: 3 July 2011, 03:48:13 »
Thanks Slinarm, edited G3D's work fine on MG now.  :)

PS Chupa mentioned about a new 3DS Max script, are u planning on working on one?
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: G3dHack - alpha9
« Reply #34 on: 3 July 2011, 07:27:08 »
PS Chupa mentioned about a new 3DS Max script, are u planning on working on one?
Except to make a script, you'd have to buy the multi-thousand dollar software...
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: G3dHack - alpha9
« Reply #35 on: 3 July 2011, 08:30:02 »
I thought we all knew a way to get expensive things...  :angel:

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: G3dHack - alpha9
« Reply #36 on: 3 July 2011, 11:17:06 »
PS Chupa mentioned about a new 3DS Max script, are u planning on working on one?
Except to make a script, you'd have to buy the multi-thousand dollar software...

Thats why I asked if he was planning on. He doesn't have to if he don't want to.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Gabbe

  • Guest
Re: G3dHack - alpha9
« Reply #37 on: 3 July 2011, 13:33:46 »
I thought we all knew a way to get expensive things...  :angel:

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: G3dHack - alpha9
« Reply #38 on: 7 April 2012, 14:16:09 »
I recently tried to use G3D hack to Re-Animate an old G3D that had over 100 frames. However G3D hack doesn't seem to handle G3D's that are over 100 frames. Would it be possible if this can be fixed?

Thank You!
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: G3dHack - alpha9
« Reply #39 on: 9 September 2012, 20:47:17 »
How does g3dhack handle - and show - normals if the G3D has 0,0,0 as the normal?

I ask as I think some of the models that Mr War is giving me have ... 0,0,0 as normals on some vertices.

I've double triple checked my code and I really think there are whole sections of the G3Ds coming out of Blender that 0-magnitude normals.

Yet g3dhack shows them (going exactly 1z).

Also, any chance of an auto-normals tool?  Do such things exist?  How can we get Mr War to actually use normals properly in the first place?

Yggdrasil

  • GAE Team
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: G3dHack - alpha9
« Reply #40 on: 12 September 2012, 16:14:32 »
Are you just guessing there are (0,0,0)-normals? Better make sure by instrumenting your code or use a hex editor.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: G3dHack - alpha9
« Reply #41 on: 15 September 2012, 18:53:13 »
I had checked manually in a hex editor.

Mr War confirmed that he hadn't done the normals after using some extrude tool or something in Blender.  He generated corrected G3Ds.

But, in the meantime, I did make a nice flat-shading auto-normals tool.  Now I'm exploring how to do mesh-based collisions.

Yggdrasil

  • GAE Team
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: G3dHack - alpha9
« Reply #42 on: 21 September 2012, 12:30:42 »
Semi-Offtopic:
As you use a hex editor too, you are maybe interested in a structure definition of G3D (v4, textured) for Okteta (KDE hex editor). With this one can easily investigate the values of the model. You can find the code in git master, source/glexemel/G3D/.

Here a picture of the tool (bottom right):
http://frinring.files.wordpress.com/2010/01/structures-tool-with-pngheader.png
And install instructions:
http://docs.kde.org/stable/en/kdesdk/okteta/tools-structures.html

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: G3dHack - alpha9
« Reply #43 on: 21 September 2012, 21:59:57 »
Hey that was pretty neat Yggdrasil.

For a long time I imagined making such a tool - a structured hex editor which understood structures, and a similar libstructure thing that would be equally useful for better-compressing files too.

All programmers dream of making tools I guess.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: G3dHack - alpha9
« Reply #44 on: 29 October 2013, 00:37:35 »
I just wanted to mention that I use this tool ( silnarms ) a lot now and it works very good  :thumbup:
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios