20% discount for Ab3d.PowerToys and Ab3d.Reader3ds Pro

by abenedik 21. December 2009 10:37

Santa

To celebrate the launch of Ab3d.PowerToys and to bring some christmas felling to my web page, I have decided to give you 20% discount for all Ab3d.PowerToys licenses and to Ab3d.Reader3ds Pro licenses.

To apply for the discount enter "PowerToys" into the discount textbox on my Purchse page. Than click Apply and add the items to shopping cart.

The discount is valid until the end of January 2010.

 

And here is another gift. A 3D santa model (available in 3ds and xaml):

Santa3D.zip (473.10 kb)


Merry Christmas and Happy New Year!

Tags:

Ab3d.PowerToys | Reader3ds

Preview the 3D objects from 3ds files in Visual Studio Designer

by abenedik 3. December 2009 23:03

Did you guess it?

A new version of Ab3d.Reader3ds is available!

And it adds great support for showing 3D objects from 3ds file with using only XAML.

By the way, for those who do not know what 3ds is: 3ds is the most commonly used file format for storing 3D content. And Ab3d.Reader3ds is the library that enables you to bring all the 3D models stored in 3ds into the WPF's 3D world.

There are also some other improvements, but let me firstly show you the new XAML support. The following image shows one example of what is possible now:

Viewport3ds in Visual Studio Designer

The image shows that with only one control it is now possible to show 3D models from 3ds file. And it is also possible to see the preview in Visual Studio Designer.

The above code shows the 80th frame of the animation stored in "ab3d drop down.3ds" file. If you would like to play the animation the following can be used:

<controls3ds:Viewport3ds Source="ab3d drop down.3DS"
                         IsAnimated="True"
                         AutoRepeat="True"
                         AnimationDuration="0:0:10"/>

So you only need to set the IsAnimated property to true and the animation stored in 3ds file will be played automatically. It is also possible to set some other animation properties - in our example AutoRepeat and AnimaitonDuration.

This way it has become really easy to include animated 3D content inside WPF applications.

 

The Viewport3ds is just the most basic way to show the objects from 3ds files. For more advanced users it is now possible to use Model3ds and even Reader3ds in XAML.

The Model3ds is derived from ModelVisual3D. This means it can be used inside Viewport3D. The main advantage of Model3ds over Viewport3ds is that it support precise positioning and sizing of the shown model. Also with Model3ds it is possible to shown just one part of all the models inside the 3ds file. For example the following XAML shows only "Torus01" model from the 3ds file on a custom set position and with custom size:

<model3ds:Model3ds Source="multiple objects.3ds" 
                   ObjectName="Torus01"
                   SizeX="50" SizeY="30" SizeZ="40"
                   PreserveScaleAspectRatio="False"
                   Position="100 20 0" PositionType="BottomCenter"/>	

As with Viewport3ds, the results with Model3ds are also immediately visible in Visual Studio Designer. This way you can simply position and size the 3D element. You can also very easily mix the objects from 3ds file with the basic 3D objects available with Ab3d.PowerToys (for example box, plane, etc.)

This was just a simple sample of Model3ds. For more check out the samples that come with the Ab3d.Reader3ds library.

I have mentioned that now also Reader3ds class can be used in XAML. How is this possible? Until now the class was used in code to read 3ds files. But now it derived from DependencyObject. And this means it can be defined as Resource. For example:

<Page x:Class="Reader3dsSamples.Reader3ds.Reader3dsAsResource"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ab3d="clr-namespace:Ab3d;assembly=Ab3d.Reader3ds"
    <Page.Resources>
        <ab3d:Reader3ds x:Key="MyReader3ds" Source="robotarm.3ds"/>
    </Page.Resources>
    <Grid>
        <Viewport3D Camera="{Binding Source={StaticResource MyReader3ds},
                    Path=Cameras[0]}">
            <ModelVisual3D Content="{Binding Source={StaticResource MyReader3ds}, 
                           Path=RootModel3DGroup}"/>
        </Viewport3D>
    </Grid>
</Page>    

The sample shown that because Reader3ds is defined as Page's Resource, it can be used in databinding. In the sample above the Content of the ModelVisual3D and the Viewport3D's Camera are databound to the Reader3d. And this is not all - it is also possible to bind to the Reader3ds NamedObjects dictionary, to Materials dictionary, Cameras list, etc. (see samples with library for more).

 

As I have already mentioned, the new XAML support is not the only improvement of the Reader3ds.

The 3ds reading engine has been also improved.

Now all the known problems from my very big list of 3ds files (collected with your help also) have been solved.

I have finally managed to find a way to correctly read some 3d objects that were defined with using left-handed coordinate system instead of right-handed one (usually mirrored objects).

Texture mapping is also improved (before some Textures were not placed correctly - in this version I have added DisableTextureOffset property - by default it is true to fix the problems).

Fixed "Object reference not set ..." exception when reading some 3ds files.

Also added support for textures in tif file format.

 

So now if it looks like Reader3ds or Viewer3ds did not correctly read the 3ds file, please try to open the 3ds file in a 3D modeling application. In almost all the cases the problem is in the 3ds file and not in the Reader3ds. Usually the 3ds file was not correctly exported - probably because you used some advanced features like bones animations, but 3ds file is quite old and cannot store those data. I know, many of you are waiting for some other 3D file format readers - I will make some in the next year for sure.

All of the features of the Ab3d.Reader3ds library still work on .Net Framework 3.0. For performance reasons it is highly recommended that you use .Net 3.5 SP1, but if you develop for .Net 3.0 you still can. But probably the next version will alredy require the 3.5 SP1.

 

