Tuesday, November 3, 2009

Every vote counts!

First i want to thank the 20 voters who participated the poll.
Back in November last year i took a screenshot of the voting results according the reliabilty of 3Dpdf. By the time the voting results have somehow changed, which is the reason for this entry.



Now the poll is not representative, but confirms my guess that majority of users can access 3D data provided by pdf, which I might add is a huge success by Adobe.


I don't intend to write further tutorials, as the main aspects 3Dpdf's 3D capabilities (in my opnion) are already covered.
If you disagree or got questions about issues related to 3ds max and pdf, you can either leave a comment or contact me by email.

Friday, October 16, 2009

Flashed 3D

Interactive Flash content as Texture Map on 3D objects?
Yes, see how it works in the following marvellous
two video tutorials
by Dave Merchant on
Acrobatusers.com

Part 1

Part 2

Tuesday, July 21, 2009

Tech Trouble?

Due to recent feedback I decided to remove the html embedded 3Dpdf examples, because of browser compatibility problems. If you also get problems following a 3D pdf link, click the right mouse button on the link, then "save target as", and open the pdf document with Adobe Reader.
A proper working 3D acceleration is essential for viewing 3D pdf's (Direct 3D on windows, OpenGL on Linux and Mac), which means that not everyone can see 3D as the header of this blog says.

So if you have problems viewing 3D pdf's take the following steps:

- Make sure you have a 3D graphics card with more than 64mb video memory (more is better)
- Make sure the latest graphics card drivers are installed
- For Windows users: Make sure Direct 3D is working (go on Start --> Run --> enter dxdiag --> Display --> test Direct 3D)
get Directx
here if it's not installed
- Make sure you have the latest version of Adobe Reader installed

Wednesday, May 27, 2009

Speed Up

Flatiron is a plugin (found under utilities after installation) that simplifies the flattening process for texture baking. Its main advantages over the 3ds max standard flattening tool are a more efficient usage of texture space, real pixel based spacing between polygon clusters and creating less amounts of clusters by better unfolding. With 249,- € it is more adressed to people who are regularly doing texture baking.
From the same people comes UV Packer as an "alternative" solution for 79,- €, which only does the packing procedure. This means that you would have to use the 3ds max standard flattening tool to create the clusters first, and then you would have to apply the UV Packer modifier for a more efficient placement of the clusters. With both solutions you can optimize the the texture space usage afterwards by hand using the UVW Unwrap modifier. Keep in mind you still should only merge objects with compareable scaling to one Mesh for baking them together on one baked texture.
Both plugins are available as demo with some restrictions.

Tuesday, April 21, 2009

Opacity Bug II - Material Blending

It is possible to fake material blending using opacity maps on separate meshes to some extend. This technique comes handy if you would like to blend materials with different reflection, bump or specular highlight properties.




As you can see in the 3Dpdf you can download here, the opacity is pretty kinky when it comes to overlaying semi transparent layers (backside). I have no general solution, because the circumstances under which the opacity begins to bug may vary, and I did not fully understand its behaviour yet.
So here a few tips how you could bypass this problem:

- flip the normals of the top layer (requires double sided rendering, no specular highlight is possible)
- detach surfaces (with different directions) to separate objects
- attach surfaces that don't work well, despite flipping or detaching, to a newly created object and delete the element of the object you attached the surface to (this also works if your specular highlights don't work, but your normals are showing in the desired direction)

Your solution might be one, some or all of these points, but it requires sometimes some trial and error.


I used this method to create window frames in my TGV Lyon Scene (Filesize 10mb / 256mb video memory).

The bandwidth is kindly offered by: active-servers


Edit:
If you wish to combine transparancy, bump map and reflection map you cannot use tiff with alpha channel, instead of that use separate jpg's (don't forget to uncheck ICC Profile in Photoshop).

Saturday, January 10, 2009

Optimisations II - Scaling - Precision

The experience of a 3D pdf depends strongly on its performance in fps. To make sure the scene runs fine on lower spec systems, I used the good old nvidia Geforce TI4200/64mb as reference, which runs scenes up to 130.000 polygons fine. The texture size for baked images on this card should be 1024x1024, and it can handle up to 12 of them (and maybe more).
Newer graphics cards from the Geforce 8 series on, runs the same amount of images at 2048x2048 with acceptable fps. Importing scenes in several steps (biggest objects first), by using the 3D Toolkit to merge your objects, can prevent heavy performance problems too. Additionally you can improve performance by lowering Values at importing in the "optimize" tab (Acrobat 9), or using the 3D toolkit (Acrobat 8). I personally prefer the 3D Toolkit method, because it gives you a high quality sample, which you can reduce to more compressed versions incrementally. To do so, right click inside Acrobat on your 3D scene (Annotation) and choose "edit in 3D toolkit". In 3D Toolkit change an unimportant value (like scene material specular highlight) and exit the toolkit by closing the window. Because of the change of a value, the 3D toolkit has a reason to ask you to save the changes on exit.

The Game and the CAD button define presets for the mesh compression. The Game button does a good job in most cases. A further reduction of mesh accuracy does not deliver significant changes regarding the filesize and 3D performance, but may cause visible errors. Additionally you can reduce the file size by lowering the JPG compression value. The more grainy your Texture Maps are, the more you can reduce that value. The more gradient the higher should be this value. Keep in mind that Texture Maps with alpha channel (tiff, png, tga) are not considered by the Texture Compression.

Update:
Acrobat users, using Deep Exploration to get their objects into pdf will have the same Export Dialog as in 3D Toolkit, and maybe some more possibilities for optimisations, but at this moment I can't go more deeply into that, because I don't have Deep Exploration yet to figure out.
Finally you can reduce the file size additionally by
using the pdf optimizer for saving your pdf.

What it actually does, is it removes unused resources that sometimes blow up the file size of your pdf, and compresses the poster image of your 3D Annotation by the given compression rate.

Thursday, January 8, 2009

Acrobat 9

Acrobat 9 brings some changes that makes it harder to make textured objects work inside pdf.
On the other hand it has some nice new features like text and graphics over 3D background, even semi transparent ones, that gives you complete new possibilities on creating interfaces for interacting with your objects.

Major worsenings from Acrobat 8 to Acrobat 9:
-no .ase filesupport
-no .rh filesupport
-3D Toolkit (Deep Exploration "light") replaced by 3D Reviewer (homegrown 3D Toolkit without texture support)

Workaround:
1. Export your 3ds max scenes/objects as .rh (Right Hemisphere)
2. Open the file in Right Hemisphere's Deep Exploration, and save it as .u3d file
3. Import the .u3d file into Acrobat 9


Monday, January 5, 2009

Opacity Bug Workaround

The bad news is, there is no way to avoid the Opacity Bug. But because the Opacity Bug only appears on the frontside of a polygon, you can try to reduce the ammount of appearence, by flipping the polygons backwards the statisticly most seen viewing angles. Examples to study on how the Opacity Bug behaves, are my first vegetation attempts Vegetation Test (2.3mb)* and Island (4.8mb)*.


Additionally you can reduce the effect by avoiding semi transparent pixels, and using a higher resolution than absolutely neccessary to some extend. You also can try to receive better results by splitting large amounts of opacity planes into several objects, because exporting/importing the normals behaves more stable on smaller objects (.ase). If you want to use opacity maps in combination with Diffuse Color, Bump and Reflection maps, for example for water, you have to import the opacity map as separate greyscale image, not as .tiff with alpha channel you normally prefer. My best results for simulation of vegetation inside 3Dpdf so far, can be seen in the
Guggenheim New York Scene (5.0mb)*.

For scattering the image planes I used Gugila Groundwiz with a streched Sphere as scatterobject, and turned the normals so they show inwards the tree. Not topic related but important to mention, that the sky map which is used in this scene comes from CGTextures.com, and most of the building textures from Google Earth Street View.

*The bandwidth is kindly offered by: active-servers

Update:
Keep in mind that you have to set the render mode to double sided in the 3D settings.
To make sure the document renders double sided regardless the local machine configuration, attach the following line to your Javaskript:

scene.renderDoubleSided=1;

Optimisations I - Texture Map Processing

The more complex your objects get, the more you will realize that you quickly run out of space on your Baked Map.
One reason for that is, that there is no possibility to map the Diffuse Color Texture independently from the Self Illumination (Emissive) Map, as mentioned in my Texture Baking Tutorial. This means that repeating color information such as tiled Texture Maps, have to be stored over and over again, for every face of your Model uniquely. In result of this fact it also means that you are heavily restricted the Level of Detail, that you can achieve on your Diffuse Color Texture.
It means also, the more complex your models get, the less pixelinformation per face you have, which again may result in distortions and undesired blurring effects along the Map Seams. Map Seams are basicly open edges in UV Space.

As you can see in the image above, Map Seams are always adjacend to the dark void of the Backround Color. So on low texture resolutions and/or zooming out in your 3D model inside 3Dpdf, it may happen that the Background Color mixes/blurs with the actual pixelinformation of your face. In other words: Approximation inaccuracies for performance gains.
To avoid this problem we have to somehow "duplicate" the edge pixels of the faces. I will explain the neccessary Texture Map Processing by using Adobe Photoshop:
After rendering your Baked Map save your image for example as .tiff image file with alpha map, or any other file format with alpha map support.
After opening the Baked Map in Photoshop double click on the Background Layer, so it creates a new Layer (Layer0) that you can apply a Layer Mask to.


Copy the complete alpha channel 1...


to a new Layer Mask...


paste the copied alpha channel into Layer 0 Mask...


...and apply it.


Now duplicate Layer 0, call it Layer 1, and apply Gaussian Blur with a value of 6 px to Layer 0, and duplicate Layer 0 over and over again.

You might notice the little hard edge between the polygon texture and the blurry background, which results from the Anti Aliasing between the polygon texture and the black background.
To get rid of that select all black pixels of Layer 1/Channel alpha 1, expand your selection by one pixel, and delete your selection in Layer 1.


Now you can save your image for example as .jpg image file, the alpha channel is no longer needed. This procedure also comes handy, if you want to downsize your Baked Maps for graphics cards with lower amount of video memory. Because you have to go through this procedure over and over again, I recommend to create a Droplet for that work.

Sunday, January 4, 2009

Supported 3D Features

Because 3Dpdf's features are mainly directed to the documentation of engineering and scientific researches, its capabilities and performance for realtime 3D visualizations are quite poor in compare to other 3D engines like Quest 3D or high end game engines. However, small file sizes and the wide spread of the Adobe Reader, makes it very attractive to develop realtime 3D graphics for 3Dpdf. Using .rh export module from Right Hemisphere gives you the most compatible exchange format between 3ds max and Acrobat 3D, but in some cases you might prefer to use the .ase format (Acrobat 3D 8.12 and lower).

Features:

Materials, Maps:

-Diffuse Color (Texture Map)
-Emmissive, Self Illumination Color (Texture Map)
-Opacity (Texture Map, .tiff with alpha channel in Diffuse Color and greyscale image)
-BumpMap (Texture Map, by Javascript - for more information visit Grayson's Bump Map Tutorial)
-Reflection Map (Spherical Environment Map)
-Multi Subobject Material and Material ID's (.rh)
-Specular Highlight Level
-Specular Highlight Phong Exponent
-Specular Highlight Color

Geometry, Objects:

-Object Instances
-Smoothing Groups
-Keyframe Animation
-Light Sources
-UV Coordinates (UV Map Channel 1)
-Vertex Colors (Darken on Diffuse Color)
-Object Opacity
-Splines (Colors by using dxf/dwg)

Edit:
-Cameras (Target Camera, animation will not be considered in pdf)

To see examples how these features could be used, visit our web page

Saturday, January 3, 2009

Texture Baking - Export - Import

Texture Baking
Texture baking is neccessary to store the light and shadow information out of your light simulation in an image file, that can be used inside 3Dpdf as texture map. Therefore we have to bake the Complete Map (for Vray users I suggest Vray Complete Map ) into UV Map Channel 1, because other UV Map Channels than 1 are not supported by 3Dpdf. This means first, that we cannot store the light information separately from the Diffuse Color texture that could be tiled, and second, that we have to define a unique space in UV Space for each polygon on our model. To do so I discuss the following steps on a simple example. A plane with some extruded faces and a teapot attached to one object, as Editable Mesh or Editable poly with Checker Texture, light, shadows and Global Illumination .

Once the model with texturing and lightning is done, you have to assign an Unwrap UVW modifier to your object, and set its UV Map Channel to something else than 1. Beacause UV Map Channel 1 is used by default for Texture Maps such as Diffuse Maps etc., and it is not recommended to bake into the same UV Channel that is already used by texture maps on your object. So lets say you choose UV Map Channel 1 for your texture map(default), and UV Map Channel 3 for baking your textures, so there will be no confusion between the Texture Maps that are going to be baked and the Baked Maps, which are the final image results that we are going to export to 3Dpdf. Inside the Unwrap UVW modifier dialog click on edit, and a new window opens, where you can modify the UV coordinates of your object. Use the selection mode Face and ctrl+A to select all faces.

Now go to Mapping then Flatten Mapping and change the Spacing value to 0.002, and accept with ok. The result should look something like this:

What the Flatten Mapping procedure did, was arranging the Faces without overlapping (hopefully) with the Spacing we defined. A Spacing value of 0.002 is fine in most cases, but if you have lots of triangles you may have to increase that value, to prevent overlapping. Back in the Unwrap UVW dialog save your UV's so you can later load them into UV Map Channel 1. Select the object you want to bake and open the Render To Texture dialog (shortcut: 0), and check the following settings, so the renderer renders the color information into the polygons according their positions :

Under Output click on Add, and select Complete Map (Vray Complete in my case), and set the resolution to 1024x1024.

Click on render, and save your image which is the Baked Texture for example as .jpg

Now create a new Standard Material in the Material Editor and and assign the Baked Map to the Diffuse Map slot, set the Self Illumination to 100%, and assign the new material to your object. Finally change the UV Map Channel inside the Unwrap UVW modifier back to 1 (in older max versions you have to load the stored UV channel 3, which we saved previously, now). You may check if your Baked Map appears correctly in your viewport by pressing the "Checker Box Button" in the material editor.


Export
To export your object use the .rh export module by Right Hemisphere, and export it as .rh file including the Texture Maps.


Import
To import the object to Acrobat 3D, I use V 8.12 for reasons I will discuss later, go to "create from file", and choose the .rh file to import. Now you can play around with the settings to define the appearance pleasing your desires.

Click here to view the result

The bandwidth is kindly offered by: active-servers

Welcome

This blog intends to discuss the possibilities of creating 3Dpdf's from 3ds max for realtime 3D visualizations.

Our web page is:
www.directlight.de