2
$\begingroup$

I would like to export a Tube object with VertexColors defined to 3DS format. Here's a minimum example:

test = Graphics3D[Tube[{{0, 0, 0}, {1, 1, 1}}, VertexColors -> {Red, Blue}]]
Export["test.3ds", test, "3DS"]

However, it appears that Tube objects are only exportable if they lack the VertexColors option, this seems to be true for all 3D formats. It seems to me that the simplest solution is to convert a graphic with Tube objects into the GraphicsComplex format, which does support VertexColors upon export.

I'm guessing it might only be possible to use one of the old "extrude" solutions to this problem prior to the Tube primitive existing. Is this the only way to do it? If so, how can VertexColors be added to the extrusion methods of old? I'll note that the extrusion method produces 3D surfaces with far more polygons than Tube does, and with weird vertex normals. This makes the exported objects unnecessarily large and kinda ugly.

$\endgroup$
1
$\begingroup$

The Mathematica Package below exports to either of two popular raytracer file formats (not 3ds which is proprietary/binary), and can be used Live in Mathematica interactively/Live.

https://sourceforge.net/projects/rayshade-math/

I'm interested myself if anyone is exporting to a Cuda rendering suite or even 3DStudio ARt Renderer and how well Export[] did (in the past export was very poor, i have no copy of 3dstudio to check today's results - but do not have fingers crossed since Wolfram only shows pics being exported not their results?)

Mathematica has import/export to institutional formats for geo mapping and chemical. For most, those are the work-horses and more the focus - but i have no idea there how well mm does exporting. Importing wise, Mathematica can use maps we all know that!

a busy cat rayshade-mathematica

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.