3
$\begingroup$

Given a 3D object to render, is it possible to make a 2D animation out if it? Does that just refer to the creating of a gif of the animation?

$\endgroup$
1
  • $\begingroup$ You could make a table of frames of the 3D animation, rasterize them and then export to list to whatever animation format you prefer. Such as gif or a video format such as mp4. $\endgroup$
    – tad
    Dec 13, 2023 at 3:40

1 Answer 1

4
$\begingroup$

I'd highly recommend to use new video tools. The typical way of producing a list of images and exporting to .GiF or .MP4 is much slower. Consider this example below. It will Parallelize automatically over your available CPU cores and generally be more efficient in terms of time of generation and byte-size of the object. You will get a video in the notebook, but there is also an .mp4 file stored at $WolframDocumentsDirectory in Video folder. You can also export the object in the notebook to other formats.

Parallelize@AnimationVideo[Graphics3D[
GeometricTransformation[Icosahedron[],RotationTransform[rot,{0,0,1}]],
SphericalRegion->True],{rot,0,2π,.05}]

enter image description here

Study in docs functions like these - many can be parallelized:

  • AnimationVideo
  • VideoGenerator
  • FrameListVideo
  • SlideShowVideo
  • etc.
$\endgroup$
3
  • 1
    $\begingroup$ Is it possible to keep the trembling box stable? $\endgroup$
    – eldo
    Dec 13, 2023 at 8:12
  • $\begingroup$ @eldo Add PlotRange -> 1.2. $\endgroup$
    – cvgmt
    Dec 13, 2023 at 11:35
  • $\begingroup$ Thanks, works perfectly $\endgroup$
    – eldo
    Dec 13, 2023 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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