Solution for problematic 3ds files exported from 3ds Max 2013

by abenedik 24. August 2012 09:17

Recently some customers reported that they have problems with reading some 3ds files with Ab3d.Reader3ds and Viewer3ds.

After investigating the files I have found out that the material names were not correctly written - only the first character of the material name was written to the 3ds file. For example instead of "Wood" only "W" was written as material name. In 3ds file, materials are defined first. After materials 3d objects are defined. Each object defines the used material by its name. In the broken files the full name was used - for example "Wood". But because the materials were defined by wrong names, the objects did not get the materials assigned. This problem was common in all the broken files I got recently. In some of the files there were also some other problems that broke the structure of 3ds file so much that only a first few objects could be read.

Soon we have found out that all the files with the above symptoms were exported from 3ds Max 2013. Previous versions of 3ds Max created valid 3ds files, but some changes in the new version broke the exported 3ds files.

After some search on the internet, a fix for that problem was found. It can be downloaded from:


Until an official fix from Autodesk, I recommend applying this fix. It was tested from some of our customers and they confirmed that the problems were gone after installing it.

The new version of Viewer3ds (published yesterday) can also detect the problematic files and based on the above symptoms can alert the user that the file was probably exported from 3ds Max and that a fix should be applied.



This problem has been fixed by an official 2013 PU6 update.

See more:



New release brings improved products, added .Net 4 assemblies and better installer

by abenedik 23. August 2012 22:23

This release brings the following:

-    improved installation on 64 bit Windows
-    added .Net 4 assemblies
-    improved Ab3d.PowerToys, Ab3d.Reader3ds and ZoomPanel libraries

The new installer has been improved to work better on 64 bit windows. Now the products are no longer installed under “Program Files (x86)” folder, but under “Program Files”. All the products are built with “Any CPU” setting and therefore do not need to be in the folder where all the “old stuff” is. Note that if you were referencing our products from the x86 folder, you will need to update the path to our products.

All the products now also contain assemblies that are built on .Net 4.0 Client Profile framework. When building .Net 4.0 applications, you can now reference native .Net 4 assemblies. Before you had to reference original .Net 3.0 (Ab3d.Reader3ds, Ab2d.ReaderSvg, Ab2d.ReaderWmf or ZoomPanel) or .Net 3.5 SP1 (Ab3d.PowerToys) assemblies. This was not a problem because the 4.0 CLR runs the assemblies on previous target frameworks natively inside 4.0 CLR (without running them in some kind of virtual machine). So it was already possible to use our libraries on machines where only .Net 4.0 is installed. Anyway time goes on and now almost all new applications are built on 4.0 so I decided to prepare native builds for that framework. Of course the original 3.0 and 3.5 assemblies are still available. Original assemblies are inside bin folder as before. The new assemblies can be found inside bin\.Net 4 folder.

Because all our products except Ab2d.ReaderWmf are using AllowPartiallyTrustedCallers assembly attribute, I had to take a closer look at the security critical sections of the code and add some security related attributes on some methods. This made the code .Net 4.0 compliant.

Note that the Viewer3ds, ViewerSvg and Paste2Xaml applications were not ported to .Net 4.0 and still requires older framework to run (older applications cannot run inside 4.0 CLR - only assemblies can be used inside 4.0 applications).


As mentioned before some of the products were also improved.

ZoomPanel library got improved ZoomPanelMiniMap control. Here controlling ZoomPanel with moving rectangle around was improved (before movements were slow). In the previous version it could happen that when a content of ZoomPanel was changed from a big to a much smaller content, than the new image in ZoomPanelMiniMap was too small. This is fixed now.

Ab3d.Reader3ds library also got a few improvements. Most of the work there was done to improve reading of broken 3ds files. Because 3ds file is very old and very commonly used, there are many applications out there that can export to that file format. Unfortunately not all of them create valid 3ds files. I got some of such files. Most of them were so screwed that it was not possible to import them into 3D Studio Max (invalid file format error was shown). Despite that there were still some valid data inside those files. And the new version tries to read as much from them as possible.

In case when a broken 3ds file is read with Reader3ds, you will still get FileFormatException (when reading with default settings). But now you can catch the exception. Than you can warn the user about problematic file and if the user wants to read the file anyway, you can set the new TryToReadBrokenFiles property on Reader3ds to true and read the file again. You can also have that property always true and just check the IsBroken property after reading 3ds file. Both those options are also used in the new version of Viewer3ds.

One nice new feature of Viewer3ds is showing object’s bounding box, triangles and normal. This is very useful in finding the cause of the problems in some 3D objects that do not look correct. Because Viewer3ds uses powerful 3D lines capabilities of Ab3d.PowerToys library this was an easy task to do. The following screenshot shows that new feature:

Viewer3ds: Showing details of selected object - bounding box in red, triangles in green and normals in blue.

