discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

rendering png from command line

F
fractorr
Fri, Oct 30, 2020 8:30 PM

I am trying to generate images using command line options but having a hard
to doing what I want.  I have an object that I generate is several different
sizes based on a parameter and I would like to generate all the different
sizes so they are not fit to view all.  With that enabled the smaller sizes
actually look bigger than the larger sizes.

In the first image it is actually about a quarter of the size as the second
image, how do I make it look like it should from command line? I have a lot
of these to generate so doing them manually is not an option.  I assume I
would use the --camera option but not sure how I go about using it, any
suggestions or examples?

This is a small object
http://forum.openscad.org/file/t1255/test-3.png

This is a larger object
http://forum.openscad.org/file/t1255/test-2.png

--
Sent from: http://forum.openscad.org/

I am trying to generate images using command line options but having a hard to doing what I want. I have an object that I generate is several different sizes based on a parameter and I would like to generate all the different sizes so they are not fit to view all. With that enabled the smaller sizes actually look bigger than the larger sizes. In the first image it is actually about a quarter of the size as the second image, how do I make it look like it should from command line? I have a lot of these to generate so doing them manually is not an option. I assume I would use the --camera option but not sure how I go about using it, any suggestions or examples? This is a small object <http://forum.openscad.org/file/t1255/test-3.png> This is a larger object <http://forum.openscad.org/file/t1255/test-2.png> -- Sent from: http://forum.openscad.org/
W
Whosawhatsis
Fri, Oct 30, 2020 9:38 PM

You can use the --camera option to do what you want. You can also use the
equivalent $vpr, $vpt, $vpf and $vpd variables instead, which will also let
you preview your camera positioning inside OpenSCAD.

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#$vpr,$vpt,$vpf_and_$vpd

However, you'll need a pretty recent development snapshot (from the last
few weeks) for this method, since these variables were ignored in command
line usage until very recently.

On October 30, 2020 at 13:30:44, fractorr (fractorr@gmail.com) wrote:

I am trying to generate images using command line options but having a hard
to doing what I want. I have an object that I generate is several different
sizes based on a parameter and I would like to generate all the different
sizes so they are not fit to view all. With that enabled the smaller sizes
actually look bigger than the larger sizes.

In the first image it is actually about a quarter of the size as the second
image, how do I make it look like it should from command line? I have a lot
of these to generate so doing them manually is not an option. I assume I
would use the --camera option but not sure how I go about using it, any
suggestions or examples?

This is a small object
http://forum.openscad.org/file/t1255/test-3.png

This is a larger object
http://forum.openscad.org/file/t1255/test-2.png

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

You can use the --camera option to do what you want. You can also use the equivalent $vpr, $vpt, $vpf and $vpd variables instead, which will also let you preview your camera positioning inside OpenSCAD. https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#$vpr,_$vpt,_$vpf_and_$vpd However, you'll need a pretty recent development snapshot (from the last few weeks) for this method, since these variables were ignored in command line usage until very recently. On October 30, 2020 at 13:30:44, fractorr (fractorr@gmail.com) wrote: I am trying to generate images using command line options but having a hard to doing what I want. I have an object that I generate is several different sizes based on a parameter and I would like to generate all the different sizes so they are not fit to view all. With that enabled the smaller sizes actually look bigger than the larger sizes. In the first image it is actually about a quarter of the size as the second image, how do I make it look like it should from command line? I have a lot of these to generate so doing them manually is not an option. I assume I would use the --camera option but not sure how I go about using it, any suggestions or examples? This is a small object <http://forum.openscad.org/file/t1255/test-3.png> This is a larger object <http://forum.openscad.org/file/t1255/test-2.png> -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
TO
Trevor Orr
Fri, Oct 30, 2020 10:11 PM

I think I see, I can use the gui to find the translation, rotation and
distance numbers for the largest object and use those numbers for all of
the objects that I generate on the command line and then I should have the
desired outcome right?

On Fri, Oct 30, 2020 at 2:38 PM Whosawhatsis whosawhatsis@gmail.com wrote:

You can use the --camera option to do what you want. You can also use the
equivalent $vpr, $vpt, $vpf and $vpd variables instead, which will also let
you preview your camera positioning inside OpenSCAD.

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#$vpr,$vpt,$vpf_and_$vpd

However, you'll need a pretty recent development snapshot (from the last
few weeks) for this method, since these variables were ignored in command
line usage until very recently.

On October 30, 2020 at 13:30:44, fractorr (fractorr@gmail.com) wrote:

I am trying to generate images using command line options but having a
hard
to doing what I want. I have an object that I generate is several
different
sizes based on a parameter and I would like to generate all the different
sizes so they are not fit to view all. With that enabled the smaller sizes
actually look bigger than the larger sizes.

In the first image it is actually about a quarter of the size as the
second
image, how do I make it look like it should from command line? I have a
lot
of these to generate so doing them manually is not an option. I assume I
would use the --camera option but not sure how I go about using it, any
suggestions or examples?

This is a small object
http://forum.openscad.org/file/t1255/test-3.png

This is a larger object
http://forum.openscad.org/file/t1255/test-2.png

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I think I see, I can use the gui to find the translation, rotation and distance numbers for the largest object and use those numbers for all of the objects that I generate on the command line and then I should have the desired outcome right? On Fri, Oct 30, 2020 at 2:38 PM Whosawhatsis <whosawhatsis@gmail.com> wrote: > You can use the --camera option to do what you want. You can also use the > equivalent $vpr, $vpt, $vpf and $vpd variables instead, which will also let > you preview your camera positioning inside OpenSCAD. > > > https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#$vpr,_$vpt,_$vpf_and_$vpd > > However, you'll need a pretty recent development snapshot (from the last > few weeks) for this method, since these variables were ignored in command > line usage until very recently. > > On October 30, 2020 at 13:30:44, fractorr (fractorr@gmail.com) wrote: > > I am trying to generate images using command line options but having a > hard > to doing what I want. I have an object that I generate is several > different > sizes based on a parameter and I would like to generate all the different > sizes so they are not fit to view all. With that enabled the smaller sizes > actually look bigger than the larger sizes. > > In the first image it is actually about a quarter of the size as the > second > image, how do I make it look like it should from command line? I have a > lot > of these to generate so doing them manually is not an option. I assume I > would use the --camera option but not sure how I go about using it, any > suggestions or examples? > > This is a small object > <http://forum.openscad.org/file/t1255/test-3.png> > > This is a larger object > <http://forum.openscad.org/file/t1255/test-2.png> > > > > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
W
Whosawhatsis
Fri, Oct 30, 2020 10:25 PM

Yes. If you set those variables in your openscad file, they will control
the viewport in both places (again, assuming you have a very recent
development snapshot). You can also set your viewpoint manually in the
preview window, then echo those out to find the values you want, which you
can either write into the code that way or use to populate the --camera
settings.

On October 30, 2020 at 15:11:55, Trevor Orr (fractorr@gmail.com) wrote:

I think I see, I can use the gui to find the translation, rotation and
distance numbers for the largest object and use those numbers for all of
the objects that I generate on the command line and then I should have the
desired outcome right?

On Fri, Oct 30, 2020 at 2:38 PM Whosawhatsis whosawhatsis@gmail.com wrote:

You can use the --camera option to do what you want. You can also use the
equivalent $vpr, $vpt, $vpf and $vpd variables instead, which will also let
you preview your camera positioning inside OpenSCAD.

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#$vpr,$vpt,$vpf_and_$vpd

However, you'll need a pretty recent development snapshot (from the last
few weeks) for this method, since these variables were ignored in command
line usage until very recently.

On October 30, 2020 at 13:30:44, fractorr (fractorr@gmail.com) wrote:

I am trying to generate images using command line options but having a
hard
to doing what I want. I have an object that I generate is several
different
sizes based on a parameter and I would like to generate all the different
sizes so they are not fit to view all. With that enabled the smaller sizes
actually look bigger than the larger sizes.

In the first image it is actually about a quarter of the size as the
second
image, how do I make it look like it should from command line? I have a
lot
of these to generate so doing them manually is not an option. I assume I
would use the --camera option but not sure how I go about using it, any
suggestions or examples?

This is a small object
http://forum.openscad.org/file/t1255/test-3.png

This is a larger object
http://forum.openscad.org/file/t1255/test-2.png

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Yes. If you set those variables in your openscad file, they will control the viewport in both places (again, assuming you have a very recent development snapshot). You can also set your viewpoint manually in the preview window, then echo those out to find the values you want, which you can either write into the code that way or use to populate the --camera settings. On October 30, 2020 at 15:11:55, Trevor Orr (fractorr@gmail.com) wrote: I think I see, I can use the gui to find the translation, rotation and distance numbers for the largest object and use those numbers for all of the objects that I generate on the command line and then I should have the desired outcome right? On Fri, Oct 30, 2020 at 2:38 PM Whosawhatsis <whosawhatsis@gmail.com> wrote: > You can use the --camera option to do what you want. You can also use the > equivalent $vpr, $vpt, $vpf and $vpd variables instead, which will also let > you preview your camera positioning inside OpenSCAD. > > > https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#$vpr,_$vpt,_$vpf_and_$vpd > > However, you'll need a pretty recent development snapshot (from the last > few weeks) for this method, since these variables were ignored in command > line usage until very recently. > > On October 30, 2020 at 13:30:44, fractorr (fractorr@gmail.com) wrote: > > I am trying to generate images using command line options but having a > hard > to doing what I want. I have an object that I generate is several > different > sizes based on a parameter and I would like to generate all the different > sizes so they are not fit to view all. With that enabled the smaller sizes > actually look bigger than the larger sizes. > > In the first image it is actually about a quarter of the size as the > second > image, how do I make it look like it should from command line? I have a > lot > of these to generate so doing them manually is not an option. I assume I > would use the --camera option but not sure how I go about using it, any > suggestions or examples? > > This is a small object > <http://forum.openscad.org/file/t1255/test-3.png> > > This is a larger object > <http://forum.openscad.org/file/t1255/test-2.png> > > > > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
TO
Trevor Orr
Sat, Oct 31, 2020 12:43 AM

Thanks, I grabbed the latest snapshot available and that seems to be
working now.  I have to generate all my images again which unfortunately
takes several hours but this will look so much better.

On Fri, Oct 30, 2020 at 3:25 PM Whosawhatsis whosawhatsis@gmail.com wrote:

Yes. If you set those variables in your openscad file, they will control
the viewport in both places (again, assuming you have a very recent
development snapshot). You can also set your viewpoint manually in the
preview window, then echo those out to find the values you want, which you
can either write into the code that way or use to populate the --camera
settings.

On October 30, 2020 at 15:11:55, Trevor Orr (fractorr@gmail.com) wrote:

I think I see, I can use the gui to find the translation, rotation and
distance numbers for the largest object and use those numbers for all of
the objects that I generate on the command line and then I should have the
desired outcome right?

On Fri, Oct 30, 2020 at 2:38 PM Whosawhatsis whosawhatsis@gmail.com
wrote:

You can use the --camera option to do what you want. You can also use the
equivalent $vpr, $vpt, $vpf and $vpd variables instead, which will also let
you preview your camera positioning inside OpenSCAD.

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#$vpr,$vpt,$vpf_and_$vpd

However, you'll need a pretty recent development snapshot (from the last
few weeks) for this method, since these variables were ignored in command
line usage until very recently.

On October 30, 2020 at 13:30:44, fractorr (fractorr@gmail.com) wrote:

I am trying to generate images using command line options but having a
hard
to doing what I want. I have an object that I generate is several
different
sizes based on a parameter and I would like to generate all the different
sizes so they are not fit to view all. With that enabled the smaller
sizes
actually look bigger than the larger sizes.

In the first image it is actually about a quarter of the size as the
second
image, how do I make it look like it should from command line? I have a
lot
of these to generate so doing them manually is not an option. I assume I
would use the --camera option but not sure how I go about using it, any
suggestions or examples?

This is a small object
http://forum.openscad.org/file/t1255/test-3.png

This is a larger object
http://forum.openscad.org/file/t1255/test-2.png

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Thanks, I grabbed the latest snapshot available and that seems to be working now. I have to generate all my images again which unfortunately takes several hours but this will look so much better. On Fri, Oct 30, 2020 at 3:25 PM Whosawhatsis <whosawhatsis@gmail.com> wrote: > Yes. If you set those variables in your openscad file, they will control > the viewport in both places (again, assuming you have a very recent > development snapshot). You can also set your viewpoint manually in the > preview window, then echo those out to find the values you want, which you > can either write into the code that way or use to populate the --camera > settings. > > On October 30, 2020 at 15:11:55, Trevor Orr (fractorr@gmail.com) wrote: > > I think I see, I can use the gui to find the translation, rotation and > distance numbers for the largest object and use those numbers for all of > the objects that I generate on the command line and then I should have the > desired outcome right? > > > On Fri, Oct 30, 2020 at 2:38 PM Whosawhatsis <whosawhatsis@gmail.com> > wrote: > >> You can use the --camera option to do what you want. You can also use the >> equivalent $vpr, $vpt, $vpf and $vpd variables instead, which will also let >> you preview your camera positioning inside OpenSCAD. >> >> >> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#$vpr,_$vpt,_$vpf_and_$vpd >> >> However, you'll need a pretty recent development snapshot (from the last >> few weeks) for this method, since these variables were ignored in command >> line usage until very recently. >> >> On October 30, 2020 at 13:30:44, fractorr (fractorr@gmail.com) wrote: >> >> I am trying to generate images using command line options but having a >> hard >> to doing what I want. I have an object that I generate is several >> different >> sizes based on a parameter and I would like to generate all the different >> sizes so they are not fit to view all. With that enabled the smaller >> sizes >> actually look bigger than the larger sizes. >> >> In the first image it is actually about a quarter of the size as the >> second >> image, how do I make it look like it should from command line? I have a >> lot >> of these to generate so doing them manually is not an option. I assume I >> would use the --camera option but not sure how I go about using it, any >> suggestions or examples? >> >> This is a small object >> <http://forum.openscad.org/file/t1255/test-3.png> >> >> This is a larger object >> <http://forum.openscad.org/file/t1255/test-2.png> >> >> >> >> >> >> >> -- >> Sent from: http://forum.openscad.org/ >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >>