Bug of DumpVisSet? Or incomplete known issues

hi,@chris

I am attempting to use the DumpVisSet component to export the SVG image. Its application in the flat or three-dimensional images provided by Ladybug has been very successful. However, when I used the Visualization Set of the Honeybee Model to export SVG images of different views, the layer order did not match the actual preview of the model.

This is the Visualization Set I generated.

This is the output SVG image.

It should also be noted that I have been aware of this issue for several months, but no one has brought it up yet. :grinning:

What’s your opinion on this?

Hi @ZhengrongTao ,

I am aware of this issue and I was wondering when it might come up. At first, I was not sure whether much of the user base knew of ways to make use of SVGs that were different from what they can already do with the LB Capture View component. So this might explain why the issue has not been brought up yet. But I am glad to see that you are using and experimenting with it. Out of curiosity, are you using the SVGs in an end-user application right now? Like a web app of some kind?

In any event, yes, the SVG-export option for Visualization Sets currently does not know how to sort the different polygons based on how close they are to the “camera” taking the image. So it works well for most ladybug graphics and honeybee-radiance studies made of a single mesh and/or some line geometry. But, once you have a full 3D shape with different solid polygons closer to or further from the camera, it’s not going to look as pretty. To put it another way, all of the correct polygons are there in the SVG but you need to manually sort them to get the image to look the way that you want.

Granted, this “sorting of shapes to display correctly on a 2D screen” is a common problem in computer graphics and I am sure that there are a few different ways to solve it. But it would still take me a good chunk of time to implement and it didn’t seem worth it right now when most use-cases for images of geometry like this are already served pretty well via the LB Capture View component as I mentioned. If I am wrong about this, let me know and I’ll see if I can push the sorting of SVG shapes higher on my agenda.