leftwei.blogg.se

Sketchup app snap to grid
Sketchup app snap to grid







Why a Simple Block ModelĪctually you can import any type of 3D model as a. 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. 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. 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. 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.

Sketchup app snap to grid update#

If the simpler method takes longer than 200ms, it will stop trying to dynamically update until you finish dragging and release the pointer. 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. However, as soon as the calculations return back to speed, the dynamic update will resume automatically. 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. 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. However, by simplifying the obstructions to just rectilinear boxes, it can run in very close to real-time - try it out for yourself. Using highly optimised axially-aligned bounding box intersections works astoundingly well, even with several hundred boxes and on a reasonably good phone or tablet. 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. Why this is interesting is because many fluid dynamics calculation engines require a similar approach to complex geometry. Perhaps there is some synergy there to be exploited. It turns out that the real bottleneck in terms of speed is dynamically updating the SVG sky segments in the 2D Sun-path chart. 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.

sketchup app snap to grid

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).

sketchup app snap to grid

I will look into this further, but it may be that I have to use WebGL for the 2D chart as well.







Sketchup app snap to grid