Geometry in .egg not producing collision data

Hi,

I’m trying to sort of re-create the Roaming Ralph sample using my own ground geometry but my .egg file doesn’t seem to be producing the data.

I manually added the line:

<Collide> { Polyset keep descend }

just under the first

<Group>

tag.

But if I look at the model in pview and do Shift+L to show the nodes it only says there is a GeomNode, this is the same in DirectTools.

I’ve also tried using FenrirWolf’s method ([url]GeomNode vs CollisionPolygon]) but that doesn’t seem to work either, maybe I’m using it wrong.

Could anyone help? Anyone else come across this problem?

Thanks for the help,

Poncho

P.S. Here is my .egg file:

<CoordinateSystem> { Z-Up }

<Texture> Tex1 {
  "../../textures/Tiles/tile_choke1.png"
  <Scalar> format { rgba }
  <Scalar> wrapu { repeat }
  <Scalar> wrapv { repeat }
  <Scalar> minfilter { linear_mipmap_linear }
  <Scalar> magfilter { linear }
  <Scalar> envtype { modulate }
}
<Group> character {
  <Collide> { Polyset keep descend }
  <Dart> { 1 }
  <Group> Tile_Choke1 {
    <VertexPool> Tile_Choke1.verts {
      <Vertex> 0 {
        -64.3666 -57.5964 2.40486
        <UV> { 0 0.0447805 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 1 {
        -64.3666 -65.5964 2.40486
        <UV> { 0 0 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 2 {
        -56.3666 -65.5964 2.40486
        <UV> { 0.0447805 0 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 3 {
        -56.3666 -57.5964 2.40486
        <UV> { 0.0447805 0.0447805 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 4 {
        -48.3666 -65.5964 2.40486
        <UV> { 0.0895611 0 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 5 {
        -48.3666 -57.5964 2.40486
        <UV> { 0.0895611 0.0447805 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 6 {
        -48.3666 -49.5964 2.40486
        <UV> { 0.0895611 0.0895611 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 7 {
        -56.3666 -49.5964 2.40486
        <UV> { 0.0447805 0.0895611 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 8 {
        -64.3666 -49.5964 2.40486
        <UV> { 0 0.0895611 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 9 {
        -40.3666 -65.5964 2.40486
        <UV> { 0.134342 0 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 10 {
        -40.3666 -57.5964 2.40486
        <UV> { 0.134342 0.0447805 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 11 {
        -32.3666 -65.5964 2.40486
        <UV> { 0.179122 0 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 12 {
        -32.3666 -57.5964 2.40486
        <UV> { 0.179122 0.0447805 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 13 {
        -32.3666 -49.5964 2.40486
        <UV> { 0.179122 0.0895611 }
        <Normal> { 0 0 1 }
      }
      <Vertex> 14 {
        -40.3666 -49.5964 2.40486
        <UV> { 0.134342 0.0895611 }
        <Normal> { 0 0 1 }
      }

EDIT: Cut out most of the .egg file because it was way too long.

I just tried adding the tag to some other ground files I have and none of them are producing CollisionNodes so it’s not just that file.

the mighty rdb solved this in IRC but for anyone else who might have the same problem, it’s the tag.

That’s for actos and either 3dsmax decided my model had animation or dae2egg did but if you remove that line it works.

Thanks rdb!

Poncho

i dont know what u did, but my model still doesnt work.

i made it look like this:

<CoordinateSystem> { Y-Up-Left }

<Comment> {
  "x2egg -noabs -model 'C:\Users\Thijs\wereld_1_1.x' 'C:\Users\Thijs\wereld_1_1_test.egg'"
}
<Texture> tref1 {
  colormap_1_1.png
}
<Material> mref1 {
  <Scalar> diffr { 0.64 }
  <Scalar> diffg { 0.64 }
  <Scalar> diffb { 0.64 }
  <Scalar> specr { 0.5 }
  <Scalar> specg { 0.5 }
  <Scalar> specb { 0.5 }
  <Scalar> shininess { 96.0784 }
}

<Group> Root {
  <Collide> { Polyset keep descend }
  <Transform> {
    <Matrix4> {
      1 0 0 0
      0 0 1 0
      0 1 0 0
      0 0 0 1
    }
  }

  <Group> Grid_001 {

    <Transform> {
      <Matrix4> {
        1 0 0 0
        0 1 0 0
        0 0 1 0
        0 0 0 1
      }
    }
    
    <Group> {
      <VertexPool> vpool1 {
      
        <Vertex> 0 {
          -0.529412 -0.14477 0.011765
          <Normal> { -0.430959 0.807258 -0.403248 }
        }
        <Vertex> 1 {
          -0.537255 -0.148235 0.011765
          <Normal> { -0.39889 0.859887 -0.318562 }
        }

but still thee is no collision detected between a collisionray that i KNOW hits the model (using lookat and stuff) and this model.

anybody got an idea?

Have you tried using the collision visualiser (trav.showCollisions(render)) to debug the problem? Does it show intersections?

Did you scale the empty object to 0? It doesnt work then.

i tried the visualising thing, but no collision is generated, and what is scaling empty objects?