Subject:
|
surface normals and vertex normals for OpenGL
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Sun, 7 Mar 2004 02:39:00 GMT
|
Highlighted:
|
(details)
|
Viewed:
|
1814 times
|
| |
| |
Hello,
I have some LDraw animation projects in mind and am starting by making a simple
viewer using OpenGL. I have a program that will read a file and display it,
but I run into problems with the shading because it only does flat shading. I
think I need to specify vertex normals to get smooth shading, but the LDraw
format doesn't lend itself to that kind of thing since the polygons are
specified independently and could be scattered throughout the file. Are vertex
normals what I need, and is there a good way to calculate them for LDraw files?
When calculating surface normals I've run into some parts that get some strange
shading. I'm guessing that it's because some polygons are CW and others are
CCW. One particular file that I looked at (3626BPS4.DAT, minifig head with SW
grey beard) is not BFC, so it wouldn't be a surprise if they weren't consistent.
Assumming that that's the problem, is it necessary to go through the file
manually, polygon by polygon, to determine which way the normals should go and
whether they're consistent, or is there some way to automate that (or part of
it)?
Thanks,
Brian Durney
|
|
Message has 1 Reply: | | Re: surface normals and vertex normals for OpenGL
|
| (...) I suspect this has been talked about in this group before, but probably not all in one thread. I'll try to summarize the things to look out for. First of all, you are correct in that any files that aren't BFC-certified have polygons with (...) (21 years ago, 7-Mar-04, to lugnet.cad.dev)
|
9 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|