tbnall not working ?

Hi.

I have these models, exported into collada by 3dsmax ( I haven’t got the original, only the dae.

I want to import them as .egg.

I’ve try <<dae2egg.exe -noexist -tbnall -o “%s” “%s”>>

the mesh is exported, but without binormals.

so I tried to use egg-trans.exe to recreate an egg file with the birnormal, without success.

I tried with -tbn CHANNEL1 ( the name of the channel) but that doesn’t change anything.

piece of the egg file:

<CoordinateSystem> { Z-Up }

<Comment> {
  "egg-trans -tbnall -tbn CHANNEL1 -o 'C:/Users/Snorky/Desktop/collada\socle_porte.egg' 'C:/Users/Snorky/Desktop/collada\socle_porte.egg'"
}
<Comment> {
  "dae2egg -noexist -tbnall -o 'C:/Users/Snorky/Desktop/collada\socle_porte.egg' 'C:/Users/Snorky/Desktop/collada\socle_porte_temp.dae'"
}
<Texture> __socle_fenetre1.jpg {
  "map/1_socle_fenetre1.jpg"
  <Scalar> type { 2d }
  <Scalar> wrapu { repeat }
  <Scalar> wrapv { repeat }
  <Scalar> envtype { modulate }
  <Scalar> uv-name { CHANNEL1 }
}
<Material> socle_fenetre1 {
  <Scalar> diffr { 1 }
  <Scalar> diffg { 1 }
  <Scalar> diffb { 1 }
  <Scalar> ambr { 0.588235 }
  <Scalar> ambg { 0.588235 }
  <Scalar> ambb { 0.588235 }
  <Scalar> emitr { 0 }
  <Scalar> emitg { 0 }
  <Scalar> emitb { 0 }
  <Scalar> emita { 0 }
  <Scalar> specr { 0.9 }
  <Scalar> specg { 0.9 }
  <Scalar> specb { 0.9 }
  <Scalar> shininess { 0.415939 }

[...]
    <Group> socle_porte-mesh {
      <VertexPool> socle_porte-mesh {
        <Vertex> 0 {
          -28.8732 -12.8481 61.4697
          <UV> CHANNEL1 { 0.000499 0.803381 0.9995 }
          <Normal> { 0 -1 0 }
        }
        <Vertex> 1 {
          31.5252 -12.8481 61.4697
          <UV> CHANNEL1 { 0.9995 0.803379 0.9995 }
          <Normal> { 0 -1 0 }
        }
[...]
        <Polygon> {
          <TRef> { __socle_fenetre1.jpg }
          <MRef> { __socle_fenetre1 }
          <VertexRef> { 544 545 542 <Ref> { socle_porte-mesh } }
        }
        <Polygon> {
          <TRef> { __socle_fenetre1.jpg }
          <MRef> { __socle_fenetre1 }
          <VertexRef> { 546 547 548 <Ref> { socle_porte-mesh } }
        }
        <Polygon> {
          <TRef> { __socle_fenetre1.jpg }
          <MRef> { __socle_fenetre1 }
          <VertexRef> { 548 549 546 <Ref> { socle_porte-mesh } }
        }
      }
    }

Am I missing something ?

I’m think that -tbnall doesn’t work on the dae2egg command line, but it should certainly work on egg-trans. Are you sure you are looking at the right output file from egg-trans?

David

Since the first lines of the file is:

<CoordinateSystem> { Z-Up }

<Comment> {
  "egg-trans -tbnall -tbn CHANNEL1 -o 'C:/Users/Snorky/Desktop/collada\socle_porte.egg' 'C:/Users/Snorky/Desktop/collada\socle_porte.egg'"
}

I assuming it is the correct file

EDIT: I wondered if the fact that it use 3 coordinate for uv is the problem.
3dsmax seems to export 3 coordinates very often,…

Ah, that seems like a good guess. Does it even make sense to compute tangent and binormal for a 3-d texture? What does that even mean?

Do you really want the third texture coordinate? If not, there must be a way to ask Max not to create it.

David

If I have access to the max file, I can export them with tangent /binormal directly.

In this case I’ve only got the collada. It seems 3dsmax export 3d texture very often, maybe its the default texcoord.