Nova 2010 trailer...

by Frédéric Colin 21. January 2010 20:50

You should know that Nova 2010 range will be launched at the beginning of the second 2010 quarter. This version will be the largest in terms of new features we've ever made! Here are the first four unveiled:

  • DirectX 10 and shader 4.0 support
  • New engine for real-time shadows
  • Nova Web Player view: support IE, Firefox, Opera, Safari and Chrome
  • New formats for importing files from 3D software (.fbx, .dxf, .x, .obj, .3ds, .dae)

More news soon!

Nova Explorer and MySql scripting sample - Part VI

by Frédéric Colin 14. November 2009 23:21

In my last post on this subject, I suggested that deploying MySQL ODBC drivers on client PC was not a good design. I spoke about Service Oriented Architecture or more specifically about Rest Services. There will be so many things to write about SOA and Rest Services but it's not the subject. I will just technically describe how I created a Rest service that returns records from my MySql Database.

First of all a small architecture picture:

In my sample, a Web Site on IIS is exposing REST Services over HTTP. These services expose data from my database called "bCatalog" and specifically from my table tProducts. The return data are xml formatted, more specifically in an atom format. Data may be accessed through specific urls such as:

  • "http://localhost:2522/ProductService.svc/tproducts: get all records from the table "tProducts". I highlighted the important tags in resulting xml document:

  • "http://localhost:2522/ProductService.svc/tproducts('Box01WithLabel')": get the specific product from de table "tProducts" where "objectID" (the primary key) is equal to "Box01WithLabel".

In the solution you can download (at the end of the post), you will see I used two Microsoft technologies: ADO.NET Data Services to create Rest Services and ADO.NET Entity Framework to request data from my sql database. Moreover, this time I used the managed MySql driver you can download here.

The next step was to update my Nova Script in VB.NET to request data on http. So I just proceeded as follow:

  • I replaced my database Connection String by a simple URL to request all data from "tProducts" table.
  • I completely rewrote the existing "LoadObjectsFromDatabase" method to take into account an http query. Technically, the .NET Framework offers all you need to make http requests and to interpret resulting XML data. The class to use to request is "HttpWebRequest" and the class to use to manipulate XML is "XmlDocument":

The harder task was to manipulate the atom XML Document. I lost a couple of minutes thinking why my xpath request (to get all entry tags, i.e. database records) didn't return anything. In fact, it was quite simple! Indeed, in atom format, there are default namespaces that must prefix all tags. The rest of the job was just finding nodes, route nodes and gatting and storage of values (database fields).

So, with this solution, my database is no more directly exposed to the web and especially I have not to deploy MySql ODBC drivers on each client. In the following zip, you will find:

  • the mxb file I used,
  • the corresponding nss file,
  • the nsr file that contains the previous scripting in case,
  • MySql database scripting.
  • the web exposing Rest Services (you will need Visual Studio 2008 SP1 to load the project)

VerticeSample-Last.zip (66.48 kb)

Enjoy!

Let me know if you are interested with the code to load data only on user interaction (with cache store) by leaving me a comment for this post. Moreover if you have any questions about SOA, please contact me.

Nova Explorer and MySql scripting sample - Part V

by Frédéric Colin 10. November 2009 12:30

It's now time to analyze the solution. We do not yet know very well (joke), but when I see a code or an architecture, I used to have a critical eye over. I confess that it is the same for the code I produce. So, here are my thoughts about the developed solution:

  • Deploying MySQL ODBC driver may be acceptable for an small intranet solution but is not acceptable for a full web compliant environment.
  • The direct use of a database from a Web Plugin may be dangerous for the database server since it forces administrators to openthe firewall for a specific port. That's unsecure and it's not the state of the art even if we place the database server in a DMZ. So we should use secured Web Services or Rest Services, i.e. on a standard protocol (http or https). this is what is called a Service-Oriented Architecture (SOA).
  • It will be better to only store the url of the services layer on http instead of a connection string. Url that can be set by the http server that manages the Web Page including the web plugin tag object.
  • I use the root account to access the catalog that I use to store my information. It's dangerous from a security point of view. We should use a dedicated account with less privileges.
  • You'll notice in my script, I hard stored the culture to format the price. On the other hand, we should not make this as a dynamic part since in my database I store Euros and not Dollars. And with the price of the dollar right now, it won't be interesting, except if we manage changes according to the user culture.
  • If you take a look at the database schema, you will notice it is simplistic. Indeed, products may have more data such as categories, keywords, etc. and we should use an integer as a primary key to perform powerful tables joins.
  • The last thing is the way to load once all data from database. What happens if data change in the database after web Plugin loading? Well, nothing in fact because data are not collected when the user interaction is executed.
  • Last but not least, the Web Plugin had to be updated to reference the missing "System.Data.dll" assembly to access "System.Data.Odbc" namespace. This update will be available soon with Nova Explorer auto-update.

Well, you are going to tell me that I coded with my feets ;-). In fact I responded directly to a need that I have been asked for. Moreover, any script may always be improved with time. I develop this solution in a couple of hours (in fact 3 hours). This partly explains it... Now I will attach myself to do things in the rules of art, anyway, as I believe they should be :-)

