To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 6978
  DirectX and .dat
 
Hi all. Tim Courtney directed me to this forum on an issue that's bugging me. I am into the Virtual Lego for about a year now and being a programmer i started to mess around myself with the dat files etc. Just for the fun of it I started a little (...) (23 years ago, 27-Feb-02, to lugnet.cad.dev)
 
  Re: DirectX and .dat
 
(...) It sounds like you need help finding the normal vector so that Direct X will prperly shade the triangle. you can find the normal vector for the vertex by calculating the cross product of two vectors taken from two sides of the triangle. I (...) (23 years ago, 27-Feb-02, to lugnet.cad.dev)
 
  Re: DirectX and .dat
 
(...) Of course you will have to convert this to a unit vector, by dividing each of the conponents by the length of the resulting vector. (23 years ago, 27-Feb-02, to lugnet.cad.dev)
 
  Re: DirectX and .dat
 
(...) You're probably running into trouble with the random polygon winding direction in most of the LDRAW parts. This causes problems with lighting and culling since the normals often point into the part rather than out of it. In opengl you can (...) (23 years ago, 27-Feb-02, to lugnet.cad.dev)
 
  Re: DirectX and .dat
 
(...) One other option (that I just added to LDView in OpenGL) is to use two directional lights that face in opposite directions. This probably won't work for the specular component, as the specular calculation actually requires the normal to be the (...) (23 years ago, 27-Feb-02, to lugnet.cad.dev)
 
  Re: DirectX and .dat
 
Thanks all, I am going to concetrate on them normals then. I even got some ideas on how to determn the correct direction for them by examening base lego parts. But first things first, back to math class for me :) Roland (...) (23 years ago, 1-Mar-02, to lugnet.cad.dev)

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR