Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
How to make a light source that lets my model cast a shadow
Gunter
Member Posts: 8 ✭✭
I reconstructed the digital sundial from www.mojoptix.com in Onshape but since it will take upwards of 20 hours to 3D-print I need to test it first. My model is here:
Testing means shining a far-away light on it and checking the light/shadow pattern
of dot matrix numbers resulting below the gnomon.
I tried suspending a large rectangle above the gnomon and extruding it, but of course the extrusion flows around obstructions - o good. Extruding up to next and up to part failed.
I tried the ray tracer featurescript but it has no check box for simply blocking, i.e. absorbing light. Possibly I could manage to add absorption to the code but the problem is I'd need ~100,000 rays to image the whole gnomon and 30,000 even to check one digit at a time with rays in a 2D field of 60mm x 20mm spaced about 0.25mm apart.
The renderer/shader built into Onshape almost does what I need, it just doesn't cast light around objects and make shadows. Is there any way to bend that to my needs?
Thanks
Tagged:
0
Best Answer
-
NeilCooke Moderator, Onshape Employees Posts: 5,686For my script you need to draw a line that is the light direction and select the vertex at the end for the point light. I tried it on your model and it does seem to work.For your manual method, create a plane or mate connector at the end of each line, select it then press N for normal.Senior Director, Technical Services, EMEAI6
Answers
https://cad.onshape.com/documents/72598ea70a78b9bf66126b3a
Wouldn't you be able to use the opSplitBySelfShadow function and then offset the invisibleFaces that are returned?
https://cad.onshape.com/FsDoc/library.html#opSplitBySelfShadow-Context-Id-map
IR for AS/NZS 1100
Another solution would be the rendering software KeyShot Pro.
- Set the environment to "Sun and Sky"
- Chose a location, date and time
- Or set the Sun to a custom inclination
- Set the Lighting to "Product"
You can get a trial version of KeyShot Pro here:https://www.keyshot.com/resources/downloads/
Here is a quick example how it would look like:
This is a house with the back porch, which has a post in the middle. The sun is facing the porch. I am trying to generate the shadow of this post. Any help would be appreciated. (BTW, when I recreated Neil's demonstration, it only worked if my light vector originated at the origin. I couldn't get it to work if I used any other point to make this vector. In my current model of the house, I am using the origin to make the light vector.)
https://www.onshape.com/en/resource-center/videos/render-studio-photo-realistic-rendering-in-the-onshape-platform