I will look into this further, but it may be that I have to use WebGL for the 2D chart as well. After a second or so, the updating should become significantly faster and smoother (it takes the JavaScript compiler time to re-adjust its run-time optimisations). You can see this for yourself by choosing a small angle for the sky subdivision (say 2 degrees), closing the SHADING MASK overlay by clicking on its title bar (it will ignore update requests when closed), and then dragging the 3D Sun-path around the site. It turns out that the real bottleneck in terms of speed is dynamically updating the SVG sky segments in the 2D Sun-path chart. Perhaps there is some synergy there to be exploited. Why this is interesting is because many fluid dynamics calculation engines require a similar approach to complex geometry. This is particularly interesting as it suggests that the voxelisation of complex models into tiny rectilinear cells might just be the way forward, allowing for real-time dynamic shading calculations on geometry of any complexity. Using highly optimised axially-aligned bounding box intersections works astoundingly well, even with several hundred boxes and on a reasonably good phone or tablet. However, by simplifying the obstructions to just rectilinear boxes, it can run in very close to real-time - try it out for yourself. Whilst there is some scope for optimising both the model and the intersection testing techniques used, and maybe WebGL2 or WebGPU could assist in the future, at this stage it seems unlikely that such an approach will be fast enough for highly dynamic feedback on anything other than the simplest of sites. I started out using pretty straightforward ray-tracing for occlusion testing, which is pretty flexible and allows it to work with any type of triangulated geometry. However, as soon as the calculations return back to speed, the dynamic update will resume automatically. Sometimes the browser or system might be busy with something else when you drag, causing it to temporarily stop dynamic updates even on a relatively simple model. If the simpler method takes longer than 200ms, it will stop trying to dynamically update until you finish dragging and release the pointer. For example, if the detailed shading takes longer than 200ms to complete, it will try to use a simpler method to maintain the dynamic feedback. With large and complex models, the app automatically detects when a calculation is taking too long to be interactive and will try to degrade appropriately. To load your own 3D model, use either the button that looks like a building or drag/drop the model file anywhere in the app window. The app only starts out with simple rectilinear blocks as a way of illustrating the process and providing an interactive site that you can immediately start playing around with. Why a Simple Block ModelĪctually you can import any type of 3D model as a. With this app, I can now experiment with a range of different sky conditions, based on the 16 CIE General Standard Sky types, and begin to quantify shading based on the percentage of actual sky luminance that is occluded.įrom here, the next steps are to add dynamic time-varying skies based on real weather data and the ability to aggregate luminance and/or radiance over time to look at quantifying seasonal and annual shading effects. However, this is not really that informative as the luminous distribution over the sky dome is typically quite uneven and can vary significantly over even short time periods. The degree of shading at any point is usually quantified based on the percentage of the sky that is occluded. The other key aim of this app was to see if I could implement dynamic sky luminance mapping at the same time. This is very useful information as it affects daylighting, solar incidence and photovoltaic collection, as well as shading and overshadowing. A shading mask is simply a map of which parts of the sky dome are visible from a particular point and which are obstructed by opaque objects in and around a site. The aim of this app was to investigate the possibility of generating real-time interactive shading masks using WebGL and JavaScript.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |