Home › Forums › General Questions › Issues with shadows with version 3.8 for Blender
- This topic has 8 replies, 3 voices, and was last updated 3 years, 6 months ago by
jfgb.
-
AuthorPosts
-
2021-09-27 at 9:01 am #45297
jfgb
ParticipantI am having issues with Sun Lamp generated shadows with Verger3D 3.8 for Blender.
Attached files show of how it looks in Blender and how it does in Verge3D ( with 1024 and 4096 Cube and Cascade shadow maps).
The las two images show Eevee Render Properties and Sun Light settings.2021-09-27 at 9:02 am #45302jfgb
Participant… light settings
Attachments:
2021-11-05 at 4:55 pm #46758jfgb
ParticipantHi,
I finally figured where my problem came from: the quality of the shadows depends on the “Max Distance” parameter of the “Cascaded Shadow Map” of my sun light in Blender: the longer I set this distance, the more jagged shadows look at a close distance. My apologies for blaming it on the v3dFechaHora 3.81 version.
The thing is that I wanted to have shadows visible both at long and close distances, so I found a workaround: on a “when moved active camera -> while moving” event I run a script to measure the distance betweem the camera and the center of the scene and update the “Camera.shadow.maxDistance” accordingly.
I am still not sure that is the best solution or not, but it works for me at no apparent performance cost.
2021-11-05 at 5:02 pm #46760xeon
CustomerInteresting solution. I will have to give that a try sometime.
Did you consider baking the shadows? If yes, what made you decide not to bake shadows?Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-11-05 at 5:18 pm #46761jfgb
ParticipantNo shadow baking: the sun will change position, to show where will it be entering the house at different preset dates and times of day. I wish I had an equivalent of the “Sun Position” add-on for blender…
2021-11-05 at 7:52 pm #46763xeon
CustomerInteresting use case. A sun/shadow study.
You may want to try to setup your Sun Position in Blender. I would then animate the sun with a parented empty attached then I would bake the empty to get all the positional/rotational information for every frame. Then in V3D you could attach your light/sun source to that empty so that it tracks the way you want and keep the live shadows.
If you are making a fully interactive experience where the user enters their GPS coordinates and orientation of the building …and the sun tracks to that location….that will require some interesting programming…but it can be done.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-11-06 at 6:31 am #46766Yuri Kovelenov
Staff2021-11-06 at 11:24 am #46773jfgb
ParticipantYes, that was ,my original intention, that the user may be able to input coordinates, date, UTC time, orientation, etc. to reposition the sun.
I did try to translate the python sun position add-on to javascript, but soon realised the task was too hard and time consuming for my skills. Besides, as it happens so often, someone had already done it:
https://github.com/mourner/suncalc. It is a JS library that provides Azimuth and Altitude from date, time and coordinates, but I can’t get to convert them to v3d scene coordinates…So, while I am not in production (I’m doing this for a couple of friends and learning, for the moment) I’ll make do with the baked coordinates and positions and give it another go later. Thank you for your interest and time.
2021-11-06 at 11:25 am #46774jfgb
ParticipantThank you for the link: I’ve been looking forward to a tutorial like this!
-
AuthorPosts
- You must be logged in to reply to this topic.