Author Topic: about texturing g3d's  (Read 1838 times)

anonymousjim

  • Guest
about texturing g3d's
« on: 26 December 2010, 09:07:07 »
Hi all,

I use blender and the xml exporter and xml > g3d converter to make my models for Glest, however, I haven't the foggiest idea about texturing them.  Can it be done in the xml's?  If it can, I wonder if anyone would be kind enough to provide code samples perhaps?

I tried to apply my texture in blender but that didn't seem to carry throught to the g3d.  I don't know why :(

please help,
Thank you

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: about texturing g3d's
« Reply #1 on: 26 December 2010, 09:14:09 »
Textures are done to a separate TGA file. Please see the Glest Guide page for more information:
http://glestguide.co.cc/blender_tutorial2.php
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

anonymousjim

  • Guest
Re: about texturing g3d's
« Reply #2 on: 26 December 2010, 18:45:49 »
Ah, thanks, I'll be sure to check it out.  Yes I know about the tga's my question was purely regarding the implementation of the textures

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: about texturing g3d's
« Reply #3 on: 27 December 2010, 11:40:24 »
Hi Jim,

If your unit is correctly textured in Blender but solid grey in G3D Viewer this probably means you have not assigned a material and texture in Blender.

1. Add a material to your model.

2. Add a texture to the material.

3. Make the texture an image type and select your texture file (the image texture name is the property actually read by the python script).

4. Make sure your texture file is next to our model file when opening with G3D Viewer.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

anonymousjim

  • Guest
Re: about texturing g3d's
« Reply #4 on: 27 December 2010, 15:11:13 »
Great, that works! Thanks :)

anonymousjim

  • Guest
Re: about texturing g3d's
« Reply #5 on: 27 December 2010, 15:48:34 »
Hmm, I was wondering something else;

If I move the origional texture then will it mess up the g3d's texture?

As in, will I need to place all my textures in the unit folders before exporting as a g3d?

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: about texturing g3d's
« Reply #6 on: 27 December 2010, 16:04:52 »
If I move the origional texture then will it mess up the g3d's texture?

As in, will I need to place all my textures in the unit folders before exporting as a g3d?
It doesn't matter where it is when you export, as the format only remembers the name of the file.  The game and the g3d viewer both expect the texture to always be in the same folder as the g3d file.

anonymousjim

  • Guest
Re: about texturing g3d's
« Reply #7 on: 27 December 2010, 17:06:52 »
Nice, that's useful :)

Any way to use normal mapping?  My textures are looking pretty grim without it :/

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: about texturing g3d's
« Reply #8 on: 27 December 2010, 17:17:54 »
GAE supports normal maps.  I don't know how to use them, though.  It's probably best to ask over there.

Yggdrasil

  • GAE Team
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: about texturing g3d's
« Reply #9 on: 27 December 2010, 21:07:59 »
To add a normal map add _normal to the end of the  colour texture name (eg texture_castle_normal.tga) and in the same location as the colour texture.

It's not in any stable version. The latest snapshot might work.

tiger

  • Archmage
  • ******
  • Posts: 675
  • Don't rush it. Make it with Quality.
    • View Profile
Re: about texturing g3d's
« Reply #10 on: 28 December 2010, 07:21:22 »
Megaglest supports Jpeg png and other.....