i found this tutorial on colouring Grasshopper models: Adding Colours and Materials to Your Grasshopper Models (speckle.systems)
Is that also possible for lines? I tried it and the colours in the web viewer didn’t change - still white. Did I do something wrong?
Hey @Laurin ,
If you pass that generated RenderMaterial into a property called
displayStyle the diffuse color will be applied to the linework.
That should allow you to just simply adapt your GH definition to get curves in glorious technicolour.
As a bonus option, potentially for interop reasons, it is possible to create a bonafide DisplayStyle for linework. Still, it is more involved in using the C# script component and the Speckle Objects library.
If you add the
SpeckleCore2.dll from Rhino plugins,
netstandard.dll assembly, and the Speckle
Objects assembly (all these are installed as a consequence of the plugin installation - see our docs)
You can create any of the Speckle Objects this way over and above those backed into the Speckle BIM ribbon.
In this example, I am still passing the output to the
displayStyle property, which is probably an unnecessary complication but demonstrates expanding Speckle code further in your Grasshopper workflows.
thanks for your reply!
Am I doing something wrong here, bc it’s still not working…
Still get those default colours for my lines/curves in the web viewer.
Are you having data-lacing issues, perhaps? Could you isolate just the curves/lines and apply them?