LDraw.org Discussion Forums
LPub3D rendering with POV-Ray ... INI error - 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 rendering with POV-Ray ... INI error (/thread-20316.html)

LPub3D rendering with POV-Ray ... INI error - Brian - 2016-01-31

Hi, I get several error messages when LPub3D attempts to render with POV-Ray v3.7 ... LPub3D rendering with LDView works; and POV-Ray v3.7 will render individual LDR and MPD files. The command line error seems to be a file that doesn't exist:

Could not find file ...\LPub\parts\40490_0_1650_150_DPCM_0.75_23_-45.png.ini
Cannot open INI file ...\LPub\parts\40490_0_1650_150_DPCM_0.75_23_-45.png

Re: LPub3D rendering with POV-Ray ... INI error - Trevor Sandy - 2016-02-01

Hi Brian,

I cannot reproduce your issue with the information you have provided. I am able generate a pdf using POV-ray without issue. However, I can recommend:

1. Confirm you POV-ray settings in povray.ini and pvengine.ini - ensure allowed directories is sufficiently defined per your environment. This is necessary to ensure that POV-ray will accept calls from an external application (e.g. LPub3D) which is different that rendering directly from the POV-ray UI.
2. Turn on verbose in POV-ray (if not already on), and confirm the command line argument string passed to POV-ray is indeed valid and that the input files defined in the argument string exist in their stated locations and with the name and extension defined.
3. If you are still unable to further define the source of the issue, please send a copy of the model file generating the problem along with a copy of the .ini files listed above. For sending the files, you can see my email at the help=>About menu in LPub3D.


Re: LPub3D rendering with POV-Ray ... INI error - Brian - 2016-02-06

Thanks Trevor,

I spent a few days troubleshooting with your recommendations, but the issue persists. I sent an email with the requested info and mentioning it here in case the mail is directed to your spam folder.

Re: LPub3D rendering with POV-Ray ... INI error - Jono - 2016-02-12

G'day. I had this problem as well and all I did was, Options tab/Script I/0 restrictions/ (change to) no restrictions. Once I did that Ive had no problems again.

Re: LPub3D rendering with POV-Ray ... INI error - Brian - 2016-03-03

Thanks Trevor, Jono,

I have "IO Restrictions=0" in pvengine.ini ... After some troubleshooting, I see the following error in the "stderr" file:

Can't open C:\LDraw\LGEO\lg_elements.lst
*** Abnormal termination.

... The "lg_elements.lst" file doesn't exist.

Re: LPub3D rendering with POV-Ray ... INI error - Damien Roux - 2016-03-03

You are using the "old" ldraw pov ray system, which is I think no longer supported.

Re: LPub3D rendering with POV-Ray ... INI error - Brian - 2016-03-05

Thanks Damien, Trevor,

[Edit] I was able to get LPub3D, L3P, and POV-Ray to generate several images by simply placing the old "lg_colors.lst" and "lg_elements.lst" files into the default AIOI LGEO root directory.

[Edit] The process now stops on a parse error: "L3AspectRatio does not match image size" ... Do you know if I can put something like a version declaration in the LDraw file to tell it to use the new system, not lg_colors, not lg_elements ?

Re: LPub3D rendering with POV-Ray ... INI error - Damien Roux - 2016-03-05

I think ldview is the only one to to use the new povray export method.

The other software will stay broken until the dev switch to the new method.

You should therefore be able to correct it manually.
L3P aspect ratio means that the aspect ratio defined by L3P is not the same as the one you use to render you picture. Should be easily fixed by changing one or the other.

Re: LPub3D rendering with POV-Ray ... INI error - Brian - 2016-03-14

Is LPub3D calling L3P with command line args, like: "L3P +arg01 +arg02 -arg03 /arg04" ?
[Edit] Yes.

Re: LPub3D rendering with POV-Ray ... INI error - Brian - 2016-03-15

I pointed LPub3D to a program that grabbed the command options, altered them, and then started L3P with the altered options. It looks like I may need to do something similar with the POV process. Here's a sample showing the -lgeo option which I suspect is what requires the old lg_colors and lg_materials files:

-q4 -sw2

The commands I captured were identical to the commands as reported in the header of the L3P output file.

Re: LPub3D rendering with POV-Ray ... INI error - Brian - 2016-03-20

Hi Damien,

Thanks for the reply. I'm now able to get LPub3D to render with POV-Ray by doing the following:
  • Parse the L3P command options and remove -lgeo, OR find a copy of the old lg_colors and lg_materials files.
  • Parse the POV command options and add quotes around the +O file path via regex, OR manually remove spaces from all file names and all internal names in the model file.

I suspect the L3P aspect ratio error was a result of the POV parse failing (on an output file name with spaces) before the Height and Width options were parsed. Without Height and Width, POV uses the INI defined aspect ratio, and that ratio did not match the L3P ratio.

To parse the L3P or POV command options, I wrote two small programs that grab the command options, alter them, and then start L3P or POV with the altered options.

However, I still have a question for anyone who might know... The image dimensions LPub3D sends to POV are much larger than the final PNG in the /parts and /assem directories. I can get around this last issue by automating a trim action on the entire folder with Photoshop, but i'm wondering what is going on.

... Is LPub3D trimming the excess transparent pixels with an additional process?