Rhino.Inside.UE - Getting Started

Thanks for the “hello world” equivalent in Unreal using USharp to access Rhino.Inside C# libraries from Unreal.

I’d like to build on this and extend the functionality by creating some functions either as a UFunctionLibrary or an AActor to call Rhino.Inside functionality at runtime rather than at initialisation which appears to be when the level first opens in the editor - as your code is based on a GameModel.

Transplanting the code into an AActor or UFunctionLibrary, I’m getting errors in the editor with the try/catch statement calling Rhino.Inside in the object initialisation function when I transplant this into another class. Any suggestions on how to best incorporate this would be amazing.

There are some limitations in the sample due to my understanding of the UE C++ / Blueprint API and some limitations due to the use of the (excellent) USharp library.
Today I did get further and created a Blueprintable AActor class, which I could use to hook into other interesting functionality.

I’ll try to clean up the code and commit (maybe not until Friday due to travel) so you can see how I got it to work. Still, there is a bunch to learn to come up with the best strategy for doing these things cleanly.

3 Likes

p.s. @dagillespie, any knowledge you have and can share about UE, the editor, the api, etc. would be very helpful and welcome! If you have any specific use cases, we can try to get a sample going…

Awesome implementation in an AActor @fraguada. Very happy to discuss in more detail as we definitely have some specific use cases for this in mind (a series of blueprint nodes would be a great one for instance). I’ll be at an Epic event on Thursday that I believe you’re also attending so could be good to discuss then.

PS - glad USharp is working well for this.

1 Like

Great, see you there!

Hey guys, great work.

I tried to run this, I managed to get usharp installed and i’m running the sample project through visual studio but I got stuck.

I don’t know which executable I should be targeting. if I don’t target the UE4Editor.exe I get this error:

What are you guys doing here? Rhino Inside UE4? Give me that! :wink:
Although I’m not a programmist I have some experience with UE4 and “wasted” some time and nerves on experiments with Rhino & Revit together in UE4 workflow. I would be more than happy if I can test something and share my thoughts!
Unfortunately, there is no UE4 section on GitHub https://github.com/mcneel/rhino.inside
How can I follow your steps?

1 Like

It’s there, just not in the master branch yet.

2 Likes

2 posts were merged into an existing topic: Rhino.Inside.Wpf/WinForms

3 posts were split to a new topic: Rhino.Inside.Wpf

Have you selected ‘Start external program’? Also, double check where Unreal Engine is installed on your machine.
Also, in the command line arguments text box, you should put the path to the .uproject file in quotes so the Unreal Engine Editor opens that file. If you don’t do this, debugging will stop when you reopen the file from the editor.

I had similar dificulties as @Nick_Cassab but thanks to your tips I succesfully opened the project.
Another thing is that I don’t know what to expect at the current stage. I was expecting that it will open UE4 and Rhino at the same time and there will be some geometry both in the UE4 and Rhino (as on your screenshot). Is it only for coders at the current stage of development?
Please consider sharing some short videos showing your work. I’m very curious about this project. Best luck!

@Czaja the sample posted opens Rhino in the background, creates a sphere, and ‘prints’ some text about the geometry to the Unreal Engine Editor console ( Window > Developer Tools > Output Log).

The development we do in the next weeks related to getting Rhino and Grasshopper working inside Unreal Engine will be pretty rough as we’re still learning about Unreal Engine (Blueprints are awesome!). This being said, @kike and I will be giving a ‘masterclass’ on Rhino.Inside at the AEC Tech Symposium NYC on Thursday, October 17th. In addition to giving an overview of the necessary elements needed to get Rhino running inside a host application, we’ll be using Unreal Engine as a case study. When the class is over, we will push the samples and other class material to the public repo.

So far, I’ve been able to open Rhino files and get their geometry into Unreal Engine as you saw above. Today I’ve got Grasshopper running in Unreal Engine:


To be able to do that, I had to do some a tiny edit to USharp. This means we have to find an easy way to make sure anyone who is trying this with Unreal also gets that tiny change I needed to make. Anyways, early days, but definitely fun!
2 Likes