I’ve created a custom Element using Grasshopper - a railing. Yet I can’t figure how to assign materials to the different parts. The help page does not tell, either.
If this is possible - how?
Parametrically, of course. (Workaround would be to explode the Element and assign by hand.)
Unfortunately, in Grasshopper for Rhino 6 there is not yet possible to assign any display attributes (like color, material, linetype, etc) to Grasshopper geometry or VisualARQ styles or products.
Now I have read your question again, anv maybe I didn’t understand it correctly.
If you’re trying to create a new railing style using a Grasshopper definition, then you can assign different materials to the different parts, as long as you have separate outputs. When you create the style, you’ll be able to create different style components for each part (posts, handrail, etc). Then, in the style editor, after closing the style creation wizard, select each component in the tree and change its attributes.
(our posts just crossed)
For normal GH scripts (not inside a vaElement), there is a way to assign Materials, using plugin ‘Human’. I tested your light GH file with it, works of course.
However, once the GH script is put inside a vaElement, the geometry routed into a ‘Custom Preview’ component (comes even o.o.t.b., Tab Display > Preview) won’t produce any geometry. Makes sense, since you need a geometry component like Brep to terminate the script.
A thought: do you see a chance to derive geometry (in vaElement) also from a Custom Preview component? Wouldn’t that solve the problem?
Edit: just to be clear, what I’d wish for is that the vaElement supports scene Material choices for the created parts.
Why don’t you use the default way in VisualARQ to assign materials to style components?
This way, you can change the material for each part without having to modify the definition each time. I don’t see the advantage of assigning a material inside the definition. Moreover, if you try to copy the same style into a different document, materials won’t be copied because neither Rhino or VisualARQ know nothing about them.
… because I didn’t figure that the moment you finish the Element definition, a list of it’s subcomponents appears…
Very sorry! =}
That’s implemented quite nicely actually. Thanks for the explanation!!
Hold on, it’s still not working. See screenshot, please.
(The railing’s filling is a polymesh, btw, because I could not get UV mapping to work on surfaces in GH.)
Hold on once more, sorry!
It’s working, but the texture is shown on only one side on the vaElement. Strange.
On the normal geometry, this is not the case.
This is a display artifact. In ‘Rendered’ viewport mode, it is visible on both sides.
Edit: this disappears, when Options > View > Display Modes > Shaded > Shading Settings > Backface Settings is set to ‘Use front face settings’.
Strange anyways. But it’s ok, it works.
I think “Use front face settings” is the default setting. Anyway, what option did you had before? I want to check why it works with Rhino objects and not with VisualARQ objects.
It was set to ‘Rendering Material’.