Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Feature] Add "Native" renderer based on 3DViewer (LeoCAD library) #71
For optimum performance, add integrated "Native" renderer based on 3DViewer (LeoCAD).
Add "Native" renderer to optimum performance and image quality. The 3DViewer (LeoCAD) library offers a step up in quality from LDGLite with similar rendering speed and significant rendering speed improvement over LDView.
First iteration completed.
Camera Distance Factor
The Native renderer uses the integrated LeoCAD module which does not use the "L3P" pattern to define camera globe settings. Consequently, I have improvised a "Factor" that can be adjusted manually to properly scale rendered images. At present, a factor of 270 is suitable for rendering images with a scale of 1 on A4 portrait. This is the default Factor currently set in LPub3D for the Native renderer. As an example, 450 is the factor for .5 scale on A4 landscape. Simply adjust the scale on the Project Setup dialogue and render a sample page until your images are suitable to your liking.
The Project Setup dialogue now offers the ability to select your renderer.
When setting a camera distance factor other than the default, you may choose to set the GLOBAL camera distance factor as an LPub3D meta command in your model file...
You also have the choice to apply page-specific LOCAL camera distance factors in the event your document is mixed orientation and/or mixed page size using the page context menu.
Lastly, you can choose to set your factor as an application setting (i.e. in the registry, plist, ini etc..) by checking the "Set as default" box. This approach allows you to forfeit adding meta commands to your model file. Uncheck the "Add meta command" box to avoid adding Native camera distance meta commands to your model file. This setting is global so it is not advisable to use it on mixed page/orientation instructions.
I consider this scheme interim until I work out an algorithm to automatically calculate a reasonable camera distance taking into account the myriad of scale and page-width configurations possible.