New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add "Native" renderer based on 3DViewer (LeoCAD library) #71

Closed
trevorsandy opened this Issue Aug 28, 2018 · 1 comment

Comments

1 participant
@trevorsandy
Owner

trevorsandy commented Aug 28, 2018

Subject

For optimum performance, add integrated "Native" renderer based on 3DViewer (LeoCAD).

Environment

  • Version of LPub3D - v2.2.2
  • Operating system - OS Name, All

Solution

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.

@trevorsandy trevorsandy added the feature label Aug 28, 2018

@trevorsandy trevorsandy added this to the v2.3.0 milestone Aug 28, 2018

@trevorsandy trevorsandy self-assigned this Aug 28, 2018

@trevorsandy

This comment has been minimized.

Owner

trevorsandy commented Aug 28, 2018

First iteration completed.

You can now choose the LPub3D "Native" Renderer at the renderer combo control in Preferences.
screenshot - 28_08_2018 21_00_20

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.

screenshot - 28_08_2018 21_03_40

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...

0 !LPUB PAGE CAMERA_DISTANCE_NATIVE FACTOR GLOBAL 450

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.

screenshot - 28_08_2018 21_23_44

0 !LPUB PAGE CAMERA_DISTANCE_NATIVE FACTOR LOCAL 420

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.

Cheers,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment