nel_exporters - ryzom/ryzomcore GitHub Wiki


title: NeL Exporters description: published: true date: 2023-03-01T05:22:36.814Z tags: editor: markdown dateCreated: 2022-03-16T10:34:39.264Z

NeL Exporters

Added by vl 8 months ago

0 - Current State

Nevrax developed 3ds max plug ins to export 3ds max files (.max for example) into NeL proprietary format (.shape for example).

So to be able to create new objects and export them in .shape, we need 3ds max.

pros it's working
cons it's 3ds max (not free), only work on Windows

1 - Collada solution

Collada is an interchange file format. Lot of 3d modelers have exporter to Collada. In this case we just have to code a little standalone application that take in input Collada files and output .shape files.

pros Exporter are already available for most of modelers. We only have to develop a standalone converted. It'll work on all OS.
cons It doesn't export all NeL stuffs

2 - Specific exporter

The other solution is to develop plugins for other modeler like Blender to export .shape files.

pros Be able to export everything we need for the NeL 3d engine
cons Need lot of development. Will work only on Blender. Hard to maintains 3dsmax,blender,... plugins

So...

What is your choice, is there other choices I forgot?

For my part, I strongly believe in the solution 1 because it needs minimum development with fast results. Like Volaire said: "The best is the enemy of the good"

Replies

RE: NeL Exporters - Added by kervala 8 months ago

I vote for the COLLADA solution :)

A lot of 3d softwares are supporting it natively or with a plugin.

Even if we can't convert all to collada, the most important objects can be (skeletons, meshes, weights, animations, etc...).

I think it should be a more judicious choice than creating an exporter for each software :)

Some interesting links :

RE: NeL Exporters - Added by Spex 8 months ago

Approach .#1 (Collada) is most likely the best way to go (from an uninformed point of view), especially with limited development resources. It means some work in the beginning compared to the existing (working) plugins (what about the Maya plugin?), but it means (possibly) less trouble in terms of maintenance in the long run because we only need to focus on one thing.

As I have no insight into the features Collada offers, it would be nice if someone could shed more light on that and lay out possible problems with Collada in regard to NeL (and how serious these are). (And yes, I remember some discussions about that topic a good while ago already, wtb better memory.)

RE: NeL Exporters - Added by sfb 8 months ago

I covered some of this in the shaders post... but I can go into a much more detailed conversation here.

Frankly writing a specific importer is easier work than doing what it would take to do COLLADA. You can write out the quirks of your modeler at export-time and you then export to a format that NeL knows. In the long run this may not scale - it all depends on how many modeling packages you intend on supporting. If it is MAX (current state) and Maya (1/2 done) then it doesn't make a ton of sense to invest energy into something like COLLADA.

That being said I think COLLADA is a fantastic idea. In fact I think we could get away without having an intermediate tool to convert COLLADA into NeL shapes - you could theoretically load COLLADA files directly into in-memory implementations of NeL data. A tool however may be handy for fine-tuning the COLLADA data to the NeL idiosyncrasies.

There is a problem to be addressed though with going to COLLADA and it is a problem we already face with existing third-party exporters such as Maya. In Maya (and I believe the XSI plugin) we had to "bake" the animation tracks to key-per-frame because Maya (and XSI) do not understand TCB interpolation and the mathematical conversion from the native interpolation type to TCB (which NeL uses because MAX used it) is completely inaccurate, costly in time to compute or simply impossible in some cases.

I pick on this subject because it is one that I have talked to death. For example some of the animation curve types that COLLADA supports are: TCB, Spline, Bezier, Linear and Step. To my knowledge NeL only supports TCB and maybe linear. The problem here is that when you save an object out of, say, Maya to the COLLADA format you don't choose these atomic-level options - Maya saves to COLLADA in the format that it uses. So Maya may use some variation of Bezier. Blender may use some variation of Spline. And so on. This means to support COLLADA you need to do more than simply load vertices into NeL C++ structures and pray for the best. You will need to support the (much more limited) idiosyncrasies of serveral modeling packages but instead of doing so in code married to that package - it will be in the core of NeL. NeL will need to have various implementations of CAnimationTrack.

It doesn't end here either. For the most part mesh and geometry is... mesh and geometry. There are some quirks and conversions to be faced in the way the NeL programmers handle some of this stuff (which the background of these decisions is lost to time, bankruptcy and turnover.) But there are issues such as various material types - many more than NeL supports. You'll annoy the bejesus out of an artist that spends days tweaking a model and only to load it into Object Viewer, place some lights and have it look nothing like what he poured his time into. That is the beauty of NeL being so tightly coupled with 3DSMAX. What it looks like in MAX it looks like in NeL.

If I can I'll try and get my 3D guru to post on here about some more specific information. I asked him to spend some time looking into this very subject. He can speak from personal knowledge rather than my collection of notes and discussions with various people.

⚠️ **GitHub.com Fallback** ⚠️