The longest list of new features for this release belongs to Ab3d.PowerToys library. Today I will just write short descriptions of new features. In one of the following posts I will discuss some of them in more details. So the improvements are:
-    Improved LinesUpdater performance and removed possible memory leaks.
-    Added Reset method to LinesUpdater that takes Viewport3D as parameter to reset (remove all lines) only from specific Viewport3D.
-    Added HeightMapVisual3D and HeightMapMesh3D (with two very nice samples)
-    Added TubeMesh3D, TubeVisual3D and TubeUIElement3D.
-    Added support to very easily create 3D curves: added Ab3d.Utilities.BezierCurve and Ab3d.Utilities.BSpline classes; also added CreateBSpline3D and CreateNURBSCurve3D to Line3DFactory.
-    Added MouseWheel event to EventManager3D – now you can subscribe to MouseWheel event on any Model3D object.

Ab3d.ReaderSvg and Ab2d.ReaderWmf libraries did not get any new features of fixes. But they also got new versions (with same major and minor version but increased build version) because of new .Net 4.0 assemblies and small changes that were needed in the code to make the code 4.0 compliant.

Tags: , , , ,

Ab3d.PowerToys | Reader3ds | ReaderSvg | ReaderWmf | ZoomPanel

Maintenance releases for Ab2d.ReaderSvg and Ab2d.ReaderWmf published

by abenedik 28. May 2012 08:00

I am happy to announce that maintenance releases are now available for Ab2d.ReaderWmf and Ab2d.ReaderSvg.

The improvements and fixes in Ab2d.ReaderWmf are:

  • Improved scaling of text. Before sometimes the text was not correctly scaled - for example when pasting cells from excel the text can go out of bounds. The text is scaled with RenderTransform on TextBlocks. Note that scaling can be turned off with setting ProcessCharacterSpacing property to false.
  • Added support for text that is defined by glyphs indexes instead of unicode characters (usually when the metafile was created from the data that was sent to printer).
  • Fixed processing character spacing for special charter marks that are shown over another character like carets, etc.
  • Fixed exporting to XAML when the content of the Text property contains curly brackets. Before parser wanted to use them for binding expression.
  • Added ResolveRasterOperation delegate that enables using custom brush when an unsupported raster operation is used in metafile.


The following are the changes in Ab2d.ReaderSvg:

  • Fixed exporting to XAML when the content of Text property contains curly brackets. Before parser wanted to use them for binding expression.
  • Prevented throwing ArgumentException when right or bottom value in object's bounds was negative.


As usual the new version can be downloaded from User Account page (for commercial users) or from my Downloads page (for evaluation version).

Tags: , ,

ReaderSvg | ReaderWmf

FINALLY! So long the stone-aged web site and welcome the new web site

by abenedik 21. May 2012 09:43

I knew it from the beginning - the previous web site design was surely not looking like we are developing software for high end applications. It was more appropriate for some stone-age museum. No more - the new greatly looking web site is live!

The preparations for the new site were quite long.

First the new domain had to be acquired. Because the domain was already taken this was not an easy and cheap task. I think that I should clarify that going away from does not mean that we will abandon the WPF. No worries, we are not affected by MS marketing departments and still believe that WPF is by far the best technology to build advanced desktop applications. Anyway the previous domain was related only to WPF. This was not very convenient for our tools that can be used for Silverlight as well. The new domain is technology independent and is therefore opened for any possible future. Of course we will still support and improve the current products. What is more we are preparing a new very excited product that will be still based on WPF.

Let's continue our new web site story. After the new domain was acquired we needed a new logo. I think that logo is important - it is shown in many placed and somehow subconsciously represents the idea of the company. Having high requirements for the logo, there was no way I could create it by myself. Therefore the was used to gather many developers that created hundreds of ideas. This process was really amazing and I think that the winning logo design is also amazing.

After that we started discussing and preparing drafts for the new web site. I see now that it is surely not easy to be a designer - creating something that customer wants when the customer is not really sure what he wants. After some going back and forth I thing we created a great web site that looks nice and is functional. Some parts are still not finished - for example the Purchase page still needs some polishing.

Enjoy the new site...


Web Page

Fixed ReaderWmf publised

by abenedik 3. March 2012 22:40

The new version of ReaderWmf 5.5.4436 greatly improved reading metafiles from stream because it read the stream directly and did not create a temporary file from it as previous versions did.

But unfortunately the code change had a bug that could produce NullReferenceException.

This exception can also happen when using WmfViewbox or WmfDrawing.

A new version 5.5.4445 that fixes that issue has been just published.



Maintenance releases for all products are now available

by abenedik 24. February 2012 22:13

I am happy to announce that maintenance releases are now available for the following products:

  • Ab3d.Reader3ds and Viewer3ds
  • Ab3d.PowerToys
  • Ab2d.ReaderSvg and ViewerSvg
  • Ab2d.ReaderWmf and Paste2Xaml
  • ZoomPanel (evaluation version only)


Everybody that are using evaluation version will be happy to know that new evaluation versions of all the products now show the evaluation information dialog only once per day. Previous versions show evaluation information dialogs on each start of your application. If two or more controls were used (for example ReaderSvg and ZooomPanel) than each time you started your application two dialogs were shown. This was too annoying and is now lessened so the dialogs are shown only once per day.

