Custom Material Database

Hi All,

I was just wandering what would be the best way setting up a central custom material database, and then pushing that information into multiple grasshopper definitions?

Would it be just as simple as pushing image URL from the database (for example MySQL) to a grasshopper component?

And if so, would that component be ShapeDiver Text Input?

Thank you for your help in advance!

Regards,

Jonas Blazinskas

It all depends on your workflow. There are two ways to define materials in ShapeDiver:

  1. In Grasshopper using the ShapeDiverMaterial and ShapeDiverSimpleMaterial components. In that case, they can be connected with parameters of the model which can be dispatched through the API (either as a single JSON object or pairs of parameters IDs / material property values).
  2. Directly using the API, where all the material assets can be accessed and updated.

The first strategy is easier to setup in the short-term but has the drawback that material updates go through our servers since they are part of the Grasshopper definition. If you are using the API anyways, I would recommend the second strategy which allows to do faster updates locally in the browser (except for retrieving the info from the material database of course).

Hi Mathieu,

Just to wrap our head around we decided to start with an easy option 1)…
I have been reading about JSON files here https://www.shapediver.com/blog/json-objects-explained/
It mentions that we could just simply use sdtextinput. And if I do that inside of grasshopper. Everything seems to work fine:

But once uploaded the texture is not applied anymore:

Any idea what am I doing wrong? Thank you for your help in advance!

Regards,

Jonas Blazinskas

The size of texture files supported by the viewer is currently limited to 4mb (read more about limitations here). If you reduce the file a bit, it should solve the issue.

Awesome, thank you!