In Grasshopper, I am using a custom preview component to visualise some breps. However, I am noticing that the geometry receives shadows but doesn’t cast shadows. This issue is evident in the image below.
The rhino geometry is both receiving and casting shadows, but the GH geometry only receives shadows. Is this a limitation of Grasshopper or is there a Rhino sun or material setting I am missing?
Thanks but the mesh shadow only works on a plane right? I need it to work on a topography and other buildings.
The other work around of will be too slow for large city models. Baking geometry is also not ideal.
Is there really no OOTB grasshopper solution?
No you should definitely be able to cast shadows from Grasshopper geometry as well (example here). It really helps with troubleshooting if you can share a minimal (non-)working example file.
Me too. I see shadows cast from a GH object onto a Rhino object.
I’m after a GH object casting a shadow into a GH object (not a Rhino object)
ah, I see. That sounds a challenge.
Here you go. A simplified version with just a plane as a ground surface.
Actually re-testing it, it is more likely a Rhino display setting issue. Shadows appear in rendered mode.
But in the ‘Shaded’ display setting, even with shadows enabled, they don’t show. Is this right? Am I missing something?
demo.gh (24.5 KB)
This example by @AndersDeleuran will helps you to achieve shadow effect what you’re looking for.
I believe that’s correct. Grasshopper geometry (excluding curves) that is drawn using a Custom Display with the Render right-click option on will be included in the Rendered (and Arctic) display mode pipelines:
But I agree, it’s all rather confusing and inconsistent.
Check this you can control Sun from grasshopper and use hatch to show shadows on flat ground.
sun_shadow.gh (93.7 KB)
Create Hatch.ghpy (34.5 KB)
Thanks. This looks good for a plane but as per my original post, it needs to be on a topography (cured surface).
The issue with a Rendered display mode, is that is doesn’t render the edges. I’ve found a bit of a hack using Human’s preview line weights component. But it would be great if GH could do this OOTB.
Indeed, as per the link in my last post you, can cluster a Custom Display to render curves (a hacky workaround!). You could also tweak you Rendered display mode to look more like Shaded by turning off the Skylight and making your shadows hard, like so: