Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Newbie- Light Normals question  (Read 5956 times)

gmppz28

  • Newbie
  • *
  • Posts: 2
    • View Profile
Newbie- Light Normals question
« on: April 16, 2009, 10:00:26 pm »

I search and couldn't find any information on this even though it's probably been asked a million times...but I've been struggling with this for some time.

I am trying to get the an8 models I generate to load into a DirectX application I am writing. I create just a simple sphere, add a material color to it, and save it as an an8 just to keep it.

Then I export it as a *.3ds file. I use conv3ds to convert it to an *.x file.

When I try to view it at this point (tried with deveral different viewers) it has no lighting normals whatsoever.

I am trying to determine if it is conv3ds or Anim8or which is dropping the normals. Is there something you need to do to tell Anim8or to create the lighting normals, or does it automatically create them when you export the file as 3ds?

Thanks!
-David

Logged

Claude

  • Sr. Member
  • ****
  • Posts: 285
    • View Profile
Re: Newbie- Light Normals question
« Reply #1 on: April 17, 2009, 12:11:34 am »

conv3ds exports normals by default.You need to use the -N
option to remove them.
Use the -x option to force a text file output.
Open it in a text editor to check if the normals are
there.
Logged

gmppz28

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Newbie- Light Normals question
« Reply #2 on: April 19, 2009, 10:22:29 am »

Thanks for the reply.

Here is the output of conv3ds for a simple triangle with shiny blue sides.

I exported it from Anim8or, then used "conv3ds -x BluTri.3ds"

It doesn't appear there are normals here, but I am not very familiar with x files. Is there something you have to do in anim8or to tell it to generate the normals?

-David



xof 0302txt 0064
Header {
 1;
 0;
 1;
}

Material x3ds_mat_ShinyBlue {
 0.054902, 0.035294, 0.913725, 1.000000;
 34.000000;
 1.000000, 1.000000, 1.000000;
 0.00, 0.00, 0.00;
}

Frame x3ds_mesh01 {
 Mesh mesh01 {

   4;
   -0.169208; 22.096481; -0.000008;,
   -0.169208; -7.591108; -20.992308;,
   18.010668; -7.591108; 10.496154;,
   -18.349085; -7.591108; 10.496154;

   4;
   3;0,2,1;,
   3;0,3,2;,
   3;3,0,1;,
   3;3,1,2;
  MeshMaterialList {
   1;
   1;
   0;
   {x3ds_mat_ShinyBlue}
  }
  MeshTextureCoords {
   4;
   0.500000;0.000000;,
   0.500000;1.000000;,
   1.000000;1.000000;,
   0.000000;1.000000;
  }
 }
}
Logged

Claude

  • Sr. Member
  • ****
  • Posts: 285
    • View Profile
Re: Newbie- Light Normals question
« Reply #3 on: April 19, 2009, 02:35:31 pm »

Here's what Steve,Anim8or creator, had to say on the subject a few years
back:

"UK2000, there is no provision for normals in the .3ds format. Anim8or simply can't export them. The .3ds format uses something called smoothing groups to determine which edges are creased which aren't 100% compatibale with Anim8or. The .3ds format also forces points with multiple texture coordinates for the different faces that share them to be split into multiple points. This is what causes the crease when you export a sphere from Anim8or to the .3ds format."

It doesn't explain the fact that conv3ds doesn't create face normals itself,
but it forces you to go another way.

On the script forum,you might want to try the x export scripts written
by users to see if they suit your needs.You could even modify them
if required.(text file and static mesh)

The other option would be the obj export function.I'm sure you could
find a obj to x converter somewhere.(Blender maybe)
Logged