2 added 97 characters in body
source | link

I would be happy if I could get Mathematica to prefix each POV-Ray export (which MathematicaMathematica supports, by the way) with a preamble in which I specify camera, lighting, etc. But unfortunately I don't know to what extent it's possible to customize Mathematica's export facilities.

Use ExportString for obtaining the output file as a String inside of Mathematica, then you can manipulate that string the way you want: prepend another string with StringJoin, change the string with StringReplace etc. Finally you can simply Export that string as "Text" into a file with any extension you like.

BTW, I am interested in the ability to render Mathematica's 3D graphics in an external ray-tracing software too. What stops me is only that I know nothing about how to use/work with any of them and how their formats are designed. But I would be happy to find out.

I would be happy if I could get Mathematica to prefix each POV-Ray export (which Mathematica supports, by the way) with a preamble in which I specify camera, lighting, etc. But unfortunately I don't know to what extent it's possible to customize Mathematica's export facilities.

Use ExportString for obtaining the output file as a String inside of Mathematica, then you can manipulate that string the way you want: prepend another string with StringJoin, change the string with StringReplace etc.

BTW, I am interested in the ability to render Mathematica's 3D graphics in an external ray-tracing software too. What stops me is only that I know nothing about how to use/work with any of them and how their formats are designed. But I would be happy to find out.

I would be happy if I could get Mathematica to prefix each POV-Ray export (which Mathematica supports, by the way) with a preamble in which I specify camera, lighting, etc. But unfortunately I don't know to what extent it's possible to customize Mathematica's export facilities.

Use ExportString for obtaining the output file as a String inside of Mathematica, then you can manipulate that string the way you want: prepend another string with StringJoin, change the string with StringReplace etc. Finally you can simply Export that string as "Text" into a file with any extension you like.

BTW, I am interested in the ability to render Mathematica's 3D graphics in external ray-tracing software too. What stops me is only that I know nothing about how to use/work with any of them and how their formats are designed. But I would be happy to find out.

1
source | link

I would be happy if I could get Mathematica to prefix each POV-Ray export (which Mathematica supports, by the way) with a preamble in which I specify camera, lighting, etc. But unfortunately I don't know to what extent it's possible to customize Mathematica's export facilities.

Use ExportString for obtaining the output file as a String inside of Mathematica, then you can manipulate that string the way you want: prepend another string with StringJoin, change the string with StringReplace etc.

BTW, I am interested in the ability to render Mathematica's 3D graphics in an external ray-tracing software too. What stops me is only that I know nothing about how to use/work with any of them and how their formats are designed. But I would be happy to find out.