LDraw.org Discussion Forums
Lpub3D 2.3.13 Native Render - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw File Processing and Conversion (https://forums.ldraw.org/forum-22.html)
+--- Thread: Lpub3D 2.3.13 Native Render (/thread-23578.html)

Pages: 1 2 3 4


Lpub3D 2.3.13 Native Render - Nico71 - 2019-07-24

Hello everyone,

On the good advice of Philo, I have started to test the new renderer of Lpub3D 2.3.12 and in deed, it is very fast comparing to ldview.

Therefore I have started to work on a new model using this one.

But I have a problem regarding the size of the model, size of the callout and the pli. I have noticed that the scale is not longer use and is replace now by fov camera and distance camera) but I do not understand how to work with it properly.

For my example, I have set :
  • Fov assembly : 20
  • Distance : -270 
  • Native factor : -270 (I have found a topic by Trevor which explain that -270 is A4 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 : 

[Image: 223E7cZ.png]

But I already noticed that the size of the assembly step by step changes, as the model goes bigger (with more parts), the camera seems to dezooming. 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.

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

[Image: htbJjsR.png]

The mode is very small and the callout too big. So I want to change that but :

When I change the distance camera (for this step only), I have to put +400 to see the model in the page but the callout comes very very very big, so I change the distance camera for the callout but it did not work (lpub add the meta in the callout but then delete when it is regenerate).

So I change the fov for the callout but it do not work well (it changes the first step but not the second and sometimes make an error : image empty, check the fov to 30 default).

The other problem is when I change the distance camera for the assembly only in the step, when I comes to an other page, and go to the first one, the pli is very big (the whole page). So changing the distance factor is not a very good an reliable way.

I can change the fov on the assembly but I have to put 4 or less which tend to generate error.

So basically I want to set the size of the pli, set the size of the model (like the scale in ldview), by rendering the last step of the whole model. And for the first step when the model is smaller, play with the fov or distance. 

It do not bother me that the camera auto zooming but this is pretty annoying of big step wich is too small and small step with is too big.

Therefore, If you have some clue or way to work with it, please tell me, I only want the proper way to work with it, because I think this new render is very interesting for rendering time. If I have to add meta on each step to have constant size or no problem, I will do. Or if I have a special configuration to do.

The most normal way to work for me, will that the camera not automatically zooming depending of the size of the model, in order the placement of the camera is only set by the fov and the distance, and if I want to zoom to see more or less, using the distance camera, but as I mentioned, it doesn't work like that. There are not many documentation of this new render and how to use.

Nicolas

ps : if you do not see the image, please tell me.


RE: Lpub3D 2.3.13 Native Render - Trevor Sandy - 2019-07-24

Hello Nicolas,

I cannot see your images - using Google Chrome.

Are your results as you describe when you use the default Native settings ?

For this model file...

Code:
0 FILE sample.ldr
0 sample
0 Name: sample.ldr
0 Author: foo
0 !LPUB PAGE LEGO_DISCLAIMER DISPLAY GLOBAL TRUE
0 !LPUB SUBMODEL_DISPLAY SHOW_INSTANCE_COUNT GLOBAL TRUE
0 !LPUB SUBMODEL_DISPLAY SHOW GLOBAL TRUE
1 4 0 0 0 1 0 0 0 1 0 0 0 1 3001.dat
1 4 -40 24 0 1 0 0 0 1 0 0 0 1 3001.dat
1 4 40 24 0 1 0 0 0 1 0 0 0 1 3001.dat
0 ROTSTEP END
1 4 80 0 0 1 0 0 0 1 0 0 0 1 3001.dat
1 4 120 24 0 1 0 0 0 1 0 0 0 1 3001.dat
1 4 40 -24 0 1 0 0 0 1 0 0 0 1 3001.dat
0 STEP
0 !LPUB CALLOUT BEGIN
1 1 -20 -8 0 1 0 0 0 1 0 0 0 1 subModel-1.ldr
0 !LPUB CALLOUT POINTER CENTER 0 0.253197 0.161765 0 0 0 0 0 0 1
0 !LPUB CALLOUT END
0 STEP
1 1 -60 16 0 1 0 0 0 1 0 0 0 1 subModel-2.ldr
0 ROTSTEP 0 -90 0 REL
1 1 100 -8 0 1 0 0 0 1 0 0 0 1 subModel-2.ldr
0 ROTSTEP 0 180 0 REL
1 1 140 16 0 1 0 0 0 1 0 0 0 1 subModel-1.ldr
0 ROTSTEP 0 90 0 REL
0 STEP
0 !LPUB INSERT MODEL
0 !LPUB INSERT PAGE
0 STEP
0 !LPUB PAGE LEGO_DISCLAIMER PLACEMENT BOTTOM PAGE INSIDE
0 !LPUB INSERT COVER_PAGE BACK
0 NOFILE
0 FILE submodel-1.ldr
0 Name: subModel-1.ldr
0 Author: foo
1 1 0 0 0 1 0 0 0 1 0 0 0 1 87580.dat
0 ROTSTEP END
0 !LPUB CALLOUT DIVIDER
1 14 0 -24 0 1 0 0 0 1 0 0 0 1 3062b.dat
0 STEP
0 NOFILE
0 FILE submodel-2.ldr
0 Name: subModel-2.ldr
0 Author: foo
1 1 0 0 0 1 0 0 0 1 0 0 0 1 87580.dat
0 ROTSTEP END
1 25 0 -24 0 1 0 0 0 1 0 0 0 1 3062b.dat
0 STEP
0 NOFILE

Here are LDView and Native rendered pdf instruction documents.

[attachment=3866]
[attachment=3867]

Are your results similar to mine for the model file above ?

Cheers,


RE: Lpub3D 2.3.13 Native Render - Nico71 - 2019-07-24

Hello Trevor,

Looks like the same (exept I am in orthographic and not perspective but size seems the same). I have attached the two file.

I have corrected the image in my previous post.

Regarding the default native seeting, I do not know how to set to default because I remenber that the factor was -260 at the begining, and you said -270 of the presentation post of the new render. So I do not know which number to make.

If you have a proper way to work (like a tutorial), I would humbly appreciated.


RE: Lpub3D 2.3.13 Native Render - Trevor Sandy - 2019-07-24

Quote:Regarding the default native seeting, I do not know how to set to default because I remenber that the factor was -260 at the begining, and you said -270 of the presentation post of the new render. So I do not know which number to make.

The correct default camera distance factor is -260. 

You can confirm this by opening any model file that does not include a meta command that specifically redefines this camera attribute, for example, sample.ldr previously provided. 

An example of the meta command that redefines all step assemblies to use -270 would look like this.
Code:
0 !LPUB ASSEM CAMERA_DISTANCE_NATIVE FACTOR GLOBAL -270

Once the model file is opened, you can see the default settings at Configuration->Build Instructions Setup...

For Assembly Setup... the dialogue would look like this for the Native renderer:

[attachment=3871]

...and like this for LDView, LDGLite or POV-Ray:

[attachment=3872]

Quote:I have attached my file. You can see the problem on page 61 where I did not find how to deal with the difference of zoom.

Many thanks. Indeed, I do see the changes in size of the CSI. i will take a look on my side to see if this behaviour is automatic or related to your configuration settings. It would also be helpful to see your preferences settings as shown in this GitHub ticket.

Quote:If you have a proper way to work (like a tutorial), I would humbly appreciated.


You can see the available tutorials from Help->Online manual or at the LPub3D GitHub Page, as shown below.

[attachment=3873]

If I determine an update is required to achieve the expected behaviour, there is a pre-release Continuous Build at the LPub3D production repository. You can download the latest build for Windows (installed and portable distros), Linux AppImage, Ubuntu, Arch, Fedora and macOS platforms.

A continuous build pre-release exists when the Revision badge is greater than 0. At present the current revision for v2.3.12 is 49, you can also check if an update interesting for you is available from the list of recent commits (i.e. corrections) available at the Last Commit badge.

Cheers,


RE: Lpub3D 2.3.13 Native Render - Jaco van der Molen - 2019-07-25

Following this discussion, I run into the same problems as Nico.
Large models are rendered fine, but submodels in a call out bigger then the main model.

In build v2.3.12 49 highlight new parts seems broken, because my model renders in all color 16 (yellowish)...


RE: Lpub3D 2.3.13 Native Render - Trevor Sandy - 2019-07-25

(2019-07-25, 14:42)Jaco van der Molen Wrote: Following this discussion, I run into the same problems as Nico.
Large models are rendered fine, but submodels in a call out bigger then the main model.

In build v2.3.12 49 highlight new parts seems broken, because my model renders in all color 16 (yellowish)...

I can confirm there is a size anomaly between called out and main model CSIs when using the Native renderer. It is because the same camera distance factor is being used for the pair, so when a factor adjustment is made to the main model CSI, the adjustment is also applied to the called out CSI; thus creating the abnormal size difference between the pair. I’m currently investigating and a correction is in progress.

Cheers,


RE: Lpub3D 2.3.13 Native Render - Nico71 - 2019-07-26

Thanks Jaco for your searching.

Regarding the tutorial, I did not find if it is better using the camera distance or the fov for set a size of a model in a page. I have followed the tutorial before but it works fine for small model, not very big.

I have attached the configuration page, I do not know if you need it as you already discover the issue.

I hope you will be able to figure out the problem and solve it, I would love to finish my instructions using native render and not ldview which is slow even with a good computer  Big Grin


RE: Lpub3D 2.3.13 Native Render - Nico71 - 2019-07-28

I have tried to understand how it works and come to a new problem, the pli becomes abnormally big.

[Image: 0JkEvtS.jpg]

The global setup is 
  • 150dpi, A4 size
  • -270 distance factor camera
  • Assembly : -270 fov 15
  • PLI : -270 fov 30

The code for the assembly : 

[Image: h44OHZP.jpg]

You can see that I have put the fov and the distance local to 2 and -50 in order to increase the size of the assembly. And consequently the callout becomes very big, so I add a fov of 30 local : 

[Image: bwdFjkq.jpg]

But as you can see, the first step of the callout is still too big and the second seems to be at the normal size, but the PLI in the assembly of the page becomes way to big. I do not understand because normally the value of the fov and distance for the pli is set in the setup. (you can see also that the 5L beam is bigger that the 15L beam which is abnormal too but constant in the native render).

And when I go to the setup, I see that :

[Image: 4NCxLeY.jpg][Image: ekc1lvr.jpg]

Is this normal that the fov and distance on the setup changes ? 

------------------------------------------------------

So to sum up, I do not make any progress, I am at the point where I have to ask you Trevor a question : do you know if the problem of native render can be solved easily and quickly ? Or does it take many times to complete ? Depending of you answer, I will switch of not on ldview rendering (but I have to restart all that is why) because making the instructions of this model become urgent. What do you advise to me ?


RE: Lpub3D 2.3.13 Native Render - Jaco van der Molen - 2019-07-28

The only solution I found is to add this meta (example) to every step of a submodel that is in a callout to match the scale of the main model:

0 !LPUB ASSEM CAMERA_DISTANCE_NATIVE FACTOR LOCAL -370

So the default factor is -260. Decrease the local factor even more to match the scale. Perhaps you need to go lower then -370

Something like this in your model where submodel 72 is used on page 61

Code:
0 Name: subModel-72.ldr
0 Author: Nico
0 !LPUB ASSEM CAMERA_DISTANCE_NATIVE FACTOR LOCAL -370
1 72 0 0 0 0 -1 0 1 0 0 0 0 1 41239.dat
1 1 -20 0 -120 -1 0 0 0 1 0 0 0 -1 6558.dat
1 1 -20 0 -80 -1 0 0 0 1 0 0 0 -1 6558.dat
1 1 0 0 -60 1 0 0 0 -1 0 0 0 -1 6558.dat
1 1 0 0 40 1 0 0 0 -1 0 0 0 -1 6558.dat
1 1 -20 0 -40 -1 0 0 0 1 0 0 0 -1 6558.dat
0 STEP
0 !LPUB ASSEM CAMERA_DISTANCE_NATIVE FACTOR LOCAL -370
1 0 -20 0 -80 0 -1 0 1 0 0 0 0 1 32316.dat



RE: Lpub3D 2.3.13 Native Render - Trevor Sandy - 2019-07-29

I've performed an interim update to the camera position routines that treats the abnormal Callout and PLI sizes. You can download a DevOps continuous build to evaluate the new behaviour. See GitHub ticket #323 for full details.

Here are some shots from the update:

[attachment=3898]

[attachment=3899]

Cheers,