3D Part Preview added to Parts Tracker


RE: 3D Part Preview added to Parts Tracker
(2022-07-04, 20:10)Orion Pobursky Wrote: LDraw contains no data for surface normals. Said shading only happens because the normals are inferred and subbed in. Just like cylinders and cone can be inferred from the file name. It's all the same process.

I can't comment on the WebGL renderer. However, some of the confusion here in terminology seems to perhaps be based on LDView's settings. LDView's realtime renderer has two independent settings: "Primitive Substitution", and "Smooth Curves". The former produces new triangles (which also happen to have known correct surface normals). There is a slider that allows you to control the smoothness of this generated geometry. The latter tries to infer surface normals based on the presence of conditional edge lines in the LDraw file which are treated as indicating that polygons on either side of the conditional edge are intended to be part of a smooth surface.

LDView's POV-Ray exporter also has the same two settings. In this case, "Primitive Substitution" uses truly curved POV-Ray geometric primitives for recognized LDraw primitives. These don't produce triangles at all, but mathematically generated subpixel-perfect geometric shapes. "Smooth Curves" tries to infer surface normals based on the lack of an edge line between two polygons indicating that the two polygons are intended to be part of a smooth surface.

In my opinion, surface normal generation based on a heuristic ("Smooth curves" in LDView) does not qualify as primitive substitution. One could argue that substitution is happening (a calculated surface normal at 90 degrees to the surface is being substituted with a different surface normal). However, since the 90-degree surface normal is also calculated, I think that "substitution" doesn't really apply here. Furthermore, there is no primitive involved here.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: 3D Part Preview added to Parts Tracker - by Travis Cobbs - 2022-07-05, 16:31

Forum Jump:


Users browsing this thread: 3 Guest(s)