Textures not loading

I’ve managed to get the rooms to be where I want them but I’m adding a grid of transparent squares that hide except when the cursor is over them so the player knows that the game knows where they are clicking. These squares are just 1x1 blender unit planes that use a transparent texture so they can still see what’s under the square.

I’m having trouble though with getting things to display properly. If I use the { Polygon } the texture displays properly in pview only. When I load the texture into my demo, it doesn’t show up at all and my mouse won’t even trigger the collision task for the squares. If I add the “keep” keyword to the collide property, the texture gets hidden by the collision mesh, which is just another plane of the same size and in the same space. The mesh is visible in pview and my demo and the collision task works. All it does is show the square when the mouse is over it and hides it again when it moves off of it.

Here is the egg file that I use for the selection square.

<CoordinateSystem> { Z-up } 
<Material> Material {
  <Scalar> diffr { 0.640000 }
  <Scalar> diffg { 0.640000 }
  <Scalar> diffb { 0.640000 }
  <Scalar> specr { 0.500000 }
  <Scalar> specg { 0.500000 }
  <Scalar> specb { 0.500000 }
  <Scalar> shininess { 12.5 }
  <Scalar> emitr { 0.000000 }
  <Scalar> emitg { 0.000000 }
  <Scalar> emitb { 0.000000 }
}

<Material> Material.003 {
  <Scalar> diffr { 0.640000 }
  <Scalar> diffg { 0.640000 }
  <Scalar> diffb { 0.640000 }
  <Scalar> specr { 0.500000 }
  <Scalar> specg { 0.500000 }
  <Scalar> specb { 0.500000 }
  <Scalar> shininess { 12.5 }
  <Scalar> emitr { 0.000000 }
  <Scalar> emitg { 0.000000 }
  <Scalar> emitb { 0.000000 }
}

<Texture> Texture.002 {
  "../images/selection.png"
  <Scalar> envtype { MODULATE }
  <Scalar> minfilter { LINEAR_MIPMAP_LINEAR }
  <Scalar> magfilter { LINEAR_MIPMAP_LINEAR }
  <Scalar> wrap { CLAMP }
}

  <Group> SelectSquareCollide {
    <Collide> { Polygon keep descend }
    <Transform> {
      <Matrix4> {
        0.500000 0.000000 0.000000 0.000000 
        0.000000 0.500000 0.000000 0.000000 
        0.000000 0.000000 1.000000 0.000000 
        0.000000 0.000000 0.000000 1.000000 
      }
    }
    
    <VertexPool> SelectSquareCollide {
    
      <Vertex> 0 {
        -0.5 -0.5 0.0
      }
      <Vertex> 1 {
        0.5 -0.5 0.0
      }
      <Vertex> 2 {
        0.5 0.5 0.0
      }
      <Vertex> 3 {
        -0.5 0.5 0.0
      }}
    
    
    <Polygon> {
      <MRef> { Material.003 }
      <Normal> {0.000000 0.000000 1.000000}
      <VertexRef> { 0 1 2 3 <Ref> { SelectSquareCollide }}
    }
  }
  <Group> SelectSquare {
    <Transform> {
      <Matrix4> {
        0.500000 0.000000 0.000000 0.000000 
        0.000000 0.500000 0.000000 0.000000 
        0.000000 0.000000 1.000000 0.000000 
        0.000000 0.000000 0.000000 1.000000 
      }
    }
    
    <VertexPool> SelectSquare {
    
      <Vertex> 0 {
        -0.5 -0.5 0.0
        
        <UV>  {
          0.000100 0.000100
        }
      }
      <Vertex> 1 {
        0.5 -0.5 0.0
        
        <UV>  {
          0.999900 0.000100
        }
      }
      <Vertex> 2 {
        0.5 0.5 0.0
        
        <UV>  {
          0.999900 0.999900
        }
      }
      <Vertex> 3 {
        -0.5 0.5 0.0
        
        <UV>  {
          0.000100 0.999900
        }
      }}
    
    
    <Polygon> {
      <TRef> { Texture.002 }
      <MRef> { Material }
      <Normal> {0.000000 0.000000 1.000000}
      <VertexRef> { 0 1 2 3 <Ref> { SelectSquare }}
    }
  }

Well, if it shows up fine in pview, then something must be wrong about the way you load it into Panda3D. Could there be factors (such as lighting) in your game that are influencing the way it is showing up? Are there any warnings on the command-line about missing textures? Are you perhaps looking at it from the wrong side?

Note that you have two groups, and you’re only setting the tag for the first. So if you set it to “keep” for the first, both the second group and the first group will be showing up as regular geometry.