1

I am trying to make pdfs with u3d objects embedded, however when doing so I note that I cannot zoom in on the object, either by scrolling, or switching to the zoom tool. Interestingly, the pan tool also does not work. If, for example, I read a pdf with a u3d object embedded from elsewhere, e.g. from the media9 guide, or from creation directly in Solidworks, the zoom works fine, so it seems to be something in the LaTeX that is wrong.

Here is my code:

\documentclass[a4paper]{article}

\usepackage[left=1.5cm,right=1.5cm,top=1.5cm,bottom=1.5cm]{geometry}
\usepackage{media9}
\usepackage[english]{babel}

\begin{document}

\includemedia[label=frame,width=0.8\linewidth,height=0.5\linewidth,activate=pageopen,3Dtoolbar,3Dmenu]{}{octagon.u3d}

\end{document}

The u3d file can be found here: https://www.dropbox.com/s/4b0709v0lrjzbdr/octagon.U3D

Any help is much appreciated.

  • 1
    Welcome to TeX.SE. – Peter Grill Feb 7 '14 at 5:48
  • 3
    TeX doesn't know anything about u3d. It treats the u3d file as a blackbox while embedding it. All interaction is handled by the PDF Reader (Adobe Reader). There must be some peculiarity with the u3d file. Can you make it available for download somehow? – AlexG Feb 7 '14 at 7:47
  • Edited to include link to u3d file. – d401tq Feb 7 '14 at 14:49
  • Which pdf viewer are you using? – pluton Feb 7 '14 at 15:01
  • Adobe reader (latest version). I have also just noticed a work around - if I right click and choose 'part options', 'fit visible', I can zoom afterwards. – d401tq Feb 7 '14 at 15:07
1

A default camera setting is required. To get good options for \includemedia, follow instructions (Sect. 7.2 3D quick-start guide) in the media9 documentation.

First, insert the 3D file without camera settings, yet providing option 3Dmenu as follows:

\documentclass[a4paper]{article}

\usepackage{media9}
\usepackage[english]{babel}

\begin{document}

\includemedia[
  width=0.5\linewidth,
  height=0.5\linewidth,activate=pageopen,
  3Dtoolbar,
  3Dmenu,
]{}{octagon.U3D}

\end{document}

Then, open the PDF in A-Reader, right-click on the 3D widget and select Generate Default View from the context menu. This will centre the 3D object in the view-port and print the corresponding camera settings to the console. Copy and paste these settings to the option list of \includemedia:

\documentclass[a4paper]{article}

\usepackage{media9}
\usepackage[english]{babel}

\begin{document}

\includemedia[
  width=0.5\linewidth,
  height=0.5\linewidth,activate=pageopen,
  3Dtoolbar,
  3Dmenu,
  3Dcoo=0.03645917773246765 -0.0012150183320045471 0.06018916517496109,
  3Droo=0.4712926502989337,
  3Dlights=Headlamp,
]{}{octagon.U3D}

\end{document}

Finally close the PDF, re-compile the document and re-open the PDF in A-Reader. Now, you will be able to manipulate (zoom, rotate, show/hide parts of) the 3D object.

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.