Instant model update / pre-calculated model

(Rafalmeckovski) #1

Hi Shapediver,
I talked with Ezequiel on the phone about pre-calculation of the Grasshopper result to get an instant result and he explained that every input result is cached in so the next time you arrive at the same input result it will show the resulting model instantly.
This is nice, but from my experience the pre-cached result is being displayed faster but not instantly - it still blurs out (on google chrome).
I see those examples ( and where all results appear instantly so I know its possible. How do I make it perform as in the above examples?

(Mathieu Huard) #2

It is indeed possible to precompute solutions for faster updates in the ShapeDiver viewer. It is even possible to trigger full precomputation of a model after upload. Note that precomputed models still need to download the updated geometry after each parameter change. If the geometry is light enough, you will get very fast updates.

However, updates will never get quite as smooth as with the Munson and Junddo configurators. Those examples only use ShapeDiver servers for loading geometry in the scene and exporting CAD results and data. The parameter updates, on the other hand, are custom coded using our API. In other words, the transformations don’t happen on Grasshopper instances, they are done directly in the online 3D viewer.

We are exploring several strategies for connecting Grasshopper logic with live transformations in the viewer, starting with simple ones (scaling, translating, rotating). For now, this cannot be piloted directly from a Grasshopper definition and needs heavy API involvement instead.

(Rafalmeckovski) #3

I tested shapediver on several browsers (not safari yet) and it seems ironically that Internet Explorer v11 is the fastest to show new results when they are pre-cached and it does not blur out, in fact if feels almost like Munson and Junddo. Unfortunately, IE being IE it displays the sliders in a weird way and there and no up/down button next to numerical input fields. Did you make this blur effect on every other browser intentionally or is it something that the browsers do and is outside of your control?

It is just my opinion but this blur effect breaks the immersion, why not just have somekind of subtle loading icon in the center of the configurator to communicate that its “thinking” instead of blurring all the scene?

(Mathieu Huard) #4

I forgot to mention that this blurring effect can be disabled. We did notice that when options are pre-cached (and therefore updates are fast), it is unnecessary and even potentially hurts the user experience. However, for models that take several seconds to update, we believe it is a necessary visual feedback.

Blurring not happening on IE11 is probably just IE being IE…

(Rafalmeckovski) #5

Thanks for the feedback!
yeah… IE is the black sheep in the family :smiley:


“We’ve found a solution, but it only works for spherical chicken in a vacuum”
Who uses IE nowadays? :wink:

(Rafalmeckovski) #7

Well… a lot of older people who have money to buy stuff I am trying to create configurator for :smiley:

1 Like
(DDC) #8

This post is really interesting and Mathieu’s answers opens some new questions. Mathieu mentioned that it is possible to trigger full precomputation for faster updates in the ShapeDiver viewer. Can you show us how to do it?
Another interesting thing that Mathieu mentioned that Munson configurator doesn’t use grasshopper for transformations but ShapeDiver API. Can you explain it in more details how it works or give some example? I havent found in ShapeDiver API documentation any topic regarding geometry transformation Did you do via JavaScript and Tree.js ? This is really huge difference between Munson example and grasshopper-based examples regarding updates regarding parameter change.

(Mathieu Huard) #9

There are indeed documented functions to define three.js transformations for the different assets of the scene. Each asset has a property transformations which can contain an array of 4x4 matrices as defined in three.js:

Transformations can be manually defined or using the three.js helpers such as makeRotationX, makeScale, makeTranslation…

As usual, I can offer a specific documentation page about this topic in the near future, as I know the reference can be a little opaque for implementing these advanced functionalities.

However, there is a reason why we don’t put a strong emphasis on this topic: we don’t think that overriding Grasshopper functionalities with javascript transformations is the most optimal use of ShapeDiver. Our goal is to progressively extend our plugin with components that can drive interactive transformations in the online viewer, without having to use the API. We don’t have a deadline for completing this feature, but in the meantime using the API is a good workaround.

I will post here more information about the API transformations when the relevant documentation is complete.

(DDC) #10

Thanks. Your answer initiated me to ask one more question: Are you planning to also add some functionality regarding the transformation (or animation) that can be triggered by user- for example open/close door which is quite often for the car configurators?
Triggered transformations or animations ( as it is case with puzzle for Verge3D ) like this one: can provide very effective presentation. It would be great if some kind of functionality are planned also for ShapeDiver.

(Mathieu Huard) #11

These functionalities are also already implemented, and will also join the documentation asap (as you can see, we have a deficit in documenting our latest features). You can find some raw information about this functionality here:

Some of these functionalities will be officially announced soon on the blog, but as a teaser you can check out this demo which includes a few of them: hovering, selecting and dragging parts, live rotations and translations, and floating anchor elements on top of the viewer.

1 Like
(DDC) #12

Awesome! Looking forward for official announcement, additional documentation and examples.