Iris: WebGL Export Plugin for Rhino

Hello @wim,
The console errors you report are precisely why there is a ‘remote’ and ‘local’ option. Browsers by default do not allow you to load data from ‘other sources.’ If you export with the local option set, Iris will save an .exe file, run it, and you should see the model in your default browser. When you close this tab, the .exe closes. If you want to run it again, you must navigate to the exported folder and double click that rhinoweb.exe. For now, you can only run one model at a time in this manner.

Otherwise, you have two options:

  1. Upload the files to a web server
  2. Change the security settings on your browser, potentially opening yourself up to security issues.

Hello Charles,
Unfortunately there is not much info to go on here. From what I gather, you are running the latest SR for Rhino 5.0 and are saving the files to your local hard drive. When you export, I am assuming you see something like ‘Error Saving file’ or something generically similar? I put some more descriptive debugging information in the last release, so at least we should be getting a bit more specific info than just ‘Error Saving…’

Can you screenshot what you get on the Rhino command line?

If we cannot determine the issue from the screenshot, then I might need to somehow see you run this (teamviewer, hangouts) in order to determine the issue.

Thanks for reporting!

Hi Luis,
Yes, I understand that.
By default, the exporter is set to ‘local’ and I haven’t set it to ‘remote’. Then again, I tried again just now and now it works. IDK. I’ll let you know if I find out exactly what happens.

@wim Perhaps the behavior you are seeing is because the rhinoweb.exe is not running and you have opened ‘index.html’ generated by Iris by double clicking it. If you want to check a model you’ve previously generated, you should run rhinoweb.exe, and it will automatically open the index.html in the webpage and load the model data.

The way Iris is set up at the moment perhaps is not the ideal, but it was the manner which I found to make it as distributable as possible. We have some other ideas floating around that will make this even more simple in the future. In the mean time, your tests and comments are very useful to get us there!

thx
luis

Yes, I wasn’t aware that one had to run the exe in case one wanted to see the model once more. Thing is that nothing showed up when the exporter launched the exe by itself. But again, that is not reproducible at this time :stuck_out_tongue_winking_eye:

I’ve just tried with a bigger model (483 MB json file) but that showed nothing - not that I expected much performance out of that. But should I expect to see this show up?
w

That is a pretty big file! I’ve never tried something that big. Does it start to load in the browser?

Luis:

downloaded the release from f4r today and tried again:

Befehl: _SaveAs
Preparing WebGL files for viewing locally
Fehler beim Schreiben der Datei C:\Users\Charles\Desktop\A123.WebGL
Fehler beim Speichern der Datei C:\Users\Charles\Desktop\A123.WebGL
Befehl: _CommandHistory

Just propose an appointment.

Thanks,
-C-H-A-R-L-E-S-

While I am trying to tackle some issues, I am also completing some planned features for 0.3.0 release. Check out this demo: http://datable.net/WebGL/Iris0.3.0_Demo/

There are some funky things going on with the cameras. They seem to be influencing each other for some reason. I’ll take care of that before releasing. I think what I’ll do is set up a ‘simple’ viewer for people who want to embed models into an existing site, and a more ‘complete’ viewer with layers and views for those who just want to see the file.

Let know your thoughts.

-Luis

3 Likes

Hi Luis,

I’m just testing this out… I’m getting very odd lighting results on the model I’m working on, the stuff looked very dark with the default Rhino lighting. So, I put one directional light like the sun in there as a check. It was still very dark, then I realized why - the sun is coming from underneath… like the horizon is inverted. I don’t know if it has to do with the file or not, as a simple cube does not do this…

Also, had 2 instances of Rhino open, and exported from one, then another model from the other, both for local viewing. After the second export, the tab it opened in my browser had the first model instead of the second (so I had two copies of same model).

Thanks, --Mitch

Nice- loads very quickly now too.

-Pascal

Hi Luis,

Good progress! Looking forward to test it.
Some suggestions:

Position of the layer and views to the left ( this will make them more discover-able)
I think both should be optional

As for the navigation:
For me the gimbal-lock when rotating the view is not intuitive and can annoy people.
If you could create a trackball type rotation it would IMO be better.

