Author Topic: White Gradient Texture  (Read 3936 times)

Mark

  • Guest
White Gradient Texture
« on: 30 September 2010, 01:58:52 »
In Blender
In G3D Viewer
In Game (Megaglest)

If the pictures don’t tell the story, the problem here for me is that my model has a white-gradient texture, not the one I gave it.  I know that this is probably a basic problem, but I have struggled with it for months.  As illustrated by the pictures, somehow the texture shows up in blender but not in the G3D viewer or in glest.  Since there are such a wide variety of ways in which the problem could have originated, I suppose I should divide them into categories of ways it could have happened.
1st (and, in my opinion, most likely) option: All the buttons you see when you do texturing in blender are hard to leave alone.  I might have modified some setting which made things much different and caused the problem.
2nd option: There could be something wrong with the texture.  I doubt this.  The texture is 24 bit, uncompressed, tga, and 512 by 512.  Nothing seems wrong about that to me.
3rd (and most implausible) option:  Something is wrong with an archaic model I made, maybe before the crash?  This really seems far-fetched, but I can’t see how it is the other two.  This option would explain the way that this white gradient thing occurs: I make a model from scratch in blender, and it works absolutely fine, but then I append an old model (in this case it was the tents and their contents) which had been made between 6-9 months before.  The problem now is in the model, and I can’t get rid of it, even by deleting the appendages.
By the way… This problem has been happening to me for at least 10 months, probably more.  It is just that I have gotten really fed up about it.  By 10 months ago, I mean before my computer's crash, so that has nothing to do with it.

I would upload the files but I can't do that now

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: White Gradient Texture
« Reply #1 on: 30 September 2010, 02:08:46 »
90% likely: Either the material or the texture isn't applied to that particular object.  You have to set the material for each mesh object, and they don't necessarily have to be the same.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: White Gradient Texture
« Reply #2 on: 1 October 2010, 18:56:13 »
Did you make sure to link the texture to the object from the buttons window?

Try the texturing tutorial to see how:
http://glest.110mb.com/
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Mark

  • Guest
Re: White Gradient Texture
« Reply #3 on: 1 October 2010, 21:14:03 »
Did you make sure to link the texture to the object from the buttons window?
Yes.  No effect.  The problem is not that simple.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: White Gradient Texture
« Reply #4 on: 1 October 2010, 21:20:45 »
Post the file?

Mark

  • Guest
Re: White Gradient Texture
« Reply #5 on: 3 October 2010, 02:01:41 »

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: White Gradient Texture
« Reply #6 on: 3 October 2010, 20:53:10 »
Hmm... hard to tell.  Does it render normally for you?

Mark

  • Guest
Re: White Gradient Texture
« Reply #7 on: 4 October 2010, 01:58:02 »
In blender, I think it does.  The picture seems fine, right?

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: White Gradient Texture
« Reply #8 on: 5 October 2010, 21:20:09 »
It's hard to tell what's wrong, since I have to make modifications just to get the texture to show up in Blender (due to the file path).  I had a similar problem a little while ago.  I went into edit mode, selected everything, P > "by material", and then went back into object mode and re-joined everything together.  It worked.  However, my problem was only for part of the object, while part of it had a texture, so I have no idea if this applies.

Mark

  • Guest
Re: White Gradient Texture
« Reply #9 on: 6 October 2010, 01:08:14 »
But can you export a perfectly rendering texture?  See, I used to get either the white or a black texture, though that might have to do with the direction the polys are facing...  Anyways, things are perfect in blender, but not in G3D form.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: White Gradient Texture
« Reply #10 on: 7 October 2010, 16:51:56 »
Try using relative paths and see if that helps.  I had to do that to even see the texture properly in Blender (instead of that ugly pink color).

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: White Gradient Texture
« Reply #11 on: 7 October 2010, 23:59:39 »
The pink color just means that blender can't find the texture. When I produce models, I usually work on the desktop for fast access, then move the files to appropriate folders when done, so if I forget to make the files relative, the links will get broken after the move (since they will still look for the files on the desktop). It has nothing to do with exporting to Glest though, as only the file name, not the path, is used in the G3D.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Mark

  • Guest
Re: White Gradient Texture
« Reply #12 on: 10 October 2010, 00:57:11 »
Try using relative paths and see if that helps.  I had to do that to even see the texture properly in Blender (instead of that ugly pink color).
That's what you said last time.  It doesn't work.  It worked on some of the models, but most were not affected.  The two it worked on had other problems which could have been the root.  Anyways, does the model work when you export it or not?  I'm getting desperate here!   :confused:  Most of my models don't have the problem, so not fixing it is not a disaster for me.  I just worked for hours on that model, and now it doesn't work.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: White Gradient Texture
« Reply #13 on: 10 October 2010, 02:04:20 »
Hmm... I suppose I'll download and try...

EDIT// Taking a look at the pre-conversion XML, it simply isn't exporting the texture or texture coords. No clue why. Attempting workarounds...

EDIT2// Nope, no luck. Sorry. Tried another model format, and it worked (directX), so I'm thinking a possible converter bug, but no clue what could be causing it...
« Last Edit: 10 October 2010, 02:43:48 by Omega »
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: White Gradient Texture
« Reply #14 on: 10 October 2010, 03:12:22 »
Anyways, does the model work when you export it or not?
I can't tell until/unless I get on one of the computers at uni, where I do my 3D work.  I'll keep this marked as unread as a reminder.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: White Gradient Texture
« Reply #15 on: 22 October 2010, 22:33:47 »
Bump!  Just got around to taking a look at this again.  Don't ask me to understand the logic behind this, as I honestly don't know, but it seemed like an obvious thing for me to try and it worked.

You've got 12 materials attached to this model (they add up over time if you don't know what you're doing), so I deleted all of them and made a new one using the usual method.


Then I exported and it worked fine.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: White Gradient Texture
« Reply #16 on: 23 October 2010, 00:27:38 »
Bump!  Just got around to taking a look at this again.  Don't ask me to understand the logic behind this, as I honestly don't know, but it seemed like an obvious thing for me to try and it worked.

You've got 12 materials attached to this model (they add up over time if you don't know what you're doing), so I deleted all of them and made a new one using the usual method.


Then I exported and it worked fine.
Nice detective work, Sherlocks! Hmm, I wonder why I didn't notice that? I saw there was a ton of materials, and took a while trying to figure out which one was the correct one, but never realized that they ALL were linked to the file... I knew you could have multiple textures, but didn't know you can have multiple materials too.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Mark

  • Guest
Re: White Gradient Texture
« Reply #17 on: 1 November 2010, 02:12:03 »
Thank you. 

Also, the problem is fixed when I export to 3ds and import the model again.  Weird.

 

anything