I guess a helper plug-in that adds an object user data text string with a hash or something like that could work. I believe we should be able to load these kinds of strings from ob.Attributes.UserDictionary. I don’t know if there’ll be support enough for adding something like that natively.
Can UserData be read with python from the file?
I am guessing the plugin should subscribe to the AddRhinoObject event, pass to a list and tag them in the Idle event with the new custom user data if they do not already have it and then use the OnDuplicate function of the custom user data class to increment the version in some way?
Of course handle read and write to .3dm as well.
Would it then also be possible to move objects in Blender with the addon registering that the object has moved upon reimport? Or should all edits be made in Rhino? I can imagine that changing the position of an object (even ever so slightly) may eventually be necessary for a better render. Excuse me if it does this already, I have yet to give it a try
UserDictionary could be, but isn’t apparently exposed yet. Custom UserData is usually dependent on the plug-in that wrote it.
okay will use UserDictionary and we can wait for it to be exposed on the python side.
I installed the Import addon today and unlike earlier versions it works without additional libraries, right off.
Installed on Blender 2.90 for Windows (10 X64).
I installed addon version 0.0.8, downloaded from Github, which works well.
Edit: there is no preinstalled version, the earlier version in my case, must have originated from an earlier attempt to install the Rhino Importer addon then within Blender 2.8x, that carried through to newer Blender installations.
The addon version packaged with 2.90 is 0.0.6, which did not work, did not run at all, only a screen of errors.
I observe that the geometry from Rhino is not how one would model in Blender, faces of one mesh are usually not linked, only coplanar ones are, lots of triangles, etc.
I have no experience with Rhino, but I have heard that it creates meshes “on demand” from the geometry, when texturing for example. Is there a step in Rhino that could make the meshes more compatible with the Blender modeling workflow (quads and quad loops) or even if the meshes would have linked surfaces, would help.
That is because for Windows and MacOS I bundle the rhino3dm
package.
What does that mean? import_3dm
is not bundled with Blender at all. Did you not download Blender from blender.org?
The geometry imported for (supported) objects are the rendermeshes for such object created in Rhino. This already happens by just switching to say the Rendered mode - any mode that needs render meshes.
You can use QuadRemesh in v7 to get cleaner meshes. Extract the render meshes for your objects, hide the original objects, then use QuadRemesh.
I am working on a version of import where we can use Rhino to do remeshing during the import.
What do you mean with linked surfaces? FWIW the Rhino mesh format has unwelded (probably what you call unlinked) edges where mesh edges are sharp - for instance with a _Box
the resulting mesh edges are unwelded.
I corrected the part about a preinstalled version in Blender 2.90.
Thanks for your tips and most of all for your work with the importer!
I’ll have to ask my colleague (that works in Rhino, to try the QuadRemesh. I’m not sure what that would mean, since I have no Rhino experience, I was just sent a Rhino file.
Even before optimizing with QuadRemesh what if while working in Rhino one does not switch to render mode? There will be nothing to import to Blender in that case?
Is there a course of actions (apart from QuadRemesh, which is clear) while in Rhino, to prepare a project to be handled by the Blender importer?
“Linked” is standard Blender terminology. Consider a simple cube made in Blender, when I pull (transform) a vertex or a surface, the shape is distorted, because the neighboring geometry is linked. You can pull parts separately by “ripping” the vertices, edges or faces. The “L” hot-key in Blender edit mode, will select all linked geometry in the cube example, 6 faces. If the cube is from Rhino import it will select the one face. The hot-key “M” will merge overlapping geometry (using a proximity threshold).
From your description of the term “welded” in Rhino, it is the same thing as “linked” in Blender.
Unlinked (unwelded) geometry is not ideal for continuing work in Blender. A few quick examples:
- No loop manipulations - modeling
- Poor behavior with transformation modifiers, like bevel, subdivide etc - modeling
- Does not behave like a solid, so boolean operations will be wrong - modeling
- Cannot be properly UV unwrapped - texturing
- I assume, but need to verify, no mass properties - physics
So imho, it would be best if there is guide of Rhino actions to weld sharp edges, before the import to Blender or even better an option for welding in the addon, if that is possible.
Correct, if you don’t switch to Shaded, Rendered or any mode that needs render meshes before saving you won’t be able to import breps, extrusions etc. The version of importer I am working on now will be able to, but it requires a valid Rhino (v7) install on the same machine.
Yup, just wanted to make sure we’re talking the same here.
The Rhino mesher and Rhino mesh format aren’t really suited for what we want in Blender. I have contemplated welding (essentially Remove Doubles) geometry on import, but have opted to not do that in the importer add-on. It should be easy to write a few lines of code to do that in a script yourself, though.
Well, consider that those who only want to import a Rhino model and don’t have Rhino installed won’t get the benefit. Maybe an “Importer” should be consistent in that approach, whereas the way you describe is a little exporting and a little importing.
Maybe a user checkbox in Import Settings?
The current importer won’t go away. It will be there for users who don’t have Rhino.
Maybe
Is 0.0.8 not working in 2.93? I could have sworn I had it working before, but needed to wipe my computer because it had some issues that I couldn’t resolve, mostly surrounding the graphics cards, and now it’s nice and zippy. But I get this when loading:
I noticed several people have this same issue over at GitHub. So I guess if I need to import a file, for now, install 2.83 as well, then save that file and import that into 2.93?
I’ll check over the weekend. Thanks for pinging.
I’m having the same problem. Seems like I need to install Rhino3dm into python for it, but I can’t make it work… (Definetly worked in 2.8x maybe even 2.90… (On MacOS)
Or could it be that pip is not working to install rhino3dm properly?
When I run it directly, I get this error:
PH-MBPi9:~ peter$ pip install python3dm --user
Downloading/unpacking python3dm
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement python3dm
Cleaning up…
No distributions at all found for python3dm
Storing debug log for failure in /Users/peter/.pip/pip.log
The package is called rhino3dm
.
Doh!
However, ran ’ pip install rhino3dm --user
’ and got basically the same error message.
Then, reinstalled 2.92 and the Rhino3dm addon works perfectly…
(I noticed that Radeon’s ProRender addon also doesn’t work in 2.93. They say this: Does not support the unreleased Blender 2.93 yet due to a python version incompatibility)
Anyway, I hope this is useful to you. It’s a great addon and I really appreciate it and all of your hard work on it!
I am still on 2.91, oops. Let me fix that (:
I thought 3.0 is imminent, isn’t it?
since years I keep telling myself to try to import my rhino models into blender and try rendering from there. whenever I have the time and try I’m immedieately scared away by the navigation. I don’t mean their UI - that seems really good (I mean REALLY good, can’t rhino just adapt this like it did with cycles?), just the strange mouse button and modifier key assignement. when going to settings I can’t find a simple way to fix it and then I leave and forget about this quest again for the next few months.
Imminent is a relative term, 3.0 has been postponed to late October.
Besides, 2.93 is a LTS release.
The problem is that between 2.92 and 2.93 the embedded Python interpreter got updated from 3.7 to 3.9. This breaks modules with CPython parts in, like rhino3dm
. Additionally, with the new M1 hardware it is important to realize add-ons with binary components like rhino3dm
won’t work (yet) on the Mac Apple version of Blender. Until there are M1 binaries for rhino3dm
the addon import_3dm
will work only in the Mac Intel version of Blender.
I’ve added a version of the import_3dm
add-on ZIP to the release page so it can be loaded in Blender (for Mac Intel). Note the new instructions I’ve added to the release page as well - the rhino3dm
binaries aren’t signed yet, so you’ll need to manually remove the quarantine flag.
There’s an industry compatible keymap as an option that gives blender similar keymaps to 3ds Max and Maya. But in general, I find the blender keymap to be pretty intuitive and quick.