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
6977  |  6979
Subject: 
DirectX and .dat
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 27 Feb 2002 16:44:42 GMT
Viewed: 
358 times
  
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 project on displaying a ldraw
model using DirectX 7 (In delphi 5 std). I managed to get the recursive
reading of the files just fine and I am now able to draw a wireview of a
model. But I am having problems converting the coordinates into normals
and vertices. As of a result most of the polygons are kinda inseout or
something. I found out about the triangle decompiling of directx and
corrected some of the poly's but it's still not right. (I can place a p
mugshot on my website of current results if needed)

Is there someone here who can direct me to some information about this
translation problem or exemples.

I discovered in this newsgroup the ldview program and it's source, but
is this compatible with directx or should i shift to opengl alltogether?

I am only a beginner in 3D and directx so this project of mine is more a
learing thing than creating a usefull program at the moment.

Roland



Message has 3 Replies:
  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
 
(...) 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
 
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)

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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