Reuse importer code for other project

General Project and community related discussion.

Moderator: coordinators

Reuse importer code for other project

Postby Shump » Sun Feb 26, 2012 11:11 am

Hello,

Short description:
I'm wondering how I can reuse luxrender's importer to our raytracing project.

Details:
We're currently writing a simple raytracer and looking into different file formats and available importers/exporters. We're looking for a format we can export from blender that includes geometry, materials, textures, camera and lights.

I've looked into a couple of formats that seems to support this (collada, X3D, Alembic among others.) but either doesn't the blender exporter support all entities we want or it doesn't exist a good and simple enough importer to use.

I am now looking into the luxrender importer, since it seems fulfill our requirements and there exist both an exporter and a importer (in the renderer) however I'm struggling trying to figure out how to reuse luxrender's importer.

What I know so far is that luxrender seems to to use lex and yacc which I have no previous experience with.

If someone could help me along the way and tell me what files I need and how to use them, I would be very grateful!

Thanks!
Julian
Shump
 
Posts: 4
Joined: Sun Feb 26, 2012 10:48 am

Re: Reuse importer code for other project

Postby Dade » Sun Feb 26, 2012 12:35 pm

It sounds like a good idea but the first question is: is you project being developed under GPL license ? I ask because LuxRender sources are GPL and you can reuse GPL code only with other GPL code. GPL is a prety strict license under this point of view.
User avatar
Dade
Developer
 
Posts: 4795
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Reuse importer code for other project

Postby Shump » Sun Feb 26, 2012 2:57 pm

Thanks for the tip.

We have not yet decided on a license, but we will keep it in mind when we decide to publish our code.
Shump
 
Posts: 4
Joined: Sun Feb 26, 2012 10:48 am

Re: Reuse importer code for other project

Postby Abel » Sun Feb 26, 2012 3:27 pm

Shump wrote:We have not yet decided on a license, but we will keep it in mind when we decide to publish our code.

I strongly suggest to decide upon your project's licensing model before you even think of using source code that has been published under the GPL. You are only allowed to use such code (such as the LuxRender source code) if your application will be licensed under the GPL as well. Using the code and using any other license for your software means you will be committing a copyright violation.

Other than that, good luck with your program! :)
User avatar
Abel
Developer
 
Posts: 1412
Joined: Sat Oct 20, 2007 8:13 am
Location: Helsinki, Finland

Re: Reuse importer code for other project

Postby Shump » Mon Feb 27, 2012 8:05 am

The project is currently not published and a final license have therefor not been decided yet. I would personally prefer to launch it with a BSD-like license but in case we fall in love with the luxrender importer too much we probably have to reconsider it. However, since the project is currently only developed privately and have not yet been published, we would like to only use the luxrender importer during our internal development for the time being.

Anyhow, back to the question. Anyone who could give me some insight in how to use the importer? Do you think it would require much effort to port it to support our own internal scene-format? Just to emphasize, I'm looking into this to quickly add a importer to help us develop new features to our renderer. The end product might just as well use a custom-made importer. Unless it turns out we like your importer too much (:
Shump
 
Posts: 4
Joined: Sun Feb 26, 2012 10:48 am

Re: Reuse importer code for other project

Postby Dade » Mon Feb 27, 2012 11:23 am

Shump wrote:Anyhow, back to the question. Anyone who could give me some insight in how to use the importer? Do you think it would require much effort to port it to support our own internal scene-format? Just to emphasize, I'm looking into this to quickly add a importer to help us develop new features to our renderer. The end product might just as well use a custom-made importer. Unless it turns out we like your importer too much (:


You could just develop a translator between LuxRender Scene Description Language and yours. So you will have only to learn the Lux SDL (pretty simple and documented on Lux wiki) and you will not have to learn how the Lux parser code works.
User avatar
Dade
Developer
 
Posts: 4795
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Reuse importer code for other project

Postby Shump » Wed Feb 29, 2012 9:18 am

Thanks for your advice! I will look into it. I have limited time for this but I will report any progress I make.
Shump
 
Posts: 4
Joined: Sun Feb 26, 2012 10:48 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests