Is there any possibility that the ShapeDiver tool to export in glTF comes from GH and not from Rhinoceros plugin?
It would be great to be able to do this; I want to export scenes quickly from Grasshopper without baking all the geometries and prepare the scene in Rhinoceros. For example, I have multiple iterations from a GH definition, and I want to automate the creation of glTF for the different results.
I tried the plugin and found it quite interesting. What I am looking for specifically is the glTF format since as I know is one of the best formats for web visualization with Three.JS.
Three.JS seems to be moving toward glTF and leaving in the past .json format.
I tried Triceratops, for exporting geometry and materials directly from grasshopper to a JSON file to be viewed with Three.JS, It works, but .json files are not as optimazed as .gltf files.
As for my plugin, you may use “Export As” to export to any format Rhino supports, which includes glb, if you have ShapeDiver’s plugin installed. Set the output file’s extension as glb, and the plugin will take care of it.
I will try how the export works. It looks pretty good!, I didn’t know that the plugin allowed to export in other rhino formats. I thought you could only choose the ones that came out in the output icons. Thanks!
I think @snabela in this post talks about glb and glTF export.
Don’t quite get what you mean. (sorry i’m not familiar with glTF format)
The structure of the target file depends entirely on the exporter plugin. So you should be able to do whatever you can do as if you are manually exporting. Other than that, no.
If you are referring to exporting to multiple files, yes it’s supported by Pancake.
Sorry, if it not clear enough.
So, what I mean is that I am wondering if Pancake can keep the data structure from Gh when exporting to glTF?
I am looking the structure similar to json, for example:
{
“hello”: “hello”,
“colors”: {
“red”: “red”,
“blue”: “blue”,
“green”: “green”
}
}
It depends on how ShapeDiver’s plugin will export. But sadly it may not work as what you said.
Pancake itself requires all input as lists (or one single item), so it is flattened as tree structure is not preserved. The result will be just like you bake geometry and conduct a glTF export from Rhino’s menu.
I have been testing the pancake export as plugin with .glb to save as gltf. The file exports, but when inputting the options as_Materials=Yes _MaterialSource=DisplayColor When I bring the exported gltf file into Three.js editor or even my own editor it shows as only black. When I export the geometry from rhino by selecting it and going through export selection it shows in three.js editor with the display colors.