Author Topic: linux only bug: g3d viewer shows meshes with GL_CULL_FACE  (Read 3698 times)

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Many models show themselves inside out in the viewer.  

Maybe the models have their normals flipped.  The models are likely broken.

But I've seen these "broken" models in most mods - its a very common problem.  And they show ok in-game.

« Last Edit: 21 May 2011, 22:26:01 by ultifd »

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #1 on: 9 May 2011, 17:26:51 »
Many models show themselves inside out in the viewer. 

Maybe the models have their normals flipped.  The models are likely broken.

But I've seen these "broken" models in most mods - its a very common problem.  And they show ok in-game.
This is a problem with the models, not the viewer.  We can rebuild them.  We have the technology.  Better, faster, stronger...

https://forum.megaglest.org/index.php?topic=7083.0

The Magitech models in GAE are already fixed, so even just porting those over to MG would be a significant size reduction.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #2 on: 10 May 2011, 05:31:27 »
I stand that the viewer ought to be completely exactly loyal to the game.

The particles also draw differently because of z-order.

It would be far better for the drawing code to be shared.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #3 on: 10 May 2011, 05:44:25 »
I stand that the viewer ought to be completely exactly loyal to the game.

The particles also draw differently because of z-order.

It would be far better for the drawing code to be shared.
+1  :thumbup:
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #4 on: 10 May 2011, 17:53:45 »
Fair enough, but the models should still be fixed, for performance and file size considerations.  Most of the Megapack models are broken in the current SVN version -- some of them are bloated to several times their necessary size (Archmage Tower ~100KB -> 27.2KB) and most of them (anything other than original Magitech assets) is double-sided.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #5 on: 10 May 2011, 18:43:56 »
Fair enough, but the models should still be fixed, for performance and file size considerations.  Most of the Megapack models are broken in the current SVN version -- some of them are bloated to several times their necessary size (Archmage Tower ~100KB -> 27.2KB) and most of them (anything other than original Magitech assets) is double-sided.
Also in agreement, though both would be nice.

This might be a bit early to say, as it's still an alpha, but I think that the G3D "hack" tool silnarm made should replace the G3D viewer once/if it supports particles (not entirely sure if it can, and not on my computer).
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: bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #6 on: 21 May 2011, 22:13:54 »
No problems on windows.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile



On linux.
« Last Edit: 21 May 2011, 22:43:57 by ultifd »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: linux only bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #8 on: 22 May 2011, 04:20:05 »
I've definitely seen that before on windows. Not sure if it's in the current version, and don't have time to check, but unless it's been fixed in the past, it should still be there.
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: linux only bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #9 on: 22 May 2011, 04:27:01 »
Never seen that problem on Windows before. I also viewed the same model that Will had...

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: linux only bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #10 on: 22 May 2011, 06:39:41 »
It could be a winding issue perhaps?  I am not sure how the cull_face is exactly involved here.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: linux only bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #11 on: 6 June 2011, 11:32:47 »
@will:  Can you give us an example g3d which shows this bug?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: linux only bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #12 on: 6 June 2011, 12:25:19 »
The tripod in martians is shown in my screenshot

I was a bit quick to say it was cull face fault, that was based on simply looking at the symptoms and guessing

Maybe its a near z plane problem instead?  (Another guess)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: linux only bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #13 on: 6 June 2011, 16:42:15 »
I tried it now and I don't have/see any problems :-/ .  ( megaglest g3dviewer from 3.5.2 official binary release linux 32 bit ubuntu 10.04 nvidia )
Tomreyn also has problems with the g3d viewer, but this seems to be related to the open source ATI driver.
You maybe also use ATI?

« Last Edit: 6 June 2011, 16:45:04 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: linux only bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #14 on: 6 June 2011, 20:32:53 »
Intel integrated on Linux

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: linux only bug: g3d viewer shows meshes with GL_CULL_FACE
« Reply #15 on: 6 June 2011, 22:47:57 »
Can you upload just that one model (and texture) since I don't have the mod on hand and am curious if it would appear for me too... I have certainly seen such a problem in the past, sometimes even the reverse, appearing like that in Blender, but properly in the viewer...
Edit the MegaGlest wiki: http://docs.megaglest.org/

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