Another important change in evaluation version allows you to reinstall evaluation version (the same version or newer) after 90 days from the date of installing previous evaluation version. The 60-day evaluation time limit is still the same. But with previous versions you need to contact support to extend the evaluation version after 60 days. This was not very practical when you tried an older version before some time and at that time you did not need the library or it did not have all the features you wanted. But after some time you decided to try with the new version and you were not able to install the evaluation because it has already expired. Now this is not the case any more because after 90 days you can reinstall the evaluation version again. Note that when reinstalling the same version it is recommended to uninstall it before installing it again. There is still 30 days between evaluation expiration and possibility to reinstall after 90 days - this is left to prevent continuous use of only evaluation version. But if you need to extend the 60-day period you can still contact support to extend your evaluation.


Of course there are also some other improvements and new features that apply for both evaluation and commercial version.

Let me start with Ab2d.ReaderSvg (and ViewerSvg). The changes in new version are:

  • Improved reading size of root svg object (improved support for viewBox and added support for preserveAspectRatio).
  • The GetXaml method now preserves the width and height in specified units (cm or inch).
  • Removed memory leak that occurred sometimes when reading embedded images.
  • Improved reading embedded images - they are now read faster and with lower memory usage.
  • Fixed problems when Path bounds were negative and IsSizeSetToPathElement in SilverlightXamlWriterSettings was set to true.
  • Prevented adding PresentationOptions:Freeze="True" text to XAML for Silverlight.
  • Added option to export for Silverlight 5.
  • Fixed reading svg file that contain links to images and were read without specifying the whole path (Read method was called only with svg file name without the full path).


Ab2d.ReaderWmf got the following changes:

  • Fixed leaking GDI+ handles under some circumstances. This could lead to "Cannot open wmf file!" exception after opening a few thousands metafiles.
  • The Read and ReadGeometry methods that take stream as parameter now read the metafiles directly from the stream and do not create a temp file from stream as before.


Changes for Ab3d.Reader3ds:

  • Improved reading textures in Model3ds and Viewport3ds. Added TexturesPath property to both controls - it can be used to specify custom textures path. If TexturesPath is not specified, the path of the 3ds file is used.
  • Added support for cameras that are children of helper objects (for example when camera is linked to a helper object so the camera is transformed as the helper object).
  • Fixed setting IsCameraAnimated property - Reader3ds sets this property to true if the 3ds file contains camera animations. Before the property could be set to true in cases when the camera was not animated.
  • Added ReadLightRange property to Reader3ds. Before the Range of PointLights and SpotLights was not read. Now it is possible to read the Range with setting ReadLightRange to true. Note that attenuation data are not present in the 3ds file - if they are used they need to be manually set to lights after the 3ds file is read.

It is also worth noting that with new version of Viewer3ds all the cameras defined in 3ds file are exported as comments in xaml. The xaml also get a description of the exported cameras. This makes switching between cameras defined in 3ds file very easy.


There are also a few improvements for Ab3d.PowerToys:

  • Fixed rotating with MouseCameraController and CameaControlPanel when the scene in vertically inverted when Attitude is between 90 and 270 degrees.
  • Fixed EventManager3D where under some circumstances a new object drag can be automatically stared just after end drag event.
  • Improved MaterialTypeConverter: Added support for simply defining SpecularMaterial and EmissiveMaterials. For example the "s:32;Blue" text can be used to define MaterialGroup with DiffuseMaterial and SpecularMaterial (SpecularPower = 32; SpecularBrush = White; DiffuseMaterial = Blue). The "e:Yellow" can be used to show yellow emissive material. Also improved support for defining textures path (now files from local disk and from http can be used).
  • Fixed occasional NullReferenceException in SphericalCamera when layout is updated in Visual Studio designer.


The commercial version of ZoomPanel was not updated.


I would like to conclude the blog post with something completley different - a new logo for the company AB4D d.o.o.

ab4d logo

I got the new logo from a design contest that run on I was really satisfied with the contest and would really recommend that page to everyone. We are also making a redesign of the web page that will be available soon.

We are also preparing a very interesting new product (but more on that later).

I surely believe that the future is very bright for the company. I hope that our products will also make it brighter for you.

New version of ZoomPanel adds animation easing

by abenedik 18. November 2011 22:20

I am happy to announce that a new version of ZoomPanel is available.

The new version greatly improves zooming animations with adding animation easing and support for custom animations.

In the previous versions of ZoomPanel the zooming was animated with using a simple linear animation. Now a quintic function is used to ease the animation that starts slowly, than accelerates, decelerates and slowly stops at the new zoom level.


There is also a new zoom to object sample that shows how to zoom to selected object. The sample also demonstrates the power of custom animations. The following video shows the new sample:


The new version also fixes an issue with Viewbox with SetViewbox or SetZoom methods when the RotationAngle is not 0 and it is not changed. Before the RotationAngle was reset to 0 in some circumstances.