A ? icon for help on explaining how to navigate.
Currently if I’m not mistaken:
LMB = rotate around camera target
RMB ( or arrow keys) = pan view
SCROLLWHEEL = Zoom

IMO there should be an option to zoom without scrollwheel
CRTL+RMB maybe?

Also
SHIFT+LMB could also be panning to mimic Rhino behaviour

I need to run now but might get back to this later.

Thanks
-Willem

Hello Mitch,
Thanks for giving it a try!
In the last update I changed the way things are transformed, but forgot to target lights. This means lights are in a y-up matrix, while the rest is in a z-up as in Rhino. This is fixed in the coming release.

Default and general lighting in the webapp leaves a lot to be desired and is something I need to put a bit of time into getting right. I have some limitations accessing the lighting of the view mode through Rhinocommon, but I can certainly mimic it. I’ll have something better than what is there currently.

Finally, the last issue you mention is also a source of confusion. --long story–
In the exporter I give you the option to save for viewing locally or for use on a server. The difference between the two is that exporting to view ‘locally’ also saves and executes a small server. You will notice your folder has a file called Rhinoweb.exe. This gets saved and runs once you export, opening your default web browser and showing the model. The problem with this is that you need to close this tab in your browser before viewing another one.

The reason I do this is because your browser generally tries to protect you. In the exporter I generate an analog to the rhino model in another format. This file is ‘loaded’ into the webpage. It is this loading which is the cause of all of this. Your browser generally does not like things loading like that, so by default, they disable this. By running a small webserver, it is ok to load this file.

Saving for remote saves everything but the Rhinoweb.exe so you can just upload that to a webserver, or run it in your browser if you change your security settings (NOT RECOMMENDED).

We have some ideas on how to ameliorate this issue and will start testing them after the 0.3.0 release.

Again, thanks for testing.

@Willem
Great suggestions overall, especially on the navigation. I’d like to get as close as possible to the Rhino navigation, and I think it should be very possible by creating some custom control code. That is coming up…

Here is a test with trackball like controls…actually, I remember I went the orbit route cause I felt it was more Rhino like. I think I can take out the orbit limitations though.

http://datable.net/WebGL/Iris0.3.0_DemoTrackball

I like that much better, it’s more intuitive for evaluating models IMO
That being said, it’s more needed for objects like jewelery or toys and more for architectural models and the likes. So again, maybe something to consider as an option for the exporter.

Makes me wonder:
I assume you are constructing a base setup where the 3D scene is implemented into.
( I see a few .js files I assume are buildingblocks for the final resulting page)
If this is a modular setup, could there be something like templates: a base set of js files that we can swap out. So I could make my own setup and only change the 3d model…

Thanks for the great work
-Willem

Being that this will be more of a viewer, maybe that is argument enough to explore hybrid navigation modes, or at least thinking about what might work better on the web while still maintaining ‘Rhino Hands’ muscle memory…
I could, for example, keep the orbit controls, but if one selects an object, it could switch to something more trackball based on the object position…

I have the same problème.
Create a empty folder with the same error messages.
I have the last version too

Are you ‘Saving As’ or ‘Exporting’? Please access the exporter through the ‘Export’ command.

yes i use “export” button

I’ve released Iris 0.3.0 for Rhino 5 x64 and Rhino WIP.
Some of the changes:
-removed sky from the WebApp. Viewer has clean white background for now.
-removed PointCloud sprite from the WebApp. Points and PointClouds are shown by their color at a screen fixed size.
-Added option for exporting with or without UI. Exporting with UI gives you a UI with access to model layers and views. Named Views in Rhino are saved with the model.
-Added some ambient lighting to the WebApp to globally illuminate all of the objects a bit. Hopefully this ameliorates some issues with dark models.

To be changed or looked at in the near future:
-Navigation: how to properly handle navigation and the issue with users with no middle mouse scroll
-Navigation Modes: orbit camera, trackball type controls, first person, etc.

I’d like for those of you with previous export issues to try it our and see if they persist. Of course, please let me know if any issues which pop up.

Best,
Luis