Beitrag
von drlava » So 20 Sep, 2009 2:12 am
Hi Decix,
The normal vectors are a tool for the software to easily implement 'Hidden Surface' features on 3D objects. A normal vector is composed of 3 blanked points, with points 1 and 3 identical, and point 2 (marked with the special 'normal' flag in CAT and memory) away from 1 and 3 in the direction of the surface normal. They serve to mark a direction for a scanned 3D surface, so the playback software can decide whether to display the surface or not during scanning, depending on the orientation of the normal vector relative to the point of view. If,after all rotations of the frame and world, the normal vector is directed away from the point of view, the points that come after the normal vector are not displayed until the next normal vector is reached in the scan sequence. If the normal vector IS directed toward the point of view, then the points after the normal vector are displayed. Note that these features only work when the HiddenSurface flag is enabled.
A few caveats:
1) normal vector 'backface culling' only works well for 3D objects that do not fold back on themselves, like cubes, spheres, balloons, rectangles, etc. This technique would not work well for complex shapes.
2) The normal vectors are defined by a bit flag in the CAT file, and I have not found any ILDA bit that is able to trigger this 'normal vector' flag upon loading. So, the normal vector flag can currently only be set in an editor that can edit CAT files directly. I would prefer that, perhaps, unused ILDA bit 13 or similar could be set to indicate a normal vector point when the ILDA file is loaded. ILDA loading routine in LDS could be restricted to only recognize this as a Normal flag if the 'normal' point is flanked by two identical blanked points without the flag. This way, this sequence of 3 blanked points could be used to enable 3D Hidden Surface function in ILDA files that could be created by external programs.
(google translate)
Die Normalenvektoren sind ein Instrument für die Software auf einfache Weise umzusetzen "versteckten" Features auf 3D-Objekten. Ein normaler Vektor besteht aus 3 ausgeblendet Punkten zusammengesetzt, wobei die Nummern 1 und 3 identisch, und die Nummer 2 (mit normalen "Flagge, die die besondere" mit Katzen-und Gedächtnisses) vom 1 und 3 in Richtung der Flächennormalen. Sie dienen dazu, eine Richtung für eine gescannte 3D-Oberflächen-Marke, so dass die Wiedergabe-Software kann entscheiden, ob an der Oberfläche oder nicht während des Scannens angezeigt werden, abhängig von der Ausrichtung der Normalenvektor bezogen auf die Sicht. Wenn nach alle Drehungen des Rahmens und der Welt, den Normalenvektor weg von der Sicht gerichtet ist, sind die Punkte, die nach der Normalenvektor kommen nicht bis zur nächsten Normalenvektor angezeigt wird, in der Scan-Sequenz erreicht. Wenn der Normalenvektor ist auf die Sicht gerichtet, dann die Punkte nach dem Normalenvektor angezeigt werden. Beachten Sie, dass diese Funktionen nur funktionieren, wenn die HiddenSurface Flag aktiviert ist.
Ein paar Einschränkungen:
1) Normalenvektor "backface Keulung" funktioniert nur gut für 3D-Objekte, die nicht wieder falten sie auf sich selbst, wie Würfel, Kugeln, Luftballons, Rechtecke, usw. Dieses Verfahren würde nicht gut für komplexe Formen zu arbeiten.
2) Die normale Vektoren sind durch eine Bit-Flag in der CAT-Datei definiert, und ich habe keine gefunden ILDA Bit, das in der Lage ist, diese "Normalen" Flagge beim Laden auslösen. So kann der Normalenvektor Flagge derzeit nur in einem Editor, CAT-Dateien direkt bearbeiten können eingestellt werden. Ich würde es vorziehen, daß vielleicht 13 oder ähnlichen ungenutzte ILDA-Bit gesetzt könnte zu einem Normalenvektor Punkt, wenn die ILDA-Datei geladen wird angegeben werden. ILDA Laderoutine in LDS könnte eingeschränkt werden, um nur diesen als normaler Flag, wenn das "normale" Punkt wird durch zwei identische ausgeblendet Punkte, ohne die die Flagge flankiert erkennen. Auf diese Weise konnte diese Folge von 3 ausgeblendet Punkte verwendet werden, um 3D versteckten Funktion in ILDA-Dateien, die von externen Programmen geschaffen werden könnten, zu ermöglichen.