Using Rhino3dm in Blender


(Jjcg 23) #61

maybe i missed something… but where do i get that script?
What exactly do you mean by including the rendermesh? (extract rendermesh?)


(Jjcg 23) #62

there used to be a blender project trying to implement an nurbs support via 3dm format-
but it never was finished :frowning:

NUrbs in Blender are very basic, I think they never got the display of trimmed surfaces to work…
But you come from the nurbs side- so I imagine you guys can do it! would be awsome.


(Luisseyfer) #63

There were several attempts further developing NURBS in Blender. So far all of them died.
I don’t think Blender should or can replace NURBS-modellers like Rhino, but some things would be useful.
I guess if we get an importer it is a huge step forward and could reanimate NURBS.
At least that’s my hope.


(Nathan 'jesterKing' Letwory) #64

The script you get from https://github.com/jesterKing/import_3dm

Including the render meshes means: switch a viewport to at least shaded or rendered mode - that will generate the mesh data. Then do a Save As… and ensure you don’t have Geometry Only checked. The 3dm file now contains the meshed objects.

Yah, I followed the work.

We’ll see. In the very least the meshed results should be easy to get into Blender, meshed as how Rhino does it. Any further development of NURBS tools I don’t know - but maybe revisiting the GSoC project to see where things ended up might be a thing.


#65

This looks very promising. I work with both Rhino and Blender on daily basis and usually move back and forth via OBJ quite often. Would be testing this very soon and report how it goes.


(Nathan 'jesterKing' Letwory) #66

Note that there isn’t pre-2.80 support (yet?). Currently focusing on 2.80, since the rhino3dm.py module is changing very fast at the moment as well.


(Nathan 'jesterKing' Letwory) #67

@romio82, note the change requests to your PR :slight_smile:


#68

Makes sense, as 2.8 is around the corner


#69

Sorry @nathanletwory for letting you wait so long… To my dislike I’m quite busy at the moment which lets me spend much less time on discourse and github than I would like to. Just answered on your requests - I hope I did it right?


#70

Wow! Impressive!
I didn’t expect to see re-import in so soon!
I have to check it out immediately and then try to understand how you did it :slight_smile:


(Nathan 'jesterKing' Letwory) #71

I didn’t do much when you answered my requests. That all is part of the GitHub magic - suggestions is a beta feature, and it looks very promising.

I have merged your PR now into my repository. Thanks, and welcome as the first contributor!


(Nathan 'jesterKing' Letwory) #72

I have started logging issues to the repository for interested devs. These will be tasks that can be solved by anyone (I don’t feel the need of being the sole hero here :wink: ).

If you come up with some new features or some useful work (cleaning up code, documenting it, structuring it even better) then don’t forget to also first create an issue for it, so work stays logged there as well.


(Jjcg 23) #73

HI nathan, thanks for the link,
so where do I put the “rhino3dm-master” so blender does find it?


#74

Hi @nathanletwory ,
This is looking awesome!

Taking on some of the mainpoints from this thread (https://discourse.mcneel.com/t/rhino-to-blender-cycles),
I think one of the most useful data types to transfer between the two applications would be a camera object.

I’m sure anyone else in animation fields would agree this can be the biggest roadblock in utilising different advantages each program has (Camera mapping in Blender > then re-importing to Rhino, Animating objects, aligining render passes etc… etc…)

Ideally rhino would solve some of these issues that make us need to use blender in the first place (https://discourse.mcneel.com/t/is-this-kind-of-planar-mapping-possible) But understanding this can take a while, export/import cameras between the two could be a great solution if possible?


(Nathan 'jesterKing' Letwory) #75

@jcmv_design,

Sure, when the views table is exposed in rhino3dm.py I can import those as different cameras in Blender.

Camera projection is still on the list of @DavidEranen - let this mention be a good reminder for him :wink:

I’ll be adding support for Rhino data to the importer as rhino3dm.py evolves.


(Wiista) #76

not work fo me. What i do wrong?


(Nathan 'jesterKing' Letwory) #77

Hey,

I just pushed the latest changes to the import_3dm repository, so at least re-install the import_3dm.py file as add-on.

Further, make sure you have the latest rhino3dm.py package installed using pip3.7


#78

Hi Nathan.

Thank you for this Blender add-on.

Unfortunately I can’t get this to work. I installed the “rhino3dm” module using the “pip install rhino3dm”.

Now if I install the “import_3dm.py” in Blender 2.80(latest Windows64 version from 30.11.2018) I get the following error:

Traceback (most recent call last):
File “C:\Programe\Blender_2.80\2.80\scripts\modules\addon_utils.py”, line 351, in enable
mod = import(module_name)
File “C:\Users\Alex\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\import_3dm.py”, line 18, in
import rhino3dm as r3d
ModuleNotFoundError: No module named ‘rhino3dm’

Please help-me to fix this error as I can’t find the rhino3dm.py anywhere on my computer. I only have this python file:

C:\Users\-\AppData\Local\Programs\Python\Python37\Lib\site-packages\rhino3dm\_rhino3dm.cp37-win_amd64.pyd

I do need to compile this file and put in some specific directory?

Best regards.


(Nathan 'jesterKing' Letwory) #79

You shouldn’t have to compile anything.

The instructions mentioned to use pip3.7 install --user rhino3dm after installing Python 3.7.1. Using pip3.7 ensures you use the one for your Python 3.7 installation, and --user ensures it is in a location that most likely Blender 2.80 will be able to automatically find.

After importing rhino3dm into Blender it gives me:

<module 'rhino3dm' from 'C:\\Users\\Nathan\\AppData\\Roaming\\Python\\Python37\\site-packages\\rhino3dm\\__init__.py'>

#80

I actually needed to copy the whole rhino3dm folder to my blender\addons folder for it to work after getting it via pip. Now importing…

Nice job Nathan.
FYI:
Note, instances are only coming in as the actual ‘instance’ and not all the references with their transforms applied.
But, got all my rhino layers as Blender collections and all rest of geometry assigned…