After reading about all the new features, I am sure you agree that the Reader3ds deserved the increase of the version from 5.3 to 6.0.

I also hope that you agree that programming with 3D was never easier!

 

R2D2 3D model read with Reader3ds

 

As always the new version can be downloaded from my Downloads page.

Tags: , , ,

Reader3ds

Animated 3D Buttons Panel sample

by abenedik 21. January 2009 16:13

As promised I have published a source code for Animated 3D buttons that were used in previous version of Viewer3ds.

The sample shows how to create 3D buttons that are animated when mouse moves over them. Under the buttons there is a nice reflection of the buttons. The models for the buttons are defined in 3ds files and read with Ab3d.Reader3ds.

Animated 3D Buttons Panel sample

The sample is now part of the samples that come with Reader3ds installation.

It is also possible to download the sample alone from here (note that Ab3d.Reader3ds have to be installed on the system).

Tags: , , ,

Reader3ds

Ab3d.Reader3ds v5.2 has improved WPF Browser applications support

by abenedik 20. January 2009 19:34

The previous version or Ab3d.Reader3ds did not work with WPF Browser applications (XBAP). Because WPF Browser applications are running inside a partially trusted environment, the licensing code could not read the license or evaluation information. The new version overcomes this by embedding the information into the applications resources. To do this a license.licx file needs to be added to WPF Browser application's project and its build action should be set to Embedded resource (also for evaluation version).

This is the list of changes for v5.2:

  • Added support for using Ab3d.Reader3ds in WPF Browser applications (partially trusted).
  • Fixed problems with evaluation version with SmoothingGroups - sometimes "Index was out of range. Must be non-negative and less than the size of the collection." was thrown.
  • Fixed reading some 3ds files with animation - sometimes "System.OutOfMemoryException" was thrown.

For convenience I have also included samples for VS 2008 into the installer (besides VS 2008 solution).

WPF Browser application

The new version is available on https://www.ab4d.com/Downloads.aspx.

Tags: , , ,

Reader3ds

There is never enough testing!

by abenedik 1. January 2009 14:26

Everyone who has already tried the new version of Viewer3ds knows what I mean. The application just did not start!

During the final testing a wrong version of Viewer3ds "smuggled" into my installer project. Because I have already done extensive Viewer3ds testing, I did not test it again. What a mistake! The installer contained a version of Viewer3ds that required a wrong version of Reader3ds.

Luckily the new Viewer3ds has an error reporting system, so I could act quickly.

The fixed version is already available on https://www.ab4d.com/Viewer3ds.aspx. It was actually already available on 31th December 2008, but because of a New Year celebration I did not have time to write a message about it.

I must admit that the past few releases were not very good. Every release had some problems. I am already using a unit testing, but still there is place for error. I was also quite under pressure, because I have to release new versions for all the products before the previous version expired. With the releases still to come I will have more time for additional testing. So they should be less buggy.

The only thing left to say is:

Happy New Year 2009!

Tags: , , ,

Reader3ds

New version of Viewer3ds and Ab3d.Reader3ds available

by abenedik 27. December 2008 22:40

Finally my firstly published application, Viewer3ds, got a major update. The Ab3d.Reader3ds library was also updated.

The previous version of Viewer3ds was really old. More than 2 years old! The main problem with Viewer3ds was that it was using an embedded Ab3d.Reader3ds library for importing 3ds file. This meant that the updates of Ab3d.Reader3ds and many new features that were introduced did not have any effect on the Viewer3ds.

Viewer3ds

The new version of Viewer3ds does not have an embedded Reader3ds, so the currently available version is used.

The application now also supports many new features. For example:

  • The objects hierarchy is displayed in a tree view. It displays names of the objects that were defined in a 3D modeling applications. So when the exported xaml is used in your application, you can know which names to use to access the objects.
  • All the 3D objects can be renamed (or given a name if a name was not specified).
  • If the 3ds file contains an animation, it can be played with Viewer3ds. A selected frame can be exported to xaml.
  • It is possible to export only selected objects (besides exporting all objects).
  • Camera can be freely rotated around the read objects (select Free Camera in Cameras Panel).
  • Lights can be turned on and off. A camera light that shines in the direction of the camera can be added to the scene (in case the scene does not contain any light).
  • There are many options on how to load the 3ds file. For example it is possible to disable transparencies, control the shading of objects, etc.

As you have probably noticed from the screenshot above, the user interface is completely changed. It is now similar to ViewerSvg and Paste2Xaml. The process of user interface unification will eventually lead to a single application that could be used for all the supported file types. I also plan to include some great new features (but will not let you reveal my plans :)

Some of you will probably miss the 3D buttons that were used in the old Viewer3ds. No need to worry. I am going to prepare a sample with the same 3D buttons. It will be available with full source code so you could add the same functionality to your applications.

The Ab3d.Reader3ds library also had some improvements and bug fixes:

  • Fixed bug when reading spot lights.
  • Fixed Null reference exception when setting Default Material.
  • When applying smoothing groups or smooth shading, the texture coordinates are also remapped (before textures were not applied correctly).
  • Using new licensing model with improved evaluation. The new version has no fixed expiration date - instead library can be installed for a 60 days evaluation.

The new version is available from https://www.ab4d.com/Viewer3ds.aspx.

Tags: , , ,

Reader3ds

Commercial version of Ab3d.Reader3ds available

by abenedik 4. June 2008 17:00

As promised the commercial version of Ab3d.Reader3ds is available.

The purchase can be done on https://www.ab4d.com/Purchase.aspx.

As rss subscriber I give you 10% launch discount. Just enter "Reader3dsRss" as a discount code on the Purchase page.
The discount is valid only until the end of July 2008.

Tags: , , ,

Reader3ds