Exporter for Rhinoceros

General discussion regarding exporter development in general.

Moderators: Ratow, coordinators

Re: Exporter for Rhinoceros

Postby nart » Tue Nov 08, 2011 11:33 pm

Hello all-

I see it has been about 6 months since there was any activity about an exporter for Rhino....is anyone working on this?

I ask because I have been tinkering with trying to produce something with RhinoPython in the V5WIP, and I am to a point that I need to decide if I want to continue. I don't want to duplicate any effort.

What I've got so far is suface and polysuface render mesh export, mesh geometry export, camera export, sun export, and support of blocks (non-nested) as transformed instances. I've attached some screen grabs to show this:

rhino viewport:
rhinoviewport1a.jpg


lux output:
luxoutput1.jpg


rhino viewport2:
rhinoviewport2a.jpg


lux outpout2:
luxoutput2.jpg


I also tried nurbs exporting, which I think would really be neat if it is possible to support trimmed surfaces, and to dynamically tessellate as a function of pixels, but I don't think these things are supported...at least not from what I was able to gleam from the scene file doc. Here is an example:

rhino viewport:
nurbsRhinoViewport.jpg


and the lux output:
nurbsLuxOutput.jpg


The deformed plane and torus worked, but the others didn't. I did have to pad 2 knot values to get the parser to accept them, so maybe that wasn't the right thing to do but it seemed to make any difference what numbers I used, so I just duplicated the first and last. If anyone has tips about this I would appreciate it. But, if it is not possible to used trimmed surfaces then it is probably not worth it.

Also, I am really interested in trying to get pylux to work, as dumping this stuff to text files can get pretty slow if the scene gets complicated or has dense meshes, but I'm having trouble figuring out how to a) get all the modules and dependencies and b) get them imported into the rhino python IDE. If anyone has any tips on that kind of stuff then I would appreciate that as well.

At any rate, I just thought I would see if anyone else is working on or is interested in this.

Thanks,

Nathan
Last edited by nart on Wed Nov 09, 2011 12:08 am, edited 1 time in total.
nart
 
Posts: 17
Joined: Fri Oct 07, 2011 3:40 pm

Re: Exporter for Rhinoceros

Postby J the Ninja » Tue Nov 08, 2011 11:50 pm

Nothing to my knowledge. Congrats, your scripts are now the new LuxRhino. :P
-Jason

Material DB Admin
User avatar
J the Ninja
Developer
 
Posts: 2209
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: Exporter for Rhinoceros

Postby paco » Wed Nov 09, 2011 12:08 am

Nice results! I think that there is nurbs code floating around in the core but it hasn't been updated/used in a while.
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: Exporter for Rhinoceros

Postby nart » Wed Nov 09, 2011 12:12 am

Ha, well, its got a long way to go before I would call it LuxRhino.......but I guess I will continue on and perhaps one day it shall be so.
nart
 
Posts: 17
Joined: Fri Oct 07, 2011 3:40 pm

Re: Exporter for Rhinoceros

Postby patro » Wed Nov 09, 2011 3:55 am

hi nart, your efforts are welcome :)
you could ask Exvion if he can share part of his code or to join forces to... iirc he was playing around materials...
User avatar
patro
 
Posts: 1798
Joined: Fri Feb 29, 2008 9:06 pm
Location: mount Etna

Re: Exporter for Rhinoceros

Postby Sheltem » Wed Nov 09, 2011 4:21 am

Noooice!!

S
Sheltem
 
Posts: 122
Joined: Sun Jun 15, 2008 11:06 am

Re: Exporter for Rhinoceros

Postby jeanphi » Wed Nov 09, 2011 8:28 am

Hi,

Great progress, congratulations! For the NURBS issue, it might be interesting to provide us with an example source data from Rhino (the values, not a Rhino file), along with reference views so that we can try to pinpoint the issue.

Jeanphi
jeanphi
Developer
 
Posts: 6569
Joined: Mon Jan 14, 2008 7:21 am

Re: Exporter for Rhinoceros

Postby nart » Wed Nov 09, 2011 12:48 pm

jeanphi wrote:Hi,

Great progress, congratulations! For the NURBS issue, it might be interesting to provide us with an example source data from Rhino (the values, not a Rhino file), along with reference views so that we can try to pinpoint the issue.

Jeanphi


Hello Jeanphi-

I have attached the scene files for the above example. The nurbs data is in the scene-geo-nurbs.lxo file. As I mentioned, the parser requires two additional knots in the U and V directions than Rhino provides, so based on this page:
http://www.rhino3d.com/nurbs.htm, I just duplicated the first and last knots. I also couldn't find out any info on what the 'nurbs::u0/nurbs::v0' parameters really mean, so I just left it at default. I must admit I don't really understand the mathematics behind nurbs surfaces, so I don't really know what it would take to get trimmed surface support, nor have I found anything in Rhino that says 'this is the trim data for a surface', but without trimming I don't really see the justification for supporting the nurbs primitive. But I am happy to help if someone wants to work on it.

Thanks for everyone's replies.

Nathan
Attachments
RhinoNurbsSceneExport.zip
(2.11 MiB) Downloaded 25 times
nart
 
Posts: 17
Joined: Fri Oct 07, 2011 3:40 pm

Re: Exporter for Rhinoceros

Postby jeanphi » Wed Nov 09, 2011 4:12 pm

Hi,

I think that duplicating the first and last knot values is the right thing to do, and the page you linked, there's actually a sentence on this, but it is quite vague: it just says that some modellers have 2 more knots and that Rhino takes care of that by itself when exporting or importing data.
The u0, u1, v0, v1 values can be kept as is, they just allow to change the rendered part of the curve: values must be between the lowest and highest knot values with u0<u1 and v0<v1, maybe they can be used to trim the surface.
I think the issue with your exported data might be the order of u and v control points in the P list. I guess your outer loop is on u and your inner loop on v, while LuxRender expects the opposite (don't ask why).

Jeanphi
jeanphi
Developer
 
Posts: 6569
Joined: Mon Jan 14, 2008 7:21 am

Re: Exporter for Rhinoceros

Postby jeanphi » Wed Nov 09, 2011 6:00 pm

Hi,

I can confirm the control point ordering issue, swapping the points as suggested fixes the shape. However regarding the knots, it is probably slightly more complex because the shape are not as regular as they should be. Maybe having a look at OpenNURBS might help.

Jeanphi
jeanphi
Developer
 
Posts: 6569
Joined: Mon Jan 14, 2008 7:21 am

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest