[Tex/LaTex] 3D-PDF with U3D-File – how to create 3Dviews with .vws

media9

Everything is still working – the 3D-Animation of a 3D-Part in my PDF and other options like the 3Dmenu or the toolbar.

But now I want to add some Mediabuttons with \mediabutton[3Dgotoview=...]. For this opportunity I need a working Views-File with informations about the views. The content of my views-file is just easy to get with the JavaScriptConsole. But how can I create such a file? Just for contents like:

VIEW=First View
  COO=-43.4 -1603.9 2199.1
  C2C=0.03 -0.5 -0.8
  ROO=2274.1
  LIGHTS=CAD
END

Yours sincerely and thanks for help.

Best Answer

You fill the JavaScript console with as many VIEW sections as you want, by manipulating the model to your liking and then selecting 'Get Current View' from the context menu. This requires \includemedia option 3Dmenu.

Copy the console content and paste it into a text file, say myviews.vws, opened in a text editor of your liking. Edit the file, giving meaningful names to the generated views, e. g. VIEW=First View etc.

Now edit your *.tex file to make use of myviews.vws and to insert media buttons:

\includemedia[
  label=my3dobject,
  3Dviews=myviews.vws,
  width=4cm,height=4cm,
  3Dmenu,
  ...
]{click!}{something.u3d}\\
\mediabutton[3Dgotoview=my3dobject:(First View)]{\fbox{First View}}
\mediabutton[...]{...}

Finally, when you are done, option 3Dmenu can be removed.

See, e. g. the example in Fig. 7 of the media9 documentation.

Related Question