Author Topic: Texture Issues  (Read 6391 times)

jacko161

  • Guest
Texture Issues
« on: 20 May 2010, 04:42:28 »
Every time i try to drop my model into the game glest crashes.... but when we remove the texture the model works fine
Bruce and i double checked every step in texturing but it still doesn't work

Any advice???

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Texture Issues
« Reply #1 on: 20 May 2010, 08:40:03 »
  • Does it show up in the G3D Viewer?  (I don't know if there's even a working Mac version of it. :look:)
  • Does the texture render properly in Blender? (i.e. add a camera and a lamp and hit F12)
  • Check the material's "map input" setting. (Default is Orco, needs to be changed to UV.)
  • Are there any spaces, capital letters, or symbols in the file name of your texture? (Everything should be lower-case letters, numbers, and underscores.  This includes file extensions, so .tga is fine but .TGA is not.)
  • Is the texture file in tga format? (Having the wrong format or having compression will cause a crash.)
  • Is the tga file saved with RLE compression turned off? (This is typically the culprit.  When in doubt, use "Save As..." instead of "Save", as GIMP will sometimes make assumptions.  Even if you've saved it before without compression, GIMP may still save it with compression.  It's ornery like that sometimes.)
  • Is the tga in the same directory as the g3d? (If your g3d is in /units/apeman/models, then your tga should be in /units/apeman/models also.)
  • Does your tga's file name exactly match the name that you assigned in Blender? (If it's looking for my_tex.tga, then it'd better not be mytex.tga.)

I hope one of those helps, because otherwise I'm at a loss.

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: Texture Issues
« Reply #2 on: 20 May 2010, 16:06:18 »
Yah, that's about it. I mainly thought of the name of it to have no spaces or caps and RLE compression to be off.
Get the Vbros': Packs 1, 2, 3, 4, and 5!

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Texture Issues
« Reply #3 on: 20 May 2010, 16:08:55 »
As a side note Mega-Glest supports PNG and JPG textures for models, perhaps try using a non TGA texture and see if it helps (I find TGA is quite picky)

Fluffy203

  • Guest
Re: Texture Issues
« Reply #4 on: 20 May 2010, 21:11:50 »
woah really , i've never seen png or jpg used in games at all , i've only seen .dds , .tga and unusual , but every now and then .gif .

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Texture Issues
« Reply #5 on: 21 May 2010, 16:57:57 »
Most likely RLE compression.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Texture Issues
« Reply #6 on: 21 May 2010, 17:58:59 »
Ok so we should add a check to the code to spit out errros if the modder did not enable compression instead of just crashing.

jacko161

  • Guest
Re: Texture Issues
« Reply #7 on: 23 May 2010, 23:07:36 »
No it's not compression the Tga is uncompressed but it still crashes :( idk what to do

Gabbe

  • Guest
Re: Texture Issues
« Reply #8 on: 23 May 2010, 23:08:20 »
post the texture and model here so we can fix it for you.

jacko161

  • Guest
Re: Texture Issues
« Reply #9 on: 23 May 2010, 23:09:02 »
mmk well they are basic drafts not of very high quality.

do you want it in .blend or .g3d format?
« Last Edit: 28 May 2010, 15:30:40 by Omega »

Gabbe

  • Guest
Re: Texture Issues
« Reply #10 on: 23 May 2010, 23:12:33 »
.blend thanks, and idc about quality ;)

jacko161

  • Guest
Re: Texture Issues
« Reply #11 on: 23 May 2010, 23:14:30 »
ok well sorry my USB is at home can i post it up tonight?

i can give you the texture but not the .blend
« Last Edit: 28 May 2010, 15:31:02 by Omega »

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Texture Issues
« Reply #12 on: 23 May 2010, 23:24:22 »
i can give you the texture but not the .blend
Something is better than nothing.

jacko161

  • Guest

Gabbe

  • Guest
Re: Texture Issues
« Reply #14 on: 23 May 2010, 23:28:42 »
Only green?

jacko161

  • Guest
Re: Texture Issues
« Reply #15 on: 23 May 2010, 23:29:56 »
well yeah cause no textures that i make will work so bruce and i tried a basic texture

Gabbe

  • Guest
Re: Texture Issues
« Reply #16 on: 23 May 2010, 23:34:00 »
is .JPG format supported/useable for it? that may cause it. i`ll test now.
« Last Edit: 28 May 2010, 15:31:19 by Omega »

Gabbe

  • Guest
Re: Texture Issues
« Reply #17 on: 23 May 2010, 23:39:30 »
A worker with a Worker XML from Original Tech with MegaGlest worked fine, perhaps XML is messed up?

jacko161

  • Guest
Re: Texture Issues
« Reply #18 on: 23 May 2010, 23:45:36 »
you want the XML?

Gabbe

  • Guest
Re: Texture Issues
« Reply #19 on: 23 May 2010, 23:49:30 »
uhm...i hate to admit, but im a noob in XML, D.H?

jacko161

  • Guest
Re: Texture Issues
« Reply #20 on: 23 May 2010, 23:52:14 »
thats fine we are checking my xml to someone elses that worked to see if its messed up

Gabbe

  • Guest
Re: Texture Issues
« Reply #21 on: 23 May 2010, 23:53:27 »
 :O okay, hope i`ve helped solving it

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Texture Issues
« Reply #22 on: 24 May 2010, 00:02:00 »
It renders fine on a dummy model in Blender, but is it really a 512x512 TGA that's only 8KB?  If so, then there has got to be some kind of compression going on, because an uncompressed TGA that size is almost 800KB.  I tested it by renaming it "texture_golem.tga" (replacing the Golem's regular texture), and it crashed Glest when I tried to run it.  I opened the texture and saved it again, turning off RLE compression and it worked flawlessly.  Despite your objections, RLE compression is what's causing the problem.

(By the way, testing with MegaGlest doesn't do us much good, because it supports different image formats.)

Gabbe

  • Guest
Re: Texture Issues
« Reply #23 on: 24 May 2010, 00:04:01 »
give us the image and we un-compress it!  :O

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Texture Issues
« Reply #24 on: 24 May 2010, 00:12:40 »
Y'all are using the GIMP for your textures, right?



See that check box?  It should not be checked.  Every time you save your image, make sure the box in un-checked, as the GIMP will forget your selection.  No matter how many hundreds of times you've saved the same image with RLE compression turned off, the next time you open GIMP, it will assume you want RLE compression turned on.  This is why you have to use "Save as..." instead of "Save" at least once per session, because GIMP forgets your selection every time you open it.