1 00:00:00,539 --> 00:00:03,539 foreign 2 00:00:10,099 --> 00:00:15,660 experienced soft engineer he's a member 3 00:00:12,960 --> 00:00:18,480 of our local python Meetup in Adelaide 4 00:00:15,660 --> 00:00:19,920 and he's also going to talk about rusts 5 00:00:18,480 --> 00:00:22,980 in his 6 00:00:19,920 --> 00:00:25,080 um Titan conference or a rust for python 7 00:00:22,980 --> 00:00:27,420 developers he's an experienced developer 8 00:00:25,080 --> 00:00:30,119 I've seen some percentages of python in 9 00:00:27,420 --> 00:00:32,220 the middle of Owen in the mid top in 10 00:00:30,119 --> 00:00:33,300 Adelaide and it's really wonderful and 11 00:00:32,220 --> 00:00:35,579 you I'm pretty sure you're going to 12 00:00:33,300 --> 00:00:38,280 enjoy this one thank you Robin 13 00:00:35,579 --> 00:00:40,620 cool thank you very much 14 00:00:38,280 --> 00:00:42,719 all right thank you for attending yeah 15 00:00:40,620 --> 00:00:45,300 my name's Owen and I wanted to talk 16 00:00:42,719 --> 00:00:48,840 about some cool 3D visualization 17 00:00:45,300 --> 00:00:52,739 packages in the python ecosystem 18 00:00:48,840 --> 00:00:55,079 so Jump Right In so both the title and a 19 00:00:52,739 --> 00:00:57,539 lot of the content for this talk 20 00:00:55,079 --> 00:01:01,440 um I was inspired by our pycon us talk 21 00:00:57,539 --> 00:01:03,180 in 2017 by Jake vanderplas he's a really 22 00:01:01,440 --> 00:01:04,739 great developer and kind of developer 23 00:01:03,180 --> 00:01:06,960 Advocate and he's produced a lot of 24 00:01:04,739 --> 00:01:08,939 fantastic materials in the kind of 25 00:01:06,960 --> 00:01:12,119 python data science and data 26 00:01:08,939 --> 00:01:14,640 visualization kind of topics 27 00:01:12,119 --> 00:01:16,860 um and in Jake's talk he put up this map 28 00:01:14,640 --> 00:01:19,380 of all these visualization packages in 29 00:01:16,860 --> 00:01:21,600 the python ecosystem and to very very 30 00:01:19,380 --> 00:01:23,220 quickly recap when he did his talk he 31 00:01:21,600 --> 00:01:24,780 kind of went around in a circle he 32 00:01:23,220 --> 00:01:27,000 talked to matplotlib and all the 33 00:01:24,780 --> 00:01:29,040 satellite packages around that and then 34 00:01:27,000 --> 00:01:31,259 he taught JavaScript and some of the 35 00:01:29,040 --> 00:01:32,540 really popular JavaScript python 36 00:01:31,259 --> 00:01:35,700 integration 37 00:01:32,540 --> 00:01:37,860 packages like your bouquet and plotly 38 00:01:35,700 --> 00:01:40,020 and then he came back and he talked 39 00:01:37,860 --> 00:01:42,000 about d3js which is a really popular 40 00:01:40,020 --> 00:01:44,759 data visualization package in the 41 00:01:42,000 --> 00:01:46,920 JavaScript ecosystem before finally 42 00:01:44,759 --> 00:01:49,380 bringing it around to Old Tower which is 43 00:01:46,920 --> 00:01:50,880 a visualization package that he's worked 44 00:01:49,380 --> 00:01:54,140 on it's based on the grammar of graphics 45 00:01:50,880 --> 00:01:54,140 and it's very cool 46 00:01:54,299 --> 00:02:02,100 but even though Jake put about several 47 00:01:58,140 --> 00:02:03,659 3D visualization packages on his map he 48 00:02:02,100 --> 00:02:05,520 didn't really spend much time speaking 49 00:02:03,659 --> 00:02:08,280 to them which is was fair enough he was 50 00:02:05,520 --> 00:02:10,979 covering so much ground but that sort of 51 00:02:08,280 --> 00:02:12,900 bottom left corner around the opengl as 52 00:02:10,979 --> 00:02:15,780 well as some of the JavaScript libraries 53 00:02:12,900 --> 00:02:18,599 for doing 3D visualizations from python 54 00:02:15,780 --> 00:02:20,400 didn't get covered very much so this is 55 00:02:18,599 --> 00:02:22,620 what I'm kind of calling the neglected 56 00:02:20,400 --> 00:02:24,239 corner of Jake's map and this is kind of 57 00:02:22,620 --> 00:02:26,040 the corner of the ecosystem that I 58 00:02:24,239 --> 00:02:27,540 really want to drill into in this 59 00:02:26,040 --> 00:02:29,940 presentation 60 00:02:27,540 --> 00:02:32,340 I should mention that this is a slightly 61 00:02:29,940 --> 00:02:35,420 polished up version of Jake's original 62 00:02:32,340 --> 00:02:37,620 map that now lives on the pivist site 63 00:02:35,420 --> 00:02:39,420 pivers if you're not familiar with it is 64 00:02:37,620 --> 00:02:41,340 a website that tracks like that kind of 65 00:02:39,420 --> 00:02:44,160 usage and popularity of lots of the 66 00:02:41,340 --> 00:02:45,720 Python visualization packages um I 67 00:02:44,160 --> 00:02:48,680 definitely recommend checking it out if 68 00:02:45,720 --> 00:02:48,680 you haven't seen it before 69 00:02:51,480 --> 00:02:56,879 all right so I'm going to talk text 70 00:02:54,660 --> 00:02:58,620 stacks and packages really soon but 71 00:02:56,879 --> 00:03:00,540 before we do that I want to think about 72 00:02:58,620 --> 00:03:03,120 why we might want to use 3D 73 00:03:00,540 --> 00:03:05,340 visualizations in Python and why we 74 00:03:03,120 --> 00:03:07,500 might not want to use them what are the 75 00:03:05,340 --> 00:03:10,319 potential issues so what are some 76 00:03:07,500 --> 00:03:12,420 reasons for using visualizations well 77 00:03:10,319 --> 00:03:14,340 one that's kind of obvious not 78 00:03:12,420 --> 00:03:16,500 necessarily so great is just because 79 00:03:14,340 --> 00:03:17,819 they look cool and they're engaging and 80 00:03:16,500 --> 00:03:20,280 fun to watch 81 00:03:17,819 --> 00:03:21,360 and I'm not saying that's a bad reason I 82 00:03:20,280 --> 00:03:22,920 love it when people think my 83 00:03:21,360 --> 00:03:25,260 visualizations look cool and want to 84 00:03:22,920 --> 00:03:27,000 share them and engaging is is obviously 85 00:03:25,260 --> 00:03:28,980 nice I want to hold on to people's 86 00:03:27,000 --> 00:03:32,340 attention and for them to be interested 87 00:03:28,980 --> 00:03:34,140 to look at a visualization but I think 88 00:03:32,340 --> 00:03:37,459 we can have issues if that becomes the 89 00:03:34,140 --> 00:03:40,319 primary reason for wanting to use 3D and 90 00:03:37,459 --> 00:03:43,260 it can cause some problems 91 00:03:40,319 --> 00:03:44,700 so the reason for this is when we're 92 00:03:43,260 --> 00:03:46,440 working in data visualization we 93 00:03:44,700 --> 00:03:49,140 normally want to convey out kind of a 94 00:03:46,440 --> 00:03:52,140 clear message we want to give insights 95 00:03:49,140 --> 00:03:53,760 one very kind of tell a story with the 96 00:03:52,140 --> 00:03:55,739 data and hopefully that story isn't 97 00:03:53,760 --> 00:03:58,560 ambiguous and it's very clear 98 00:03:55,739 --> 00:04:01,379 and 3D rendering has certain properties 99 00:03:58,560 --> 00:04:03,060 and if you use 3D rendering naively 100 00:04:01,379 --> 00:04:04,860 sometimes the properties of the 3D 101 00:04:03,060 --> 00:04:07,319 rendering can actually work against the 102 00:04:04,860 --> 00:04:09,540 purposes of telling a clear message 103 00:04:07,319 --> 00:04:11,819 so I want to go over that a little bit 104 00:04:09,540 --> 00:04:14,879 first 105 00:04:11,819 --> 00:04:17,780 so how can having depth and time in the 106 00:04:14,879 --> 00:04:21,000 case of animations make visuals worse 107 00:04:17,780 --> 00:04:23,100 and does a few reasons for this so one 108 00:04:21,000 --> 00:04:25,080 of the first ones is when we're doing a 109 00:04:23,100 --> 00:04:28,020 3D rendering we want to simulate both 110 00:04:25,080 --> 00:04:30,300 light and Shadow or shading because 3D 111 00:04:28,020 --> 00:04:32,880 objects don't look very 3D if they're 112 00:04:30,300 --> 00:04:34,620 flat shaded we want the side facing the 113 00:04:32,880 --> 00:04:36,540 virtual light source to be more lit up 114 00:04:34,620 --> 00:04:38,940 the side facing away from the virtual 115 00:04:36,540 --> 00:04:41,220 light source to be shaded and darker 116 00:04:38,940 --> 00:04:42,840 but think about the process of shading 117 00:04:41,220 --> 00:04:44,759 it that we're actually fading some of 118 00:04:42,840 --> 00:04:47,580 the color and texture on that object to 119 00:04:44,759 --> 00:04:49,620 Black so we're deliberately discarding 120 00:04:47,580 --> 00:04:51,600 some of the color and texture 121 00:04:49,620 --> 00:04:54,120 information on these objects as part of 122 00:04:51,600 --> 00:04:55,500 implementing a lighting model which is a 123 00:04:54,120 --> 00:04:57,120 bit funny to think about that you're 124 00:04:55,500 --> 00:04:59,639 deliberately throwing away some of the 125 00:04:57,120 --> 00:05:01,620 visual kind of definition and Clarity on 126 00:04:59,639 --> 00:05:03,660 your objects but you have to if you want 127 00:05:01,620 --> 00:05:06,240 to make them work 3D 128 00:05:03,660 --> 00:05:08,400 other issues are that perspective can 129 00:05:06,240 --> 00:05:10,919 distort your visualization and make some 130 00:05:08,400 --> 00:05:14,040 details unclear so I guess a classic 131 00:05:10,919 --> 00:05:16,320 example if you've ever seen like a 3D 132 00:05:14,040 --> 00:05:18,540 pie chart and whichever slice of the pie 133 00:05:16,320 --> 00:05:20,759 chart is closer to the virtual camera by 134 00:05:18,540 --> 00:05:22,560 virtual perspective looks bigger than 135 00:05:20,759 --> 00:05:24,720 what it is actually compared to the 136 00:05:22,560 --> 00:05:27,120 other slices on the pie 137 00:05:24,720 --> 00:05:28,919 and and likewise if our 3D scenes get 138 00:05:27,120 --> 00:05:30,660 very large and obviously the things that 139 00:05:28,919 --> 00:05:33,539 go further off into the distance we're 140 00:05:30,660 --> 00:05:34,860 losing both kind of shape and color and 141 00:05:33,539 --> 00:05:37,320 texture Precision on them they're 142 00:05:34,860 --> 00:05:39,180 basically again too small to see clearly 143 00:05:37,320 --> 00:05:40,979 they're getting fewer and fewer pixels 144 00:05:39,180 --> 00:05:43,259 that they can render with as they 145 00:05:40,979 --> 00:05:44,639 disappear into the distance so that's a 146 00:05:43,259 --> 00:05:47,340 potential problem 147 00:05:44,639 --> 00:05:49,259 a third one is the problem of occlusion 148 00:05:47,340 --> 00:05:51,300 and occlusion is just a fancy word for 149 00:05:49,259 --> 00:05:53,580 saying some object in the foreground is 150 00:05:51,300 --> 00:05:55,020 blocking our view of some object in the 151 00:05:53,580 --> 00:05:57,660 background so we can't see that 152 00:05:55,020 --> 00:05:59,820 background object and and this kind of 153 00:05:57,660 --> 00:06:01,259 3D bar plot I guess is a pretty good 154 00:05:59,820 --> 00:06:03,000 example of that where we have tall 155 00:06:01,259 --> 00:06:04,979 foreground bars and they're blocking our 156 00:06:03,000 --> 00:06:06,900 view of the background bars we can't see 157 00:06:04,979 --> 00:06:08,699 what they are 158 00:06:06,900 --> 00:06:10,560 I guess I'll also quickly note that 159 00:06:08,699 --> 00:06:12,900 occlusion isn't always a problem just of 160 00:06:10,560 --> 00:06:15,120 what we classify as 3D visualizations 161 00:06:12,900 --> 00:06:17,580 you even have kind of occlusion and 162 00:06:15,120 --> 00:06:19,620 overdraw problems in 2D visualizations 163 00:06:17,580 --> 00:06:21,960 if you've ever done a scatter plot in 164 00:06:19,620 --> 00:06:23,400 matplotlib and whichever dots especially 165 00:06:21,960 --> 00:06:25,020 if you use different colored dots the 166 00:06:23,400 --> 00:06:27,780 ones that draw later overdraw the 167 00:06:25,020 --> 00:06:30,060 earlier ones and you can sometimes tweak 168 00:06:27,780 --> 00:06:31,919 around with the Z depth of items that 169 00:06:30,060 --> 00:06:33,660 you draw in matplotlib but you can even 170 00:06:31,919 --> 00:06:35,759 get that sort of occlusion and 171 00:06:33,660 --> 00:06:37,860 foreground objects obscuring background 172 00:06:35,759 --> 00:06:40,919 objects happening even there 173 00:06:37,860 --> 00:06:42,539 and I guess lastly it's quite typical to 174 00:06:40,919 --> 00:06:44,699 want to animate when you're doing 3D 175 00:06:42,539 --> 00:06:46,740 visualizations if you have a 3D object 176 00:06:44,699 --> 00:06:48,180 typically you at the very least want to 177 00:06:46,740 --> 00:06:50,340 be able to animate a camera to move 178 00:06:48,180 --> 00:06:52,560 around and see it from multiple sides 179 00:06:50,340 --> 00:06:55,919 that's kind of part of the value of 180 00:06:52,560 --> 00:06:58,280 having 380 but animation brings its own 181 00:06:55,919 --> 00:07:01,319 problems so animation can become 182 00:06:58,280 --> 00:07:04,800 distracting if you think like excessive 183 00:07:01,319 --> 00:07:07,080 animated gifs blink and kind of tags 184 00:07:04,800 --> 00:07:10,199 from 1990s web pages that sort of style 185 00:07:07,080 --> 00:07:13,020 so it can be distracting also probably 186 00:07:10,199 --> 00:07:14,940 worse if you animate too much motion 187 00:07:13,020 --> 00:07:17,220 especially on a big screen that takes up 188 00:07:14,940 --> 00:07:18,900 a big part of people's field of view you 189 00:07:17,220 --> 00:07:21,539 can actually physically make people feel 190 00:07:18,900 --> 00:07:23,759 uncomfortable so yes um an example of 191 00:07:21,539 --> 00:07:25,800 this is that I used to work at a company 192 00:07:23,759 --> 00:07:27,240 that did simulations of these large mine 193 00:07:25,800 --> 00:07:29,099 type vehicles and as part of that 194 00:07:27,240 --> 00:07:30,960 testing or just playing around sometimes 195 00:07:29,099 --> 00:07:32,880 we throw these vehicles around and 196 00:07:30,960 --> 00:07:35,460 that'd be somersaulting through the air 197 00:07:32,880 --> 00:07:37,560 and we're watching this on big screens 198 00:07:35,460 --> 00:07:40,620 that take up most of your field of view 199 00:07:37,560 --> 00:07:42,960 from the fine and seeing like Horizons 200 00:07:40,620 --> 00:07:45,000 and really aggressive motion and 201 00:07:42,960 --> 00:07:47,940 movement in front of you makes a lot of 202 00:07:45,000 --> 00:07:50,039 people very very uncomfortable when the 203 00:07:47,940 --> 00:07:51,660 motion in your kind of visual field is 204 00:07:50,039 --> 00:07:54,000 not consistent with your own sense of 205 00:07:51,660 --> 00:07:56,460 balance and momentum so problems like 206 00:07:54,000 --> 00:07:59,400 simulator sickness or VR sickness are 207 00:07:56,460 --> 00:08:01,440 very real types of motion sickness and 208 00:07:59,400 --> 00:08:03,120 lots of people experience them and that 209 00:08:01,440 --> 00:08:06,020 can be an issue depending on how you do 210 00:08:03,120 --> 00:08:06,020 3D animations 211 00:08:06,780 --> 00:08:11,220 so now I've talked to a lot of reasons 212 00:08:08,759 --> 00:08:13,680 why it's can be problematic I want to 213 00:08:11,220 --> 00:08:15,539 look at some of the reasons where these 214 00:08:13,680 --> 00:08:18,120 features of 3D rendering actually work 215 00:08:15,539 --> 00:08:20,280 for us instead of against us 216 00:08:18,120 --> 00:08:23,400 so the first example the one I'm showing 217 00:08:20,280 --> 00:08:25,740 in that top left is so from a package 218 00:08:23,400 --> 00:08:28,199 called ladybug and ladybug analyzes like 219 00:08:25,740 --> 00:08:30,599 the solar environment around buildings 220 00:08:28,199 --> 00:08:33,539 so in this case this is an example of 221 00:08:30,599 --> 00:08:35,580 both lighting and Shadow where it's not 222 00:08:33,539 --> 00:08:37,080 detracting from the message it like it 223 00:08:35,580 --> 00:08:39,120 is the message that we're trying to 224 00:08:37,080 --> 00:08:40,740 convey and that's kind of an appropriate 225 00:08:39,120 --> 00:08:43,560 use 226 00:08:40,740 --> 00:08:45,959 um also there are times and cases where 227 00:08:43,560 --> 00:08:48,779 having animations and interaction over 228 00:08:45,959 --> 00:08:51,480 time you know it does make sense so 229 00:08:48,779 --> 00:08:53,580 quite often like for simple plots we'll 230 00:08:51,480 --> 00:08:56,160 just put time on the x-axis but I guess 231 00:08:53,580 --> 00:08:58,560 if we have reason to render stuff in 3D 232 00:08:56,160 --> 00:09:01,320 we're already using up all our spatial 233 00:08:58,560 --> 00:09:03,720 axes we can't map time across one of 234 00:09:01,320 --> 00:09:06,600 them so it makes sense and there's some 235 00:09:03,720 --> 00:09:08,580 events like Peak electricity usage or 236 00:09:06,600 --> 00:09:10,560 Peak traffic convention we want to see 237 00:09:08,580 --> 00:09:12,600 the lead up to an event the actual event 238 00:09:10,560 --> 00:09:15,480 and kind of the aftermath or after 239 00:09:12,600 --> 00:09:18,000 effects of that event 240 00:09:15,480 --> 00:09:20,220 it's also talking about perspective that 241 00:09:18,000 --> 00:09:23,160 sometimes perspective and the sense of 242 00:09:20,220 --> 00:09:25,440 scale of objects does actually work for 243 00:09:23,160 --> 00:09:26,880 us so I had one example that's not 244 00:09:25,440 --> 00:09:28,800 specifically related to data 245 00:09:26,880 --> 00:09:31,440 visualization but it is related to 3D 246 00:09:28,800 --> 00:09:33,060 rendering mentioned that at working out 247 00:09:31,440 --> 00:09:35,279 this same company that I mentioned 248 00:09:33,060 --> 00:09:37,560 before that did the mine site vehicle 249 00:09:35,279 --> 00:09:39,959 simulations they used to simulate these 250 00:09:37,560 --> 00:09:41,820 really giant Vehicles so these huge Haul 251 00:09:39,959 --> 00:09:44,160 trucks huge excavators these vehicles 252 00:09:41,820 --> 00:09:45,839 weigh hundreds of tons and they're like 253 00:09:44,160 --> 00:09:48,600 driving a four-story building around 254 00:09:45,839 --> 00:09:51,779 that they're truly massive but when 255 00:09:48,600 --> 00:09:53,880 trainers and when people try to you work 256 00:09:51,779 --> 00:09:57,060 on these simulate these giant simulated 257 00:09:53,880 --> 00:09:58,800 vehicles on the simulator with screens 258 00:09:57,060 --> 00:10:01,440 that are just one to two meters away 259 00:09:58,800 --> 00:10:04,019 from your head you often lost a lot of 260 00:10:01,440 --> 00:10:06,000 that sense of scale because your eyes 261 00:10:04,019 --> 00:10:07,380 like your head motion as you moved 262 00:10:06,000 --> 00:10:08,940 around and you looked at the screens 263 00:10:07,380 --> 00:10:11,160 your view 264 00:10:08,940 --> 00:10:12,959 and your sense of scale was very tied to 265 00:10:11,160 --> 00:10:14,160 the physical screens which were only a 266 00:10:12,959 --> 00:10:16,980 few meters away so even though we're 267 00:10:14,160 --> 00:10:18,420 simulating a giant vehicle it only felt 268 00:10:16,980 --> 00:10:20,399 a few meters wide there might have been 269 00:10:18,420 --> 00:10:22,560 other visual cues in the simulation like 270 00:10:20,399 --> 00:10:24,540 trees down below you and small light 271 00:10:22,560 --> 00:10:27,180 vehicles but you still didn't get that 272 00:10:24,540 --> 00:10:29,580 sense of scale and then one day when 273 00:10:27,180 --> 00:10:31,800 this was early on when the kind of the 274 00:10:29,580 --> 00:10:34,560 Oculus and other VR headsets were 275 00:10:31,800 --> 00:10:36,360 becoming popular we tried testing out on 276 00:10:34,560 --> 00:10:38,880 users and suddenly that sense of scale 277 00:10:36,360 --> 00:10:40,740 instantly came back you know if I'm in a 278 00:10:38,880 --> 00:10:42,600 giant excavator I have to bend back and 279 00:10:40,740 --> 00:10:44,459 look up high to see the bucket when it's 280 00:10:42,600 --> 00:10:46,860 raised up I had to physically lean 281 00:10:44,459 --> 00:10:48,720 forward and look down to see down where 282 00:10:46,860 --> 00:10:51,600 I'm digging and when I moved my head 283 00:10:48,720 --> 00:10:53,399 side to side with the VR headset on my 284 00:10:51,600 --> 00:10:54,959 view at the front of the vehicle didn't 285 00:10:53,399 --> 00:10:57,899 change very much so unlike the physical 286 00:10:54,959 --> 00:10:59,880 screens when my the VR headset actually 287 00:10:57,899 --> 00:11:01,680 helped with that because the size of my 288 00:10:59,880 --> 00:11:04,680 virtual had relative to this virtual 289 00:11:01,680 --> 00:11:06,600 giant machine was very very small and 290 00:11:04,680 --> 00:11:09,959 moving around didn't change my field of 291 00:11:06,600 --> 00:11:12,060 view very much so that sense of scale 292 00:11:09,959 --> 00:11:14,399 um and perspective really worked in that 293 00:11:12,060 --> 00:11:16,320 situation I guess I also mentioned that 294 00:11:14,399 --> 00:11:18,839 sometimes we're visualizing things that 295 00:11:16,320 --> 00:11:20,640 are inherently 3D in themselves so the 296 00:11:18,839 --> 00:11:22,320 example on the bottom left where we're 297 00:11:20,640 --> 00:11:24,600 looking at the three-dimensional 298 00:11:22,320 --> 00:11:26,279 structure of our protein and 299 00:11:24,600 --> 00:11:28,079 three-dimensional structure is pretty 300 00:11:26,279 --> 00:11:30,360 important in this domain because it 301 00:11:28,079 --> 00:11:32,160 affects how proteins interact and bind 302 00:11:30,360 --> 00:11:36,240 with each other so I think this is a 303 00:11:32,160 --> 00:11:39,060 good use case of using 3D rendering and 304 00:11:36,240 --> 00:11:41,279 lastly so close to what I where I work 305 00:11:39,060 --> 00:11:43,380 now I work at a company that does flood 306 00:11:41,279 --> 00:11:45,480 mapping and this is an example where 307 00:11:43,380 --> 00:11:47,339 occlusion can work for us because when 308 00:11:45,480 --> 00:11:50,100 we're looking at flood and water raising 309 00:11:47,339 --> 00:11:52,560 up and submerging Roads and buildings 310 00:11:50,100 --> 00:11:54,240 and other valuable infrastructure that 311 00:11:52,560 --> 00:11:57,240 water is now a 312 00:11:54,240 --> 00:11:59,040 a clues in the stuff behind it you can 313 00:11:57,240 --> 00:12:00,660 no longer see it so the occlusion 314 00:11:59,040 --> 00:12:02,519 actually works for us in that case 315 00:12:00,660 --> 00:12:04,980 because it shows us the impact of a 316 00:12:02,519 --> 00:12:07,820 flood what's damaged what's submerged 317 00:12:04,980 --> 00:12:07,820 what's inundated 318 00:12:09,120 --> 00:12:13,920 anyway so hopefully that gives a bit of 319 00:12:12,180 --> 00:12:15,660 an idea about when we might want to use 320 00:12:13,920 --> 00:12:18,240 3D rendering and when we might not want 321 00:12:15,660 --> 00:12:21,360 to use it so now I'll get on to the tech 322 00:12:18,240 --> 00:12:24,600 stack and packages and so on so I've 323 00:12:21,360 --> 00:12:28,019 done my own kind of mini-map of part of 324 00:12:24,600 --> 00:12:30,600 the 3D visualization ecosystem in Python 325 00:12:28,019 --> 00:12:32,279 down the bottom in rad I've drawn the 326 00:12:30,600 --> 00:12:34,380 actual this is supposed to represent the 327 00:12:32,279 --> 00:12:37,260 actual physical graphics processor unit 328 00:12:34,380 --> 00:12:39,899 Hardware so your Nvidia cards or your 329 00:12:37,260 --> 00:12:41,940 AMD cards or Intel cards and like and 330 00:12:39,899 --> 00:12:44,639 I'm not going to go real that close to 331 00:12:41,940 --> 00:12:46,620 the metal in this presentation 332 00:12:44,639 --> 00:12:48,839 I guess one layer up from that in the 333 00:12:46,620 --> 00:12:51,180 yellow we have a lot of the platform API 334 00:12:48,839 --> 00:12:52,620 so DirectX for Windows metal for apple 335 00:12:51,180 --> 00:12:55,380 and iOS 336 00:12:52,620 --> 00:12:58,380 Vulcan from the Chronos group and some 337 00:12:55,380 --> 00:13:00,300 of the older webgl and opengl one so 338 00:12:58,380 --> 00:13:01,740 these are the ones that some of the apis 339 00:13:00,300 --> 00:13:03,480 that abstract away some of the 340 00:13:01,740 --> 00:13:06,240 differences between the actual graphics 341 00:13:03,480 --> 00:13:07,500 card hardware and it's getting still 342 00:13:06,240 --> 00:13:09,480 lower level than what would actually 343 00:13:07,500 --> 00:13:10,860 touch in Python but we're starting to 344 00:13:09,480 --> 00:13:13,800 get closer 345 00:13:10,860 --> 00:13:16,079 in the blue level I'm showing some game 346 00:13:13,800 --> 00:13:18,600 engines and some higher level Graphics 347 00:13:16,079 --> 00:13:21,300 apis some of these do have python 348 00:13:18,600 --> 00:13:23,639 bindings which I'll speak to in a bit 349 00:13:21,300 --> 00:13:24,860 and at the very top level in the green I 350 00:13:23,639 --> 00:13:27,480 have the 351 00:13:24,860 --> 00:13:30,420 selection of python 3D visualization 352 00:13:27,480 --> 00:13:33,000 packages and I which I will speak to 353 00:13:30,420 --> 00:13:34,560 later on and I should mention different 354 00:13:33,000 --> 00:13:36,420 especially at that blue level in the 355 00:13:34,560 --> 00:13:39,120 green level I'm only showing a very 356 00:13:36,420 --> 00:13:41,120 small subset of what's actually out 357 00:13:39,120 --> 00:13:44,040 there just a few kind of Representative 358 00:13:41,120 --> 00:13:45,959 examples in reality both that blue and 359 00:13:44,040 --> 00:13:49,700 green layer are much much wider than 360 00:13:45,959 --> 00:13:49,700 what I could ever fit on one slide 361 00:13:49,920 --> 00:13:54,120 so yeah I'm going to start walking up 362 00:13:52,260 --> 00:13:57,060 this Tech stack and speaking to it a bit 363 00:13:54,120 --> 00:13:58,740 I guess I'll start with opengl 364 00:13:57,060 --> 00:14:00,959 um this is a little bit of a lie because 365 00:13:58,740 --> 00:14:03,540 there was stuff before there was 3D 366 00:14:00,959 --> 00:14:05,279 rendering before opengl but opengl is 367 00:14:03,540 --> 00:14:07,620 kind of it's quite old and it's still 368 00:14:05,279 --> 00:14:09,720 around still popular still used so I'll 369 00:14:07,620 --> 00:14:12,480 I'll talk to that for a little bit so 370 00:14:09,720 --> 00:14:14,480 opengl was started by a company called 371 00:14:12,480 --> 00:14:17,639 um called silicon Graphics back in the 372 00:14:14,480 --> 00:14:19,920 1990s it was something I looked at doing 373 00:14:17,639 --> 00:14:22,620 my undergrad at University so that was 374 00:14:19,920 --> 00:14:25,320 in you know at Sea and Northern GL and 375 00:14:22,620 --> 00:14:27,779 doing really basic 3D rendering and 376 00:14:25,320 --> 00:14:30,899 opengl has this concept as do many other 377 00:14:27,779 --> 00:14:32,820 Graphics apis of a pipeline so you come 378 00:14:30,899 --> 00:14:36,600 up with your three-dimensional Vector 379 00:14:32,820 --> 00:14:38,579 geometries you can add light sources and 380 00:14:36,600 --> 00:14:40,380 light material properties to these 381 00:14:38,579 --> 00:14:43,139 objects as well as a viewing perspective 382 00:14:40,380 --> 00:14:44,579 or a virtual camera and you put them in 383 00:14:43,139 --> 00:14:46,199 the front of the pipeline and there's a 384 00:14:44,579 --> 00:14:48,180 sequence of steps that it goes to 385 00:14:46,199 --> 00:14:50,880 manipulating these geometries before 386 00:14:48,180 --> 00:14:52,440 ultimately rasterizing them and turning 387 00:14:50,880 --> 00:14:54,540 them into the rendered image from the 388 00:14:52,440 --> 00:14:57,540 Viewpoint of the camera 389 00:14:54,540 --> 00:14:59,399 and those steps you you can look them up 390 00:14:57,540 --> 00:15:02,100 if you're interested it's changed over 391 00:14:59,399 --> 00:15:04,079 time the earlier versions of opengl had 392 00:15:02,100 --> 00:15:05,399 very rigid steps that you could tweak 393 00:15:04,079 --> 00:15:06,899 the parameters on a bit you might be 394 00:15:05,399 --> 00:15:08,579 able to choose the resolution of the 395 00:15:06,899 --> 00:15:11,100 ultimate raster image you might be able 396 00:15:08,579 --> 00:15:13,260 to tweak the field of view angles that 397 00:15:11,100 --> 00:15:16,019 this virtual camera had but you couldn't 398 00:15:13,260 --> 00:15:17,940 change much in the pipeline and over 399 00:15:16,019 --> 00:15:20,459 time these pipelines became more 400 00:15:17,940 --> 00:15:23,519 customizable and configurable you know 401 00:15:20,459 --> 00:15:25,800 the Advent of shaders which are C or 402 00:15:23,519 --> 00:15:28,440 assembly like languages that would let 403 00:15:25,800 --> 00:15:30,540 you customize different stages of these 404 00:15:28,440 --> 00:15:33,180 pipelines so you would have like vertex 405 00:15:30,540 --> 00:15:35,699 and geometry shaders for tweaking how 406 00:15:33,180 --> 00:15:38,160 these objects are transformed and warped 407 00:15:35,699 --> 00:15:40,380 before relative to the Viewpoint of the 408 00:15:38,160 --> 00:15:42,000 camera and you'd have things like our 409 00:15:40,380 --> 00:15:45,199 fragment shaders which would let you 410 00:15:42,000 --> 00:15:47,339 customize the way these things got tax 411 00:15:45,199 --> 00:15:50,480 rasterized in the end and the ultimate 412 00:15:47,339 --> 00:15:53,220 pixel colors that you would see 413 00:15:50,480 --> 00:15:56,120 opengl is now managed by a group called 414 00:15:53,220 --> 00:15:59,160 The Chronos organization 415 00:15:56,120 --> 00:16:01,860 it's been featured Frozen for at least 416 00:15:59,160 --> 00:16:04,320 five or six years I guess the main 417 00:16:01,860 --> 00:16:07,079 reason is that it hasn't really kept up 418 00:16:04,320 --> 00:16:08,820 with modern GPU hardware and 419 00:16:07,079 --> 00:16:10,800 architecture so this Chronos 420 00:16:08,820 --> 00:16:11,399 organization 421 00:16:10,800 --> 00:16:13,680 um 422 00:16:11,399 --> 00:16:14,720 would prefer you to go into a new lower 423 00:16:13,680 --> 00:16:17,820 level 424 00:16:14,720 --> 00:16:20,699 Graphics API called Vulcan which I'll 425 00:16:17,820 --> 00:16:23,100 speak to in a little bit 426 00:16:20,699 --> 00:16:25,440 um all that said though opengl is still 427 00:16:23,100 --> 00:16:27,180 very heavily used and it underlines a 428 00:16:25,440 --> 00:16:29,699 lot of the 3D visualization packages 429 00:16:27,180 --> 00:16:31,800 that we have access to in Python so so 430 00:16:29,699 --> 00:16:34,500 we are in this bit of this transitionary 431 00:16:31,800 --> 00:16:37,440 period where we're still using opengl a 432 00:16:34,500 --> 00:16:39,000 lot but all the new work and all the new 433 00:16:37,440 --> 00:16:42,199 advancements are happening in different 434 00:16:39,000 --> 00:16:42,199 platform apis 435 00:16:44,100 --> 00:16:50,339 so still kind of riffing on the opengl 436 00:16:46,920 --> 00:16:53,040 theme a little bit later on in the kind 437 00:16:50,339 --> 00:16:56,519 of life cycle of opengl there was opengl 438 00:16:53,040 --> 00:16:59,279 embedded systems or opengl ES this was a 439 00:16:56,519 --> 00:17:02,160 subset of opengl to add support for like 440 00:16:59,279 --> 00:17:03,959 mobile devices so tablets and phones to 441 00:17:02,160 --> 00:17:06,720 my understanding this is still used on 442 00:17:03,959 --> 00:17:09,059 your Android devices today I believe iOS 443 00:17:06,720 --> 00:17:10,679 devices used to use this before they 444 00:17:09,059 --> 00:17:12,660 more recently switched over to their 445 00:17:10,679 --> 00:17:15,179 metal API 446 00:17:12,660 --> 00:17:18,600 and the version of opengl embedded 447 00:17:15,179 --> 00:17:21,419 systems or of NGL es2 later became kind 448 00:17:18,600 --> 00:17:22,919 of adapted and rebranded as webgl so now 449 00:17:21,419 --> 00:17:25,439 it was going to give you Hardware 450 00:17:22,919 --> 00:17:28,380 accelerated 3D rendering support for 451 00:17:25,439 --> 00:17:29,940 browsers and webgl is what underlies a 452 00:17:28,380 --> 00:17:31,860 lot of the browser-based data 453 00:17:29,940 --> 00:17:34,520 visualization packages that we use in 454 00:17:31,860 --> 00:17:34,520 Python today 455 00:17:36,780 --> 00:17:41,820 and lastly just kind of wrapping up some 456 00:17:39,120 --> 00:17:45,059 of the Native platform specific apis I 457 00:17:41,820 --> 00:17:48,120 spoke to them briefly so we metal is the 458 00:17:45,059 --> 00:17:51,179 new API for newer Apple devices and iOS 459 00:17:48,120 --> 00:17:54,660 devices Vulcan is supposed to be the 460 00:17:51,179 --> 00:17:57,780 like successor to opengl but it's a much 461 00:17:54,660 --> 00:18:01,320 more lower level Graphics API the more 462 00:17:57,780 --> 00:18:03,360 opengl is and DirectX which has been 463 00:18:01,320 --> 00:18:07,440 around on windows for a very long time 464 00:18:03,360 --> 00:18:10,080 and as I'm after DirectX 12 at present 465 00:18:07,440 --> 00:18:11,880 I'll say that a lot of game engines do 466 00:18:10,080 --> 00:18:14,640 tend to stay up to date with these 467 00:18:11,880 --> 00:18:16,980 platform apis they care about squeezing 468 00:18:14,640 --> 00:18:20,460 as much performance as they can out of 469 00:18:16,980 --> 00:18:22,620 the gpus but not so many visualization 470 00:18:20,460 --> 00:18:24,120 packages have kept up to date with these 471 00:18:22,620 --> 00:18:25,940 platform apis 472 00:18:24,120 --> 00:18:29,160 there's um 473 00:18:25,940 --> 00:18:30,419 one library that I I know of 474 00:18:29,160 --> 00:18:31,799 specifically 475 00:18:30,419 --> 00:18:34,440 um it's actually a C plus plus Library 476 00:18:31,799 --> 00:18:37,200 dear IM GUI and there are python 477 00:18:34,440 --> 00:18:40,320 bindings to this Library so as the name 478 00:18:37,200 --> 00:18:43,799 implies it's it's for creating guise or 479 00:18:40,320 --> 00:18:46,799 Windows systems buttons and icons and 480 00:18:43,799 --> 00:18:48,900 elements and widgets but it also has a 481 00:18:46,799 --> 00:18:50,640 subset of its API for doing kind of 482 00:18:48,900 --> 00:18:53,940 conventional plotting like your Scatter 483 00:18:50,640 --> 00:18:55,500 Plots line plots and that and it has 484 00:18:53,940 --> 00:18:57,840 Bindings that hook into all these 485 00:18:55,500 --> 00:19:00,419 platform specific apis so it's very very 486 00:18:57,840 --> 00:19:02,460 performant so if you ever say need to do 487 00:19:00,419 --> 00:19:04,860 a scatter plot with a million data 488 00:19:02,460 --> 00:19:07,260 points and animate and update that 489 00:19:04,860 --> 00:19:09,600 really fast many many times a second 490 00:19:07,260 --> 00:19:11,400 that's potentially an interesting one to 491 00:19:09,600 --> 00:19:13,260 look at so the the name of one of the 492 00:19:11,400 --> 00:19:15,360 most popular python bindings for that is 493 00:19:13,260 --> 00:19:17,039 called deer Pi GUI 494 00:19:15,360 --> 00:19:18,600 but I didn't include that on the map 495 00:19:17,039 --> 00:19:22,220 because as far as I know it doesn't have 496 00:19:18,600 --> 00:19:22,220 any support for 3D rendering 497 00:19:23,940 --> 00:19:28,500 I guess one of the most high level 498 00:19:26,299 --> 00:19:30,900 libraries that I'll talk about related 499 00:19:28,500 --> 00:19:34,440 to 3D rendering is this visualization 500 00:19:30,900 --> 00:19:38,700 toolkit it was a c plus Library it was a 501 00:19:34,440 --> 00:19:41,220 higher level abstraction over opengl it 502 00:19:38,700 --> 00:19:43,080 has a number of python binding packages 503 00:19:41,220 --> 00:19:46,620 that let you hook in and use it from 504 00:19:43,080 --> 00:19:49,260 python so there's Pi Vista mayavi veto 505 00:19:46,620 --> 00:19:50,400 and more 506 00:19:49,260 --> 00:19:52,620 um and then we'll just quickly mention 507 00:19:50,400 --> 00:19:54,120 that Pi Vista is a personal favorite of 508 00:19:52,620 --> 00:19:55,980 mine I'll speak to her a little bit more 509 00:19:54,120 --> 00:19:58,620 later on but if you're ever interested 510 00:19:55,980 --> 00:20:01,260 in getting into 3D rendering 511 00:19:58,620 --> 00:20:03,059 um using python that would be one of my 512 00:20:01,260 --> 00:20:04,799 recommendations to try first just 513 00:20:03,059 --> 00:20:07,740 because it has an excellent set of 514 00:20:04,799 --> 00:20:11,160 documentation and examples as well as it 515 00:20:07,740 --> 00:20:13,620 supports many many use cases from doing 516 00:20:11,160 --> 00:20:16,620 real-time rendering to doing offline 517 00:20:13,620 --> 00:20:18,780 rendering to images and videos as well 518 00:20:16,620 --> 00:20:21,299 as it you know works as a standalone 519 00:20:18,780 --> 00:20:22,860 script or inside a jupyter notebook so 520 00:20:21,299 --> 00:20:25,020 it's really versatile and the 521 00:20:22,860 --> 00:20:28,100 documentation is great so it's a 522 00:20:25,020 --> 00:20:28,100 personal favorite of mine 523 00:20:28,919 --> 00:20:34,080 a couple more visualization packages 524 00:20:30,720 --> 00:20:37,400 that are quite closely tied and coupled 525 00:20:34,080 --> 00:20:40,460 to open gel are this pie and Glam pie 526 00:20:37,400 --> 00:20:42,720 yeah I mentioned the quiet low level 527 00:20:40,460 --> 00:20:44,700 these two packages I believe they're 528 00:20:42,720 --> 00:20:47,100 quite interrelated they've shared some 529 00:20:44,700 --> 00:20:49,620 of the same developers they have some in 530 00:20:47,100 --> 00:20:51,539 the same examples and that Gunplay 531 00:20:49,620 --> 00:20:53,520 itself seems to have gone a bit stale I 532 00:20:51,539 --> 00:20:55,919 haven't seen much activity in its repo 533 00:20:53,520 --> 00:20:57,799 for the last couple of years this play 534 00:20:55,919 --> 00:21:00,000 on the other hand is very actively 535 00:20:57,799 --> 00:21:02,220 maintained and developed and I know 536 00:21:00,000 --> 00:21:05,760 visplay is used by certain people in the 537 00:21:02,220 --> 00:21:07,380 earth observation community so it's it's 538 00:21:05,760 --> 00:21:09,419 the one that I've used a little bit 539 00:21:07,380 --> 00:21:11,220 before as well 540 00:21:09,419 --> 00:21:13,559 um and I know with this part two they're 541 00:21:11,220 --> 00:21:15,240 talking about adding Vulcan support and 542 00:21:13,559 --> 00:21:17,880 maybe some of those other platforms 543 00:21:15,240 --> 00:21:20,960 specific apis so that one looks quite 544 00:21:17,880 --> 00:21:20,960 interesting to me 545 00:21:22,799 --> 00:21:27,299 in terms of um for quite a long time 546 00:21:25,620 --> 00:21:29,280 there have been game engines out for 547 00:21:27,299 --> 00:21:31,320 decades and this game engines quite 548 00:21:29,280 --> 00:21:33,120 often have support like python Bindings 549 00:21:31,320 --> 00:21:34,919 that let you hook into them and use them 550 00:21:33,120 --> 00:21:36,840 for rendering so obviously this is not 551 00:21:34,919 --> 00:21:38,220 your traditional data visualization but 552 00:21:36,840 --> 00:21:40,380 if you do need to render 553 00:21:38,220 --> 00:21:42,720 three-dimensional scenes in a world that 554 00:21:40,380 --> 00:21:45,120 people can interact with preferably real 555 00:21:42,720 --> 00:21:47,700 time that these offer potentially 556 00:21:45,120 --> 00:21:49,919 interesting opportunities so one by 557 00:21:47,700 --> 00:21:52,860 relatively famous open source game 558 00:21:49,919 --> 00:21:54,419 Engineers that ogre game engine I'm not 559 00:21:52,860 --> 00:21:56,940 sure if I'll get that acronym quite 560 00:21:54,419 --> 00:21:59,520 right but something like object oriented 561 00:21:56,940 --> 00:22:01,620 Graphics rendering engine 562 00:21:59,520 --> 00:22:03,240 um it had python bindings as a plug-in 563 00:22:01,620 --> 00:22:05,880 and I believe it's engine natively 564 00:22:03,240 --> 00:22:07,740 supports python now so you can check out 565 00:22:05,880 --> 00:22:10,679 packages for that if you're interested 566 00:22:07,740 --> 00:22:12,720 and another one that I think has huge 567 00:22:10,679 --> 00:22:15,120 potential and is really interesting is 568 00:22:12,720 --> 00:22:17,520 that Unreal Engine and I don't know if 569 00:22:15,120 --> 00:22:19,799 you've ever checked out like images or 570 00:22:17,520 --> 00:22:22,380 videos from Unreal Engine 5 now I think 571 00:22:19,799 --> 00:22:25,260 they're up to version 5.2 but it's an 572 00:22:22,380 --> 00:22:27,840 amazing games engine that can do 573 00:22:25,260 --> 00:22:29,940 photorealistic graphics and has all 574 00:22:27,840 --> 00:22:32,340 sorts of you know really cool tooling 575 00:22:29,940 --> 00:22:34,020 and lighting effects and support you 576 00:22:32,340 --> 00:22:36,360 know it's so powerful people can even 577 00:22:34,020 --> 00:22:39,720 use it for you know rendering like movie 578 00:22:36,360 --> 00:22:42,240 quality animations and they do 579 00:22:39,720 --> 00:22:44,700 um you cannot use python in real time 580 00:22:42,240 --> 00:22:46,380 when the engine itself is running and 581 00:22:44,700 --> 00:22:48,480 people are interacting with it but it's 582 00:22:46,380 --> 00:22:50,520 scene editor that lets you compose the 583 00:22:48,480 --> 00:22:52,679 three-dimensional scenes and the camera 584 00:22:50,520 --> 00:22:55,500 and the elements within those scenes has 585 00:22:52,679 --> 00:22:57,539 had a python API for a long time I have 586 00:22:55,500 --> 00:22:59,940 seen some kind of funny old demos of 587 00:22:57,539 --> 00:23:01,880 people doing like rendering matplot lib 588 00:22:59,940 --> 00:23:05,640 plots and having them ultimate 589 00:23:01,880 --> 00:23:07,980 ultimately added as textures onto 3D 590 00:23:05,640 --> 00:23:09,780 models in unreal but I think there's it 591 00:23:07,980 --> 00:23:11,700 has so much more potential than that and 592 00:23:09,780 --> 00:23:14,720 I'd be really interested to see more 593 00:23:11,700 --> 00:23:14,720 happen in that space 594 00:23:17,280 --> 00:23:21,179 um another 595 00:23:18,440 --> 00:23:23,659 potential way of doing 3D rendering in 596 00:23:21,179 --> 00:23:27,600 Python is looking at blender so blender 597 00:23:23,659 --> 00:23:31,380 is uh quite probably the best known open 598 00:23:27,600 --> 00:23:33,240 source 3D Ray Tracer Ray tracers if 599 00:23:31,380 --> 00:23:35,280 you're not familiar with them this is 600 00:23:33,240 --> 00:23:37,980 for offline rendering they typically 601 00:23:35,280 --> 00:23:39,600 have much more sophisticated lighting 602 00:23:37,980 --> 00:23:43,020 models than what your real-time 603 00:23:39,600 --> 00:23:46,919 renderers do and as the the name kind of 604 00:23:43,020 --> 00:23:49,919 implies Ray tracers model light rays 605 00:23:46,919 --> 00:23:52,559 that can both reflect off and refract 606 00:23:49,919 --> 00:23:54,080 through multiple 3D geometries in your 607 00:23:52,559 --> 00:23:56,640 scene so you can get these really 608 00:23:54,080 --> 00:23:59,280 realistic looking lighting effects and 609 00:23:56,640 --> 00:24:01,980 lens effects and so on and water 610 00:23:59,280 --> 00:24:04,140 properties and blender has had a python 611 00:24:01,980 --> 00:24:06,659 API for a very long time that lets you 612 00:24:04,140 --> 00:24:09,480 automate its rendering as well as build 613 00:24:06,659 --> 00:24:10,500 plugins and extensions with it so that's 614 00:24:09,480 --> 00:24:12,299 another one that's potentially 615 00:24:10,500 --> 00:24:14,700 interesting if you wanted to just 616 00:24:12,299 --> 00:24:15,900 offline rendering to still images or to 617 00:24:14,700 --> 00:24:19,039 videos 618 00:24:15,900 --> 00:24:19,039 via python 619 00:24:20,039 --> 00:24:24,960 and I guess there's a whole ecosystem of 620 00:24:23,220 --> 00:24:27,539 3D rendering options if you're working 621 00:24:24,960 --> 00:24:29,460 in Jupiter as well as this also includes 622 00:24:27,539 --> 00:24:31,980 some web front-end stuff that has 623 00:24:29,460 --> 00:24:33,419 Jupiter Integrations and a lot of these 624 00:24:31,980 --> 00:24:36,240 packages that I'll mention here are 625 00:24:33,419 --> 00:24:38,760 built on webgl 626 00:24:36,240 --> 00:24:41,159 um so I've already spoken to Pi Vista 627 00:24:38,760 --> 00:24:43,260 that's the image shown in the top left 628 00:24:41,159 --> 00:24:44,760 um it's had a Jupiter extension for a 629 00:24:43,260 --> 00:24:47,520 while 630 00:24:44,760 --> 00:24:51,179 um there's IPI volume which lets you do 631 00:24:47,520 --> 00:24:52,919 a bunch of interesting 3D rendering 632 00:24:51,179 --> 00:24:54,900 um in Jupiter one thing that's 633 00:24:52,919 --> 00:24:57,000 particularly cool about this ipy volume 634 00:24:54,900 --> 00:24:59,400 packages it's it's one of the few 635 00:24:57,000 --> 00:25:03,539 packages that lets you programmatically 636 00:24:59,400 --> 00:25:06,240 from the python side save the um offline 637 00:25:03,539 --> 00:25:08,400 videos or screenshots of your renders so 638 00:25:06,240 --> 00:25:10,140 most of these browser-based data 639 00:25:08,400 --> 00:25:12,720 visualization packages they may have 640 00:25:10,140 --> 00:25:15,000 buttons on the JavaScript side to let 641 00:25:12,720 --> 00:25:16,860 you save a screenshot of what you're 642 00:25:15,000 --> 00:25:18,840 currently seeing but traditionally 643 00:25:16,860 --> 00:25:20,460 that's been quite complicated to do from 644 00:25:18,840 --> 00:25:22,080 the python side because it's hard for 645 00:25:20,460 --> 00:25:24,299 your python script to know what state 646 00:25:22,080 --> 00:25:26,039 the browser is in whether it's finished 647 00:25:24,299 --> 00:25:28,919 rendering one of the frames of your 648 00:25:26,039 --> 00:25:31,080 animation or not but I probably iPad 649 00:25:28,919 --> 00:25:33,480 volume does a bunch of clever tricks to 650 00:25:31,080 --> 00:25:35,279 make that work so I have used it before 651 00:25:33,480 --> 00:25:38,100 and you can use it to you know save 652 00:25:35,279 --> 00:25:40,679 still images to save animated gifs to 653 00:25:38,100 --> 00:25:42,720 save MP4 video files so it's very cool 654 00:25:40,679 --> 00:25:44,880 for that I think and it's a fairly 655 00:25:42,720 --> 00:25:47,640 straightforward API 656 00:25:44,880 --> 00:25:49,320 um there's also k3d Jupiter which is 657 00:25:47,640 --> 00:25:51,840 built on webgl I think it might have 658 00:25:49,320 --> 00:25:53,520 bindings to that vtk as well I'm not so 659 00:25:51,840 --> 00:25:55,500 familiar with that but they do have a 660 00:25:53,520 --> 00:25:58,260 bunch of very cool demos 661 00:25:55,500 --> 00:26:01,260 there's Pi 3js so for those who are not 662 00:25:58,260 --> 00:26:04,320 familiar 3js is uh is a higher level 663 00:26:01,260 --> 00:26:06,779 Graphics API in JavaScript built over 664 00:26:04,320 --> 00:26:09,419 webgl kind of more intended for games 665 00:26:06,779 --> 00:26:11,820 development and real-time simulations 666 00:26:09,419 --> 00:26:14,340 and that and it has abstractions for 667 00:26:11,820 --> 00:26:16,860 dealing with camera motions and and 668 00:26:14,340 --> 00:26:18,659 animations and reading characters and 669 00:26:16,860 --> 00:26:20,159 that so not traditional data 670 00:26:18,659 --> 00:26:22,679 visualization but if you want to do 671 00:26:20,159 --> 00:26:25,799 something that's more of an interactive 672 00:26:22,679 --> 00:26:28,140 3D World in a browser then that might be 673 00:26:25,799 --> 00:26:30,539 a potential interest to you and yeah Pi 674 00:26:28,140 --> 00:26:32,059 3js is just a very level kind of low 675 00:26:30,539 --> 00:26:36,000 level 676 00:26:32,059 --> 00:26:38,100 python it Maps very directly to the 3Gs 677 00:26:36,000 --> 00:26:40,500 functions anyway 678 00:26:38,100 --> 00:26:43,320 and just a couple more quickly we have 679 00:26:40,500 --> 00:26:45,840 Pi DAC which is the python bindings for 680 00:26:43,320 --> 00:26:47,340 the deck GL JavaScript library if you 681 00:26:45,840 --> 00:26:51,240 haven't seen this before so this does 682 00:26:47,340 --> 00:26:53,039 some very cool geospatial animations and 683 00:26:51,240 --> 00:26:57,179 effects it works with Factor tiles but 684 00:26:53,039 --> 00:26:59,880 allows you to render 3D meshes and 685 00:26:57,179 --> 00:27:02,840 structures over them this is just one 686 00:26:59,880 --> 00:27:06,000 demo that's the UK plot with the 687 00:27:02,840 --> 00:27:08,340 hexagons over the UK 688 00:27:06,000 --> 00:27:10,740 and lastly I'll mention yeah plotly 689 00:27:08,340 --> 00:27:12,419 which is one of the biggest and best 690 00:27:10,740 --> 00:27:14,340 known 691 00:27:12,419 --> 00:27:17,159 sort of javascript-based visualization 692 00:27:14,340 --> 00:27:19,860 packages also has a subset of its API 693 00:27:17,159 --> 00:27:22,080 that does 3D plots 694 00:27:19,860 --> 00:27:24,659 probably more on the traditional side 695 00:27:22,080 --> 00:27:26,700 but it lets you gives you controls to 696 00:27:24,659 --> 00:27:30,740 Pivot around them and zoom them just 697 00:27:26,700 --> 00:27:30,740 like you can most of the 2D plotly plots 698 00:27:31,200 --> 00:27:37,320 cool so I'm almost at the end so for any 699 00:27:34,580 --> 00:27:38,940 further reading watching listening that 700 00:27:37,320 --> 00:27:41,039 you might be interested in I mentioned 701 00:27:38,940 --> 00:27:43,679 that I'm a huge fan of Jake van 702 00:27:41,039 --> 00:27:47,100 implass's materials and talks so that 703 00:27:43,679 --> 00:27:49,620 was the talk that he gave six years ago 704 00:27:47,100 --> 00:27:51,480 now at pycon us the python visualization 705 00:27:49,620 --> 00:27:53,940 landscape which was the inspiration for 706 00:27:51,480 --> 00:27:56,220 my own talk despite it being six years 707 00:27:53,940 --> 00:27:57,659 old it still holds up really really well 708 00:27:56,220 --> 00:28:00,299 pretty much all the visualization 709 00:27:57,659 --> 00:28:02,100 packages he speaks to back then are 710 00:28:00,299 --> 00:28:04,620 still alive and well and heavily used 711 00:28:02,100 --> 00:28:06,000 these days so that's really great and 712 00:28:04,620 --> 00:28:07,559 another one of his talks that I 713 00:28:06,000 --> 00:28:09,600 particularly liked was how to think 714 00:28:07,559 --> 00:28:11,640 about data visualization and this is 715 00:28:09,600 --> 00:28:13,919 less Tech focused but it's more about 716 00:28:11,640 --> 00:28:16,799 how do you compose good data 717 00:28:13,919 --> 00:28:19,200 visualizations and and how do you use 718 00:28:16,799 --> 00:28:21,000 elements of visualizations the in the 719 00:28:19,200 --> 00:28:23,400 most effective way to convey your 720 00:28:21,000 --> 00:28:25,559 message and to present the data as 721 00:28:23,400 --> 00:28:29,039 neatly as possible so I think they're 722 00:28:25,559 --> 00:28:31,140 great for a short kind of online ebook 723 00:28:29,039 --> 00:28:33,120 or reading there's the python in openg 724 00:28:31,140 --> 00:28:35,580 jail for scientific visualization 725 00:28:33,120 --> 00:28:37,860 believe this is by the same author of 726 00:28:35,580 --> 00:28:40,260 that glum player package once again it's 727 00:28:37,860 --> 00:28:42,240 a few years old but it still covers a 728 00:28:40,260 --> 00:28:44,159 lot of this 3D Concepts that I've spoken 729 00:28:42,240 --> 00:28:46,320 about and Dives a bit deeper into them 730 00:28:44,159 --> 00:28:49,500 if you're interested in getting into the 731 00:28:46,320 --> 00:28:52,620 weeds a little bit more with them 732 00:28:49,500 --> 00:28:54,480 um yeah I've mentioned heaps of pretty 733 00:28:52,620 --> 00:28:57,179 cool looking 3D visualization packages 734 00:28:54,480 --> 00:28:58,140 but as I said as a starting point I 735 00:28:57,179 --> 00:29:00,240 would probably recommend checking out 736 00:28:58,140 --> 00:29:01,919 that pie Vista first if you're new to 737 00:29:00,240 --> 00:29:04,559 this domain as I think that has one of 738 00:29:01,919 --> 00:29:06,539 the best kind of onboarding experiences 739 00:29:04,559 --> 00:29:08,520 for new developers and because it just 740 00:29:06,539 --> 00:29:11,580 covers such a breath for possible use 741 00:29:08,520 --> 00:29:14,100 cases for you and it's the last thing I 742 00:29:11,580 --> 00:29:15,480 mentioned that's not specific not to do 743 00:29:14,100 --> 00:29:16,860 anything particularly with data 744 00:29:15,480 --> 00:29:18,419 visualization but if you're interested 745 00:29:16,860 --> 00:29:20,640 in looking at shaders and what's 746 00:29:18,419 --> 00:29:23,340 possible with them check out the Shader 747 00:29:20,640 --> 00:29:24,960 toy website so this site is a huge 748 00:29:23,340 --> 00:29:27,240 collection of these different Shader 749 00:29:24,960 --> 00:29:29,760 functions and they can do these amazing 750 00:29:27,240 --> 00:29:31,740 3D renders that update dynamically in 751 00:29:29,760 --> 00:29:34,740 your browser and um it's pretty cool 752 00:29:31,740 --> 00:29:34,740 ecosystem 753 00:29:35,960 --> 00:29:40,500 so yeah I'm pretty much at the end so 754 00:29:38,760 --> 00:29:42,179 just to summarize if you are thinking 755 00:29:40,500 --> 00:29:43,740 about doing 3D rendering and 756 00:29:42,179 --> 00:29:46,200 visualization make sure the properties 757 00:29:43,740 --> 00:29:48,720 of 3D rendering suit the sort of message 758 00:29:46,200 --> 00:29:50,580 and data that you want to convey so that 759 00:29:48,720 --> 00:29:54,059 the features of it are working for you 760 00:29:50,580 --> 00:29:56,399 not against you and out of all that big 761 00:29:54,059 --> 00:29:58,080 selection of packages I've shown you 762 00:29:56,399 --> 00:30:00,539 some things to think about when you go 763 00:29:58,080 --> 00:30:01,919 to choose one or other of them is think 764 00:30:00,539 --> 00:30:04,320 about whether they support doing 765 00:30:01,919 --> 00:30:05,880 pre-rendered visuals if that's your aim 766 00:30:04,320 --> 00:30:08,159 to like include them in a presentation 767 00:30:05,880 --> 00:30:10,440 or a talk or whether you want to have 768 00:30:08,159 --> 00:30:13,140 interactive 3D visualizations because 769 00:30:10,440 --> 00:30:14,460 that's a different set of libraries also 770 00:30:13,140 --> 00:30:16,140 think about your deployment story 771 00:30:14,460 --> 00:30:18,140 whether you're deploying to a desktop 772 00:30:16,140 --> 00:30:21,120 application or whether it has to be 773 00:30:18,140 --> 00:30:22,640 browser-based and lastly think about the 774 00:30:21,120 --> 00:30:24,840 kind of scale and performance 775 00:30:22,640 --> 00:30:27,720 requirements if you need to render a 776 00:30:24,840 --> 00:30:30,179 scene that's particularly realistic or 777 00:30:27,720 --> 00:30:31,799 just has very complicated 3D geometry 778 00:30:30,179 --> 00:30:34,919 you might be inclined to look more at 779 00:30:31,799 --> 00:30:38,059 those packages that type closer to the 780 00:30:34,919 --> 00:30:40,679 the newer 3D platform apis 781 00:30:38,059 --> 00:30:42,539 and that's it thank you very much for 782 00:30:40,679 --> 00:30:44,960 listening if there's time I'm happy to 783 00:30:42,539 --> 00:30:44,960 take questions 784 00:30:46,380 --> 00:30:51,299 thank you Warren very good we don't have 785 00:30:48,779 --> 00:30:53,159 time for questions but we do have the 786 00:30:51,299 --> 00:30:54,899 Discord Channel you can pop some 787 00:30:53,159 --> 00:30:56,640 questions there and then if you can log 788 00:30:54,899 --> 00:30:59,100 in and answer the questions and 789 00:30:56,640 --> 00:31:01,380 obviously you can hang around in in the 790 00:30:59,100 --> 00:31:04,440 aisles and ask questions so and thank 791 00:31:01,380 --> 00:31:07,140 you and here's a Morgan uh thank you 792 00:31:04,440 --> 00:31:09,760 note for the conference all right so 793 00:31:07,140 --> 00:31:15,470 we'll be back in 10 minutes 794 00:31:09,760 --> 00:31:15,470 [Applause]