So in my next post I will show you how to develop a REST Architecture to expose my data and to consume it in a Nova script.

See you soon!

Nova Explorer and MySql scripting sample - Part IV

by Frédéric Colin 9. November 2009 23:13

Well, last but not least post on this topic, let's use this scene with differents clients.

  • Nova Explorer, certainly the most used:

  • A specific Windows Form application that use the .NET Web Player control:

  • The Web Plugin inside Internet Explorer:

The first step is to generate the mxc and the html files by using Nova Explorer Publish menu:

Then, you have just to open the generated Html page:

Just one more thing like will say a friend of mine: since the trust does not exclude some form of control, below here are of the database contents I used.

In my next post, I will talk about architecture and specifically the one that is induced by this complete sample. In other terms, I will talk about its pros and cons.

Nova Explorer and MySql scripting sample - Part III

by Frédéric Colin 9. November 2009 09:06

Enough words. It is time to code! I suppose you installed all the products described in this post.

In terms of functionalities, I decided to load data from database once when the script module is executed. The other solution would have been to load only the needed data from database, i.e., one request for each pickable object with data to display. In order to reduce requests on the database server, I implemented the first solution.

So, the first thing to do is to declare the connection string to the database:

Private ConnectionString As String
= "Driver={MySQL ODBC 5.1 Driver};
Server=192.168.0.103;Port=3306; Database=bCatalog;User=root;Password=bewise31;Option=3"

You will notice that I used the Super Administrator account to connect to the database. Of course, it's bad, and you should have a specific account with only the needed rights.

I decided to store database records in a generic list of Products, to keep them in memory: 

The next step was to access to the database to fill the previous generic list:

DatabaseProducts is the generic List of Products. The reader is a kind of record set read only forward only where you retrieve values from the database, record by record. The database connection must still be opened while reading values. In VB.NET, the syntax "Using ... End Using" is very useful to automatically free the memory by calling Dispose method on the object connection in my sample.

It's now time to talk about the BuildDataPanel method used previously which contains the "intelligent" part of the script that will generate on the fly the needed user interaction to display the data panel:

The first thing to do in this code is to find the corresponding object in the scene. For this, I use the generic list Find method that admits a predicate (in fact a delegate) as a parameter. Please, don't focus on the trick I use to filter records to pass a parameter value corresponding to the filter. The Searcher class is used for that and it just works. Once done, I make the selected object pickable to allow interactions on it.  You will also notice the use of a "DefaultCultureInfo" member that is a CultureInfo instance, set for the French culture to format a decimal in currency (euro).

The next thing is to create the trigger as a user interaction (user click) to attach it the Nova Scene object found previously. Then, on this trigger, we will add a custom action as a Nova static text. It's the widget used to display data within the scene. The next couple lines of code are here to set the action (text to display, visibility duration, colors, etc.)

The last step is to call the Reset Method on the created trigger to initialize the behavior and that's it!

I'm quite sure you will be more interested in the sample code source than my explanation :-). That's why in the following zip, you will find:

  • the mxb file I used,
  • the corresponding nss file,
  • the nsr file that contains the previous scripting in case,
  • MySql database scripting.

    VerticeSample.zip (38.21 kb)

Enjoy!

To be continued ...

 

Create Plugins for Nova Explorer

by Frédéric Colin 21. September 2009 07:59

Recently, I enjoyed making some statistics on questions received by our support team. I noticed one of them because it returned several times over the last month. It was a question about how developing a plugin with Nova SDK 2009 SR1.

In Fact, it's quite simple because the only prerequisite is to know C# or VB.NET. Then you have to follow this online tutorial. You will find a step by step record and two samples.

Moreover, according to these questions, I decided to develop a specific plugin that I think would fit customer needs as a new sample. I started the development in C#.

Stay tuned!

 

Release of Nova 2009 5.10.0.13

by David Catuhe 5. March 2009 20:54

The next release of Nova 2009 is about to go live.

Here are the news features of this release:

  • Corrections of bugs:
    • Correction of a bug in the Collada importer for files issued from Autocad.
  •  Web Plugin:
    • An event has been added when selecting an object
    • The property « Paused » has been added to stop the rendering
  • Scripts & SDK
    • Vector3Interpolator has been renamed NovaVector3Interpolator
    • QuaternionInterpolator has been renamed NovaQuaternionInterpolator
    • The enums InterpolatorTypes and InterpolationLoop are now global
    • NovaObject.DisableRenderDepthSorting:Possibility of not sorting an object according to its distance to the camera at the time of the rendering
    • NovaEntity.ComputeWorldMatrixOnce is removed and replaced by NovaEntity.IsDynamic
  • Scripts
    • New property : MainForm.RenderEvenInBackground. NovaExplorer will render scene even in background
  • Nova Explorer:
    • New editing control of the scripts and shaders code
      • Better support of the undo/redo
      • Better search engine for find/replace
      • Better support of the intelliscript
      • The namespace imports are no longer automatic for a better visibility of the code

 


RecentComments

Comment RSS
Disclaimer
The opinions expressed herein are the author own personal opinions and do not represent their employers' view in anyway..

© Copyright 2010 Nova by Vertice Team