Exporting Contour Lines Along with Snapshot in LDView


Exporting Contour Lines Along with Snapshot in LDView
#1
Question 
Even though I set LDView to display contour lines, I do not see these in the exported snapshots.
Is this even possible in LDView? In my mind, the definition of "snapshot" meant something closer to a screen capture. The only two reason I'm not actually capturing my screen and re-cropping the image later on is that I want large detailed images and I use transparent bricks.
Additionally, is it possible to get monochrome part faces (no lighting, just plain colours... as in a cartoon?)
Thanks.


--
G.D. Grant
Reply
RE: Exporting Contour Lines Along with Snapshot in LDView
#2
Adding a picture would help understanding what your problem is. Apparently it is not this:

   

w.
LEGO ergo sum
Reply
RE: Exporting Contour Lines Along with Snapshot in LDView
#3
(2021-09-23, 20:56)G.D. Grant Wrote: Even though I set LDView to display contour lines, I do not see these in the exported snapshots.
Is this even possible in LDView? In my mind, the definition of "snapshot" meant something closer to a screen capture. The only two reason I'm not actually capturing my screen and re-cropping the image later on is that I want large detailed images and I use transparent bricks.
Additionally, is it possible to get monochrome part faces (no lighting, just plain colours... as in a cartoon?)
Thanks.


--
G.D. Grant

I have no idea what you mean by "contour lines". LDView snapshots should look very similar to just taking a screen grab. They do have the added ability (with PNG snapshots) to have the background be transparent, as well as allowing you to choose arbitrary dimensions. However, since the actual snapshot rendering is done via a different mechanism from on-screen rendering, FSAA might not work for snapshots. While Antialiasing is the only setting I can think of that doesn't work, I could be forgetting something else.

In the Effects tab of LDView's preferences, uncheck "Lighting" to get solid colors. If you want outlines only, go to the Geometry tab, enable Edge Lines, and also enable "Show edges only".
Reply
RE: Exporting Contour Lines Along with Snapshot in LDView
#4
(2021-09-23, 23:35)Travis Cobbs Wrote: I have no idea what you mean by "contour lines". LDView snapshots should look very similar to just taking a screen grab. They do have the added ability (with PNG snapshots) to have the background be transparent, as well as allowing you to choose arbitrary dimensions. However, since the actual snapshot rendering is done via a different mechanism from on-screen rendering, FSAA might not work for snapshots. While Antialiasing is the only setting I can think of that doesn't work, I could be forgetting something else.

In the Effects tab of LDView's preferences, uncheck "Lighting" to get solid colors. If you want outlines only, go to the Geometry tab, enable Edge Lines, and also enable "Show edges only".

First off, thank you for the lighting tip, I wasn't aware of that.
OK, so taking a SCREENSHOT looks like this:
[Image: tymjgqn72z1aked9g.jpg?size_id=4]
And exporting a SNAPSHOT looks like this:
[Image: tmo73rnzcssnnql9g.jpg]
The edge lines have disappeared (by "contour lines" I did mean edge lines, my bad for using the wrong term.)

Peace.


--
G.D. Grant
Reply
RE: Exporting Contour Lines Along with Snapshot in LDView
#5
I just found the problem...
Look at what a SMALLER SNAPSHOT outputs:
[Image: 1y7hua9i2qf14419g.jpg?size_id=5]
This is because the edge line thickness is not scaled along with the image export size.
I should have thought of it earlier...
Any way to fix this? Using maximum thickness isn't enough for my particular situation. I'm exporting very large images.

Thank you so much for your help, and have a splendid day.


--
G.D. Grant
Reply
RE: Exporting Contour Lines Along with Snapshot in LDView
#6
(2021-09-24, 15:05)G.D. Grant Wrote: This is because the edge line thickness is not scaled along with the image export size.
I should have thought of it earlier...
Any way to fix this? Using maximum thickness isn't enough for my particular situation. I'm exporting very large images.

The line thickness you select is measured in pixels (but multiplied by the scale factor when that is active, for example on a Retina Mac display, or on Windows with a UI scale greater than 100%). This may not be the best for snapshots, but it's not going to change. Additionally, the underlying OpenGL driver that is installed on the computer has a maximum value for this. Finally, LDView's UI only lets you select from a limited range (which is obviously not enough for your large snapshots).

The good news is that you can specify any arbitrary value using the -EdgeThickness=n command line option. The actual maximum will be clamped by your OpenGL driver, but it should be quite a bit higher than what LDView's UI lets you select. I believe that the value supported by OpenGL is often different when "Antialias lines" is enabled in the General tab of LDView's preferences. I don't know if it is higher or lower when that is enabled, but I believe it can be different.

The bad news is that very large values for EdgeThickness tend to produce extremely bad results where the edges join together. I attempted to fix that in the past, but never had any luck. Feel free to experiment with larger values set via the command line.
Reply
RE: Exporting Contour Lines Along with Snapshot in LDView
#7
(2021-09-24, 16:37)Travis Cobbs Wrote: The good news is that you can specify any arbitrary value using the -EdgeThickness=n command line option. The actual maximum will be clamped by your OpenGL driver, but it should be quite a bit higher than what LDView's UI lets you select. I believe that the value supported by OpenGL is often different when "Antialias lines" is enabled in the General tab of LDView's preferences. I don't know if it is higher or lower when that is enabled, but I believe it can be different.

You bring up a very interesting option I was not aware of, here. Before this I didn't know of any program using the the same binary file for both the graphical program and the command line tool.
Anyhow, I've been trying to export snapshots from the command line, and it returns no errors, but I can't find the exported snapshot... Isn't it supposed to be in C:\Program Files\LDView, in this case (I am trying to export a snapshot of "spaceman-head.ldr" to a PNG, as a test)?
[Image: 1ytff0h21qvrh2c9g.jpg?size_id=7]
Here is the command I typed (I'm using the Windows 10 Command Prompt tool):
Code:
C:\Program Files\LDView>LDView64 spaceman-head.ldr -SaveSnapshot=spaceman-head.png
Did I do something wrong?

Thanks again for your help. It's very appreciated.


--
G.D. Grant
Reply
RE: Exporting Contour Lines Along with Snapshot in LDView
#8
(2021-09-24, 18:11)G.D. Grant Wrote: Here is the command I typed (I'm using the Windows 10 Command Prompt tool):
Code:
C:\Program Files\LDView>LDView64 spaceman-head.ldr -SaveSnapshot=spaceman-head.png
Did I do something wrong?

Windows does not allow you to write to Program Files. You are trying to get LDView to create spaceman-head.png inside the LDView directory in Program Files. It looks like you don't have LDView 4.4 installed, since that should include LDView.com in that directory. (The timestamp on LDView64.exe confirms that it is not 4.4.)

If you install LDView 4.4, you can run LDView.com instead of LDView64.exe, and it will show you errors. (Since LDView64.exe is a graphical application, it is not possible for it to output text to the Windows command line. LDView.com is a wrapper introduced in LDView 4.4 that runs LDView64.exe while seeing to it that errors get printed.) I believe that it would have told you that it was unable to create spaceman-head.png in this case.

If you run "C:\Program Files\LDView\LDView64.exe" "C:\Program Files\LDView\spaceman-head.ldr" -SaveSnapshot=spaceman-head.png from your user directory, it should succeed.
Reply
RE: Exporting Contour Lines Along with Snapshot in LDView
#9
(2021-09-24, 19:30)Travis Cobbs Wrote: Windows does not allow you to write to Program Files. You are trying to get LDView to create spaceman-head.png inside the LDView directory in Program Files. It looks like you don't have LDView 4.4 installed, since that should include LDView.com in that directory. (The timestamp on LDView64.exe confirms that it is not 4.4.)

If you install LDView 4.4, you can run LDView.com instead of LDView64.exe, and it will show you errors. (Since LDView64.exe is a graphical application, it is not possible for it to output text to the Windows command line. LDView.com is a wrapper introduced in LDView 4.4 that runs LDView64.exe while seeing to it that errors get printed.) I believe that it would have told you that it was unable to create spaceman-head.png in this case.

If you run "C:\Program Files\LDView\LDView64.exe" "C:\Program Files\LDView\spaceman-head.ldr" -SaveSnapshot=spaceman-head.png from your user directory, it should succeed.

Oh, I see. Apparently an even easier way of getting through this is running CMD with administrative permissions (Start+R [run dialogue], type CMD, and press Ctrl+Shift+Enter).
And now I see what you mean when you say the antialiasing function isn't working properly. I guess I could try to retrace the edge lines over the exported image using a graphics editing program (e.g. Inkscape.) At least now I can make them large enough to make the job easier.
A thousand thanks for all your help. I'm really enthusiast to have found out that LDView was controllable via the command prompt using LDView.com (I've now installed version 4.4.)
Peace.


--
G.D. Grant
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)