Skip to content
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

Abnormal image size when using Native renderer #323

Closed
trevorsandy opened this issue Jul 29, 2019 · 1 comment
Closed

Abnormal image size when using Native renderer #323

trevorsandy opened this issue Jul 29, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@trevorsandy
Copy link
Owner

@trevorsandy trevorsandy commented Jul 29, 2019

Subject

There is a problem regarding the size of the model, size of the callout and the pli when using the Native renderer. Reference: LDraw forum post.

Note that model scale is replaced by camera distance factor to resize images when using the Native renderer.

For this example, I have set :
Fov assembly : 20
Distance : -270
Native CD factor : -270 (-260 is equivalent to page size A4 and model scale 1)
Fov pli : 30 (I want the part a bit smaller)
Distance pli : -270

It works fine on the first step when the model is not too big, for instance :

223E7cZ

But notice that the size of the assembly step by step changes, as the model goes bigger (with more parts). You can see it comparing the first step and the 4th, I have not change anything, just add the step. You can see also that the callout is too big, with the same value. This is because of the fixed camera distance and fov values used for all images in the step group.

It becomes to be very complicated when the model is bigger, for instance on this picture :

htbJjsR

The mode is very small and the callout too big or the PLI is very big.

0JkEvtS

Environment

Version of LPub3D - 2.3.0
Operating system - All

Expected behaviour

Ability to consistently size callout, step group and PLI images using Native renderer

Actual behaviour

Currently, the other LPub3D renderers (LDView and LDGLite), uses the 'L3P-derived' camera globe settings, latitude, longitude, and camera distance, which is calculated for each image to pass the camera position from LPub3D to the renderer. However the Native renderer based on LeoCAD uses a different configuration. An arbitrary distance factor unit (A4 page size with model scale 1 is equivalent to -260) and fov (default is 30) is used to calculate the camera distance. When the same distance value is used for a page's CSI image where the page also contains a callout, the difference is scale between the page and callout CSI results in an abnormal size difference between the two images is shown in the problem description above.

Solutions

I will take an interim and longer term approach to solving this behaviour.

Longer term

The longer term solution will require completely revising the camera coordinate interface to allow the Native renderer to accept a dynamically calculated camera distance so each image is consistent in its size relative to the Lego Draw Unit (LDU), page size, resolution and image scale. This solution is in progress.

Interim

The interim solution will expand on the current renderer camera position configuration by creating individually configurable distance factor (Native), model scale (LDView, and LDGLite), fov and camera angles for single step, callout, and step group CSIs. PLI camera position settings are individually configured per PLI, this behaviour has not changed. The expanded settings enable each step in a multi-step page or unassembled callout to be individually configured with each camera position setting. The aim is to enable fine-grain camera position configuration for CSI and PLI image rendering. However for the Native renderer, the camera distance value must still be manually edited from the camera distance factor context menu or direct entry in the LDraw editor.

If you are using the Native renderer the default camera distance is -260. Negative (decreasing) values zoom out and positive (increasing) values zoom in. For example, -300 will generate a smaller image and -200 will generate a larger image.

Here are some shots that show the updated behaviour...

New callout global CSI camera settings
Screenshot - 29_07_2019 , 04_09_04

New step group global CSI camera settings
Screenshot - 29_07_2019 , 04_09_36

Parts List camera distance context menu for Native renderer
Screenshot - 29_07_2019 , 11_05_33

CSI assembly camera distance context menu for Native renderer
Screenshot - 29_07_2019 , 11_06_27

CSI callout assembly camera distance context menu for Native renderer
Screenshot - 29_07_2019 , 11_06_56

Main CSI camera distance factor set to 300
Screenshot - 28_07_2019 , 13_29_25

Callout CSI camera distance factor with default value -260
Screenshot - 28_07_2019 , 13_30_03

PLI image camera distance factor with default value -260
Screenshot - 28_07_2019 , 13_51_55

Step group page with 4th step CSI camera distance factor set to -225
Screenshot - 29_07_2019 , 04_15_24

Step group callout CSI camera distance factor with default value -260
Screenshot - 29_07_2019 , 04_15_56

Cheers,

@trevorsandy trevorsandy self-assigned this Jul 29, 2019
@trevorsandy trevorsandy added this to the v2.3.13 milestone Jul 29, 2019
@trevorsandy

This comment has been minimized.

Copy link
Owner Author

@trevorsandy trevorsandy commented Jul 29, 2019

Updated.

Cheers,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
1 participant
You can’t perform that action at this time.