{ "cells": [ { "cell_type": "markdown", "id": "2fbe4b8a", "metadata": {}, "source": [ "## Rendering with serialized assets\n", "\n", "This example explains how to render images with the serialized assets." ] }, { "cell_type": "code", "execution_count": 1, "id": "3acc780c", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:23.371690Z", "iopub.status.busy": "2021-10-22T11:33:23.370967Z", "iopub.status.idle": "2021-10-22T11:33:23.462005Z", "shell.execute_reply": "2021-10-22T11:33:23.462436Z" } }, "outputs": [], "source": [ "import lmenv\n", "env = lmenv.load('.lmenv')" ] }, { "cell_type": "code", "execution_count": 2, "id": "e60e1a8e", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:23.465986Z", "iopub.status.busy": "2021-10-22T11:33:23.464845Z", "iopub.status.idle": "2021-10-22T11:33:23.676111Z", "shell.execute_reply": "2021-10-22T11:33:23.675679Z" } }, "outputs": [], "source": [ "import os\n", "import traceback\n", "import numpy as np\n", "import imageio\n", "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "import lightmetrica as lm\n", "%load_ext lightmetrica_jupyter" ] }, { "cell_type": "code", "execution_count": 3, "id": "6ca8f03f", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:23.680595Z", "iopub.status.busy": "2021-10-22T11:33:23.680072Z", "iopub.status.idle": "2021-10-22T11:33:23.682599Z", "shell.execute_reply": "2021-10-22T11:33:23.682972Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|0.000] Lightmetrica -- Version 3.0.0 (rev. 70601db) Linux x64\n" ] } ], "source": [ "lm.init()\n", "lm.log.init('jupyter')\n", "lm.progress.init('jupyter')\n", "lm.info()" ] }, { "cell_type": "code", "execution_count": 4, "id": "073544ad", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:23.686616Z", "iopub.status.busy": "2021-10-22T11:33:23.685129Z", "iopub.status.idle": "2021-10-22T11:33:23.688553Z", "shell.execute_reply": "2021-10-22T11:33:23.688170Z" } }, "outputs": [], "source": [ "if not lm.Release:\n", " lm.debug.attach_to_debugger()" ] }, { "cell_type": "markdown", "id": "7858ecb8", "metadata": {}, "source": [ "### Visualizing asset tree\n", "\n", "An asset can hold another assets in the instance. As a result, a created set of asset can constitute of an *asset tree*. We can visualize the structure of the tree using ``lm.debug.print_asset_tree()`` function." ] }, { "cell_type": "code", "execution_count": 5, "id": "a9b0dbd8", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:23.693964Z", "iopub.status.busy": "2021-10-22T11:33:23.692805Z", "iopub.status.idle": "2021-10-22T11:33:23.695865Z", "shell.execute_reply": "2021-10-22T11:33:23.695464Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|0.012] Loading asset [name='accel']\n", "[I|0.012] Loading asset [name='scene']\n" ] } ], "source": [ "accel = lm.load_accel('accel', 'sahbvh')\n", "scene = lm.load_scene('scene', 'default', accel=accel)" ] }, { "cell_type": "code", "execution_count": 6, "id": "da482636", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:23.699662Z", "iopub.status.busy": "2021-10-22T11:33:23.698954Z", "iopub.status.idle": "2021-10-22T11:33:23.701785Z", "shell.execute_reply": "2021-10-22T11:33:23.702128Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|0.019] $.assets\n", "[I|0.020] .. .accel [accel::sahbvh]\n", "[I|0.020] .. .scene [scene::default]\n" ] } ], "source": [ "lm.debug.print_asset_tree()" ] }, { "cell_type": "code", "execution_count": 7, "id": "71f32cb0", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:23.706119Z", "iopub.status.busy": "2021-10-22T11:33:23.705645Z", "iopub.status.idle": "2021-10-22T11:33:23.707896Z", "shell.execute_reply": "2021-10-22T11:33:23.708269Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|0.026] $.assets\n" ] } ], "source": [ "# Clear the internal state\n", "lm.reset()\n", "lm.debug.print_asset_tree()" ] }, { "cell_type": "markdown", "id": "fb310051", "metadata": {}, "source": [ "### Asset group\n", "\n", "*Asset group* is a special type of asset that can hold multiple instance of assets. By means of the asset group, we can hierarchcally manage the assets. Asset group can be created by ``lm.load_asset_group()`` function." ] }, { "cell_type": "code", "execution_count": 8, "id": "dca34866", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:23.711931Z", "iopub.status.busy": "2021-10-22T11:33:23.711439Z", "iopub.status.idle": "2021-10-22T11:33:23.715469Z", "shell.execute_reply": "2021-10-22T11:33:23.715094Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|0.032] Loading asset [name='fireplace_room']\n" ] } ], "source": [ "g = lm.load_asset_group('fireplace_room', 'default')" ] }, { "cell_type": "markdown", "id": "019aad1d", "metadata": {}, "source": [ "An another asset can be loaded as a child of the asset group by calling ``lm.AssetGroup.load_*()`` member functions. The arguments are same as ``lm.load_*()`` functions. Note that the locator of the asset includes the id of the group." ] }, { "cell_type": "code", "execution_count": 9, "id": "c94b9481", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:24.873119Z", "iopub.status.busy": "2021-10-22T11:33:24.225878Z", "iopub.status.idle": "2021-10-22T11:33:24.876253Z", "shell.execute_reply": "2021-10-22T11:33:24.876635Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|0.041] Loading asset [name='camera1']\n", "[I|0.041] Loading asset [name='model']\n", "[I|0.041] .. Loading OBJ file [path='fireplace_room.obj']\n", "[I|0.041] .. Loading MTL file [path='fireplace_room.mtl']\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "[I|0.367] .. Loading texture [path='wood.ppm']\n", "[I|0.457] .. Loading texture [path='leaf.ppm']\n", "[I|0.459] .. Loading texture [path='picture8.ppm']\n", "[I|0.491] .. Loading texture [path='wood5.ppm']\n", "[I|0.543] Loading asset [name='accel']\n", "[I|0.543] Loading asset [name='scene']\n", "[I|0.546] Building acceleration structure [name='accel']\n", "[I|0.546] .. Flattening scene\n", "[I|0.574] .. Building\n" ] } ], "source": [ "camera = g.load_camera('camera1', 'pinhole', \n", " position=[5.101118, 1.083746, -2.756308],\n", " center=[4.167568, 1.078925, -2.397892],\n", " up=[0,1,0],\n", " vfov=43.001194,\n", " aspect=16/9)\n", "model = g.load_model('model', 'wavefrontobj',\n", " path=os.path.join(env.scene_path, 'fireplace_room/fireplace_room.obj'))\n", "accel = g.load_accel('accel', 'sahbvh')\n", "scene = g.load_scene('scene', 'default', accel=accel)\n", "scene.add_primitive(camera=camera)\n", "scene.add_primitive(model=model)\n", "scene.build()" ] }, { "cell_type": "code", "execution_count": 10, "id": "ed9d3a49", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:24.882430Z", "iopub.status.busy": "2021-10-22T11:33:24.881730Z", "iopub.status.idle": "2021-10-22T11:33:24.896634Z", "shell.execute_reply": "2021-10-22T11:33:24.896211Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|1.200] $.assets\n", "[I|1.200] .. .fireplace_room [asset_group::default]\n", "[I|1.201] .... .camera1 [camera::pinhole]\n", "[I|1.201] .... .model [model::wavefrontobj]\n", "[I|1.201] ...... .grey_and_white_room:BottleCap [material::mixture_wavefrontobj]\n", "[I|1.201] ........ .diffuse [material::diffuse]\n", "[I|1.201] ........ .glossy [material::glossy]\n", "[I|1.201] ...... .grey_and_white_room:Branches [material::mixture_wavefrontobj]\n", "[I|1.201] ........ .diffuse [material::diffuse]\n", "[I|1.201] ........ .glossy [material::glossy]\n", "[I|1.201] ...... .grey_and_white_room:BrushedStainlessSteel [material::mixture_wavefrontobj]\n", "[I|1.201] ........ .diffuse [material::diffuse]\n", "[I|1.201] ........ .glossy [material::glossy]\n", "[I|1.201] ...... .grey_and_white_room:Dirt [material::mixture_wavefrontobj]\n", "[I|1.201] ........ .diffuse [material::diffuse]\n", "[I|1.202] ........ .glossy [material::glossy]\n", "[I|1.202] ...... .grey_and_white_room:FireplaceGlass [material::mixture_wavefrontobj]\n", "[I|1.202] ........ .diffuse [material::diffuse]\n", "[I|1.202] ........ .glossy [material::glossy]\n", "[I|1.202] ...... .texture_textures\\wood [texture::bitmap]\n", "[I|1.202] ...... .grey_and_white_room:Floor [material::mixture_wavefrontobj]\n", "[I|1.202] ........ .diffuse [material::diffuse]\n", "[I|1.202] ........ .glossy [material::glossy]\n", "[I|1.202] ...... .grey_and_white_room:Glass [material::glass]\n", "[I|1.202] ...... .texture_textures\\leaf [texture::bitmap]\n", "[I|1.202] ...... .grey_and_white_room:Leaves [material::mixture_wavefrontobj]\n", "[I|1.202] ........ .diffuse [material::diffuse]\n", "[I|1.202] ........ .glossy [material::glossy]\n", "[I|1.202] ...... .grey_and_white_room:MattePaint [material::mixture_wavefrontobj]\n", "[I|1.202] ........ .diffuse [material::diffuse]\n", "[I|1.202] ........ .glossy [material::glossy]\n", "[I|1.202] ...... .grey_and_white_room:Mirror [material::mirror]\n", "[I|1.202] ...... .texture_textures\\picture8 [texture::bitmap]\n", "[I|1.202] ...... .grey_and_white_room:Painting [material::mixture_wavefrontobj]\n", "[I|1.202] ........ .diffuse [material::diffuse]\n", "[I|1.202] ........ .glossy [material::glossy]\n", "[I|1.202] ...... .grey_and_white_room:PaintingBack [material::mixture_wavefrontobj]\n", "[I|1.202] ........ .diffuse [material::diffuse]\n", "[I|1.202] ........ .glossy [material::glossy]\n", "[I|1.202] ...... .grey_and_white_room:Paneling [material::mixture_wavefrontobj]\n", "[I|1.202] ........ .diffuse [material::diffuse]\n", "[I|1.203] ........ .glossy [material::glossy]\n", "[I|1.205] ...... .grey_and_white_room:PlantPot [material::mixture_wavefrontobj]\n", "[I|1.205] ........ .diffuse [material::diffuse]\n", "[I|1.205] ........ .glossy [material::glossy]\n", "[I|1.205] ...... .grey_and_white_room:Sofa [material::mixture_wavefrontobj]\n", "[I|1.206] ........ .diffuse [material::diffuse]\n", "[I|1.206] ........ .glossy [material::glossy]\n", "[I|1.206] ...... .grey_and_white_room:SofaLegs [material::mixture_wavefrontobj]\n", "[I|1.206] ........ .diffuse [material::diffuse]\n", "[I|1.206] ........ .glossy [material::glossy]\n", "[I|1.206] ...... .texture_textures\\wood5 [texture::bitmap]\n", "[I|1.206] ...... .grey_and_white_room:TableWood [material::mixture_wavefrontobj]\n", "[I|1.206] ........ .diffuse [material::diffuse]\n", "[I|1.206] ........ .glossy [material::glossy]\n", "[I|1.206] ...... .grey_and_white_room:Transluscent [material::mixture_wavefrontobj]\n", "[I|1.206] ........ .diffuse [material::diffuse]\n", "[I|1.206] ........ .glossy [material::glossy]\n", "[I|1.206] ...... .grey_and_white_room:Walls [material::mixture_wavefrontobj]\n", "[I|1.206] ........ .diffuse [material::diffuse]\n", "[I|1.206] ........ .glossy [material::glossy]\n", "[I|1.206] ...... .grey_and_white_room:initialShadingGroup [material::mixture_wavefrontobj]\n", "[I|1.206] ........ .diffuse [material::diffuse]\n", "[I|1.206] ........ .glossy [material::glossy]\n", "[I|1.206] ...... .grey_and_white_room:lambert2SG_light [material::mixture_wavefrontobj]\n", "[I|1.206] ........ .diffuse [material::diffuse]\n", "[I|1.206] ........ .glossy [material::glossy]\n", "[I|1.206] ...... .lambert3SG [material::mixture_wavefrontobj]\n", "[I|1.206] ........ .diffuse [material::diffuse]\n", "[I|1.206] ........ .glossy [material::glossy]\n", "[I|1.206] ...... .mesh_26 [mesh::wavefrontobj_ref]\n", "[I|1.206] ...... .mesh_27 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_28 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_29 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_30 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_31 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_32 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_33 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_34 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_35 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_36 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_37 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_38 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_39 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_40 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_41 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_42 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_43 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_44 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_45 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_46 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_47 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_48 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_49 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_50 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_51 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_52 [mesh::wavefrontobj_ref]\n", "[I|1.207] ...... .mesh_53 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_54 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_55 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_56 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_57 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_58 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_59 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_60 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_61 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_62 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_63 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_64 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_65 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_66 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_67 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_68 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_69 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_70 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_71 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_72 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_73 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_73_light [light::area]\n", "[I|1.208] ...... .mesh_75 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_75_light [light::area]\n", "[I|1.208] ...... .mesh_77 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_77_light [light::area]\n", "[I|1.208] ...... .mesh_79 [mesh::wavefrontobj_ref]\n", "[I|1.208] ...... .mesh_79_light [light::area]\n", "[I|1.209] .... .accel [accel::sahbvh]\n", "[I|1.209] .... .scene [scene::default]\n" ] } ], "source": [ "lm.debug.print_asset_tree()" ] }, { "cell_type": "markdown", "id": "10de87d9", "metadata": {}, "source": [ "### Serialization of asset" ] }, { "cell_type": "markdown", "id": "7c5890f2", "metadata": {}, "source": [ "An asset can be serialized into a disk as a binary stream. For instance, it is useful to accelerate the loading time of the assets in debug mode or in the repetitive experiments, since we can skip the precomputation along with loading of the asset.\n", "\n", "Serialization to a file can be done by ``lm.Component.save_to_file()`` function. We give the path to the output file as an argument." ] }, { "cell_type": "code", "execution_count": 11, "id": "f673850f", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:25.216717Z", "iopub.status.busy": "2021-10-22T11:33:25.216197Z", "iopub.status.idle": "2021-10-22T11:33:25.219932Z", "shell.execute_reply": "2021-10-22T11:33:25.219519Z" } }, "outputs": [], "source": [ "g.save_to_file('fireplace_room.serialized')" ] }, { "cell_type": "code", "execution_count": 12, "id": "981d3115", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:25.228818Z", "iopub.status.busy": "2021-10-22T11:33:25.228139Z", "iopub.status.idle": "2021-10-22T11:33:25.233109Z", "shell.execute_reply": "2021-10-22T11:33:25.232705Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|1.549] $.assets\n" ] } ], "source": [ "# Reset the internal state\n", "lm.reset()\n", "lm.debug.print_asset_tree()" ] }, { "cell_type": "markdown", "id": "687f73b9", "metadata": {}, "source": [ "Note that serializing aseet group means serializing a subtree of the entire asset tree. The serialization process can fail if an asset being serialized (incl. child assets) contains external reference out of the subtree. " ] }, { "cell_type": "code", "execution_count": 13, "id": "0df7ee08", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:25.238035Z", "iopub.status.busy": "2021-10-22T11:33:25.237593Z", "iopub.status.idle": "2021-10-22T11:33:25.242164Z", "shell.execute_reply": "2021-10-22T11:33:25.241552Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|1.557] Loading asset [name='accel']\n", "[I|1.558] Loading asset [name='fireplace_room']\n", "[I|1.558] Loading asset [name='scene']\n", "[I|1.558] $.assets\n", "[I|1.558] .. .accel [accel::sahbvh]\n", "[I|1.558] .. .fireplace_room [asset_group::default]\n", "[I|1.558] .... .scene [scene::default]\n" ] } ], "source": [ "accel = lm.load_accel('accel', 'sahbvh')\n", "g = lm.load_asset_group('fireplace_room', 'default')\n", "scene = g.load_scene('scene', 'default', accel=accel)\n", "lm.debug.print_asset_tree()" ] }, { "cell_type": "code", "execution_count": 14, "id": "48676750", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:25.246380Z", "iopub.status.busy": "2021-10-22T11:33:25.245774Z", "iopub.status.idle": "2021-10-22T11:33:25.248582Z", "shell.execute_reply": "2021-10-22T11:33:25.248184Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Traceback (most recent call last):\n", " File \"/tmp/ipykernel_206/1972952766.py\", line 4, in \n", " g.save_to_file('failed.serialized')\n", "pylm.Exception: Unserializable asset. Subtree contains a reference to the outer asset. [loc='$.assets.accel'] [err='Unsupported']\n" ] } ], "source": [ "# Serialization will fail because\n", "# accel is out of the subtree starting from g as a root.\n", "try:\n", " g.save_to_file('failed.serialized')\n", "except Exception:\n", " traceback.print_exc()" ] }, { "cell_type": "code", "execution_count": 15, "id": "45fc1ba0", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:25.252093Z", "iopub.status.busy": "2021-10-22T11:33:25.251621Z", "iopub.status.idle": "2021-10-22T11:33:25.253856Z", "shell.execute_reply": "2021-10-22T11:33:25.254235Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|1.572] $.assets\n" ] } ], "source": [ "# Reset the internal state\n", "lm.reset()\n", "lm.debug.print_asset_tree()" ] }, { "cell_type": "markdown", "id": "ed563f71", "metadata": {}, "source": [ "### Loading serialized asset\n", "\n", "The serialized asset can be loaded by ``lm.load_serialized()`` funcction, where the first argument specifies the id of the asset and the second argument specifies the path to the serialized asset. Note that the id of the asset can be not always the same from the original asset before serialization." ] }, { "cell_type": "code", "execution_count": 16, "id": "775b645c", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:25.541805Z", "iopub.status.busy": "2021-10-22T11:33:25.538767Z", "iopub.status.idle": "2021-10-22T11:33:25.545523Z", "shell.execute_reply": "2021-10-22T11:33:25.545915Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|1.578] Loading serialized asset [name='fireplace_room']\n" ] }, { "data": { "text/plain": [ "" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "lm.load_serialized('fireplace_room', 'fireplace_room.serialized')" ] }, { "cell_type": "code", "execution_count": 17, "id": "8a7fec92", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:25.548991Z", "iopub.status.busy": "2021-10-22T11:33:25.548327Z", "iopub.status.idle": "2021-10-22T11:33:25.569115Z", "shell.execute_reply": "2021-10-22T11:33:25.569723Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|1.871] $.assets\n", "[I|1.871] .. .fireplace_room [asset_group::default]\n", "[I|1.871] .... .camera1 [camera::pinhole]\n", "[I|1.871] .... .model [model::wavefrontobj]\n", "[I|1.871] ...... .grey_and_white_room:BottleCap [material::mixture_wavefrontobj]\n", "[I|1.871] ........ .diffuse [material::diffuse]\n", "[I|1.871] ........ .glossy [material::glossy]\n", "[I|1.871] ...... .grey_and_white_room:Branches [material::mixture_wavefrontobj]\n", "[I|1.871] ........ .diffuse [material::diffuse]\n", "[I|1.871] ........ .glossy [material::glossy]\n", "[I|1.871] ...... .grey_and_white_room:BrushedStainlessSteel [material::mixture_wavefrontobj]\n", "[I|1.871] ........ .diffuse [material::diffuse]\n", "[I|1.871] ........ .glossy [material::glossy]\n", "[I|1.871] ...... .grey_and_white_room:Dirt [material::mixture_wavefrontobj]\n", "[I|1.871] ........ .diffuse [material::diffuse]\n", "[I|1.871] ........ .glossy [material::glossy]\n", "[I|1.871] ...... .grey_and_white_room:FireplaceGlass [material::mixture_wavefrontobj]\n", "[I|1.871] ........ .diffuse [material::diffuse]\n", "[I|1.871] ........ .glossy [material::glossy]\n", "[I|1.871] ...... .texture_textures\\wood [texture::bitmap]\n", "[I|1.872] ...... .grey_and_white_room:Floor [material::mixture_wavefrontobj]\n", "[I|1.872] ........ .diffuse [material::diffuse]\n", "[I|1.874] ........ .glossy [material::glossy]\n", "[I|1.874] ...... .grey_and_white_room:Glass [material::glass]\n", "[I|1.874] ...... .texture_textures\\leaf [texture::bitmap]\n", "[I|1.874] ...... .grey_and_white_room:Leaves [material::mixture_wavefrontobj]\n", "[I|1.874] ........ .diffuse [material::diffuse]\n", "[I|1.874] ........ .glossy [material::glossy]\n", "[I|1.874] ...... .grey_and_white_room:MattePaint [material::mixture_wavefrontobj]\n", "[I|1.874] ........ .diffuse [material::diffuse]\n", "[I|1.874] ........ .glossy [material::glossy]\n", "[I|1.874] ...... .grey_and_white_room:Mirror [material::mirror]\n", "[I|1.874] ...... .texture_textures\\picture8 [texture::bitmap]\n", "[I|1.874] ...... .grey_and_white_room:Painting [material::mixture_wavefrontobj]\n", "[I|1.874] ........ .diffuse [material::diffuse]\n", "[I|1.874] ........ .glossy [material::glossy]\n", "[I|1.874] ...... .grey_and_white_room:PaintingBack [material::mixture_wavefrontobj]\n", "[I|1.874] ........ .diffuse [material::diffuse]\n", "[I|1.874] ........ .glossy [material::glossy]\n", "[I|1.874] ...... .grey_and_white_room:Paneling [material::mixture_wavefrontobj]\n", "[I|1.874] ........ .diffuse [material::diffuse]\n", "[I|1.875] ........ .glossy [material::glossy]\n", "[I|1.875] ...... .grey_and_white_room:PlantPot [material::mixture_wavefrontobj]\n", "[I|1.875] ........ .diffuse [material::diffuse]\n", "[I|1.875] ........ .glossy [material::glossy]\n", "[I|1.875] ...... .grey_and_white_room:Sofa [material::mixture_wavefrontobj]\n", "[I|1.877] ........ .diffuse [material::diffuse]\n", "[I|1.877] ........ .glossy [material::glossy]\n", "[I|1.877] ...... .grey_and_white_room:SofaLegs [material::mixture_wavefrontobj]\n", "[I|1.877] ........ .diffuse [material::diffuse]\n", "[I|1.877] ........ .glossy [material::glossy]\n", "[I|1.877] ...... .texture_textures\\wood5 [texture::bitmap]\n", "[I|1.877] ...... .grey_and_white_room:TableWood [material::mixture_wavefrontobj]\n", "[I|1.877] ........ .diffuse [material::diffuse]\n", "[I|1.877] ........ .glossy [material::glossy]\n", "[I|1.877] ...... .grey_and_white_room:Transluscent [material::mixture_wavefrontobj]\n", "[I|1.877] ........ .diffuse [material::diffuse]\n", "[I|1.877] ........ .glossy [material::glossy]\n", "[I|1.877] ...... .grey_and_white_room:Walls [material::mixture_wavefrontobj]\n", "[I|1.877] ........ .diffuse [material::diffuse]\n", "[I|1.877] ........ .glossy [material::glossy]\n", "[I|1.877] ...... .grey_and_white_room:initialShadingGroup [material::mixture_wavefrontobj]\n", "[I|1.877] ........ .diffuse [material::diffuse]\n", "[I|1.877] ........ .glossy [material::glossy]\n", "[I|1.877] ...... .grey_and_white_room:lambert2SG_light [material::mixture_wavefrontobj]\n", "[I|1.877] ........ .diffuse [material::diffuse]\n", "[I|1.877] ........ .glossy [material::glossy]\n", "[I|1.878] ...... .lambert3SG [material::mixture_wavefrontobj]\n", "[I|1.878] ........ .diffuse [material::diffuse]\n", "[I|1.878] ........ .glossy [material::glossy]\n", "[I|1.878] ...... .mesh_26 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_27 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_28 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_29 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_30 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_31 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_32 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_33 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_34 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_35 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_36 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_37 [mesh::wavefrontobj_ref]\n", "[I|1.878] ...... .mesh_38 [mesh::wavefrontobj_ref]\n", "[I|1.881] ...... .mesh_39 [mesh::wavefrontobj_ref]\n", "[I|1.881] ...... .mesh_40 [mesh::wavefrontobj_ref]\n", "[I|1.881] ...... .mesh_41 [mesh::wavefrontobj_ref]\n", "[I|1.881] ...... .mesh_42 [mesh::wavefrontobj_ref]\n", "[I|1.881] ...... .mesh_43 [mesh::wavefrontobj_ref]\n", "[I|1.881] ...... .mesh_44 [mesh::wavefrontobj_ref]\n", "[I|1.881] ...... .mesh_45 [mesh::wavefrontobj_ref]\n", "[I|1.881] ...... .mesh_46 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_47 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_48 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_49 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_50 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_51 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_52 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_53 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_54 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_55 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_56 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_57 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_58 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_59 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_60 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_61 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_62 [mesh::wavefrontobj_ref]\n", "[I|1.882] ...... .mesh_63 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_64 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_65 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_66 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_67 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_68 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_69 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_70 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_71 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_72 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_73 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_73_light [light::area]\n", "[I|1.885] ...... .mesh_75 [mesh::wavefrontobj_ref]\n", "[I|1.885] ...... .mesh_75_light [light::area]\n", "[I|1.885] ...... .mesh_77 [mesh::wavefrontobj_ref]\n", "[I|1.886] ...... .mesh_77_light [light::area]\n", "[I|1.886] ...... .mesh_79 [mesh::wavefrontobj_ref]\n", "[I|1.886] ...... .mesh_79_light [light::area]\n", "[I|1.886] .... .accel [accel::sahbvh]\n", "[I|1.886] .... .scene [scene::default]\n" ] } ], "source": [ "lm.debug.print_asset_tree()" ] }, { "cell_type": "code", "execution_count": 18, "id": "3d8c1750", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:25.577847Z", "iopub.status.busy": "2021-10-22T11:33:25.577367Z", "iopub.status.idle": "2021-10-22T11:33:25.581947Z", "shell.execute_reply": "2021-10-22T11:33:25.582309Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|1.898] $.assets\n" ] } ], "source": [ "# Reset the internal state\n", "lm.reset()\n", "lm.debug.print_asset_tree()" ] }, { "cell_type": "markdown", "id": "ef1b410f", "metadata": {}, "source": [ "Also note that the serialized asset can be loaded in a different location in the asset tree, for instance, as a child of the different asset group. " ] }, { "cell_type": "code", "execution_count": 19, "id": "9242c7be", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:25.875296Z", "iopub.status.busy": "2021-10-22T11:33:25.871913Z", "iopub.status.idle": "2021-10-22T11:33:25.888768Z", "shell.execute_reply": "2021-10-22T11:33:25.888358Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|1.906] Loading asset [name='another_group']\n", "[I|1.906] Loading serialized asset [name='fireplace_room']\n", "[I|2.190] $.assets\n", "[I|2.191] .. .another_group [asset_group::default]\n", "[I|2.191] .... .fireplace_room [asset_group::default]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "[I|2.191] ...... .camera1 [camera::pinhole]\n", "[I|2.191] ...... .model [model::wavefrontobj]\n", "[I|2.191] ........ .grey_and_white_room:BottleCap [material::mixture_wavefrontobj]\n", "[I|2.191] .......... .diffuse [material::diffuse]\n", "[I|2.191] .......... .glossy [material::glossy]\n", "[I|2.191] ........ .grey_and_white_room:Branches [material::mixture_wavefrontobj]\n", "[I|2.191] .......... .diffuse [material::diffuse]\n", "[I|2.191] .......... .glossy [material::glossy]\n", "[I|2.191] ........ .grey_and_white_room:BrushedStainlessSteel [material::mixture_wavefrontobj]\n", "[I|2.191] .......... .diffuse [material::diffuse]\n", "[I|2.191] .......... .glossy [material::glossy]\n", "[I|2.191] ........ .grey_and_white_room:Dirt [material::mixture_wavefrontobj]\n", "[I|2.191] .......... .diffuse [material::diffuse]\n", "[I|2.191] .......... .glossy [material::glossy]\n", "[I|2.192] ........ .grey_and_white_room:FireplaceGlass [material::mixture_wavefrontobj]\n", "[I|2.192] .......... .diffuse [material::diffuse]\n", "[I|2.192] .......... .glossy [material::glossy]\n", "[I|2.192] ........ .texture_textures\\wood [texture::bitmap]\n", "[I|2.192] ........ .grey_and_white_room:Floor [material::mixture_wavefrontobj]\n", "[I|2.192] .......... .diffuse [material::diffuse]\n", "[I|2.192] .......... .glossy [material::glossy]\n", "[I|2.192] ........ .grey_and_white_room:Glass [material::glass]\n", "[I|2.192] ........ .texture_textures\\leaf [texture::bitmap]\n", "[I|2.192] ........ .grey_and_white_room:Leaves [material::mixture_wavefrontobj]\n", "[I|2.192] .......... .diffuse [material::diffuse]\n", "[I|2.192] .......... .glossy [material::glossy]\n", "[I|2.192] ........ .grey_and_white_room:MattePaint [material::mixture_wavefrontobj]\n", "[I|2.192] .......... .diffuse [material::diffuse]\n", "[I|2.192] .......... .glossy [material::glossy]\n", "[I|2.192] ........ .grey_and_white_room:Mirror [material::mirror]\n", "[I|2.192] ........ .texture_textures\\picture8 [texture::bitmap]\n", "[I|2.192] ........ .grey_and_white_room:Painting [material::mixture_wavefrontobj]\n", "[I|2.192] .......... .diffuse [material::diffuse]\n", "[I|2.192] .......... .glossy [material::glossy]\n", "[I|2.192] ........ .grey_and_white_room:PaintingBack [material::mixture_wavefrontobj]\n", "[I|2.192] .......... .diffuse [material::diffuse]\n", "[I|2.192] .......... .glossy [material::glossy]\n", "[I|2.192] ........ .grey_and_white_room:Paneling [material::mixture_wavefrontobj]\n", "[I|2.192] .......... .diffuse [material::diffuse]\n", "[I|2.192] .......... .glossy [material::glossy]\n", "[I|2.192] ........ .grey_and_white_room:PlantPot [material::mixture_wavefrontobj]\n", "[I|2.193] .......... .diffuse [material::diffuse]\n", "[I|2.193] .......... .glossy [material::glossy]\n", "[I|2.193] ........ .grey_and_white_room:Sofa [material::mixture_wavefrontobj]\n", "[I|2.193] .......... .diffuse [material::diffuse]\n", "[I|2.193] .......... .glossy [material::glossy]\n", "[I|2.194] ........ .grey_and_white_room:SofaLegs [material::mixture_wavefrontobj]\n", "[I|2.194] .......... .diffuse [material::diffuse]\n", "[I|2.194] .......... .glossy [material::glossy]\n", "[I|2.194] ........ .texture_textures\\wood5 [texture::bitmap]\n", "[I|2.194] ........ .grey_and_white_room:TableWood [material::mixture_wavefrontobj]\n", "[I|2.194] .......... .diffuse [material::diffuse]\n", "[I|2.194] .......... .glossy [material::glossy]\n", "[I|2.194] ........ .grey_and_white_room:Transluscent [material::mixture_wavefrontobj]\n", "[I|2.194] .......... .diffuse [material::diffuse]\n", "[I|2.194] .......... .glossy [material::glossy]\n", "[I|2.194] ........ .grey_and_white_room:Walls [material::mixture_wavefrontobj]\n", "[I|2.194] .......... .diffuse [material::diffuse]\n", "[I|2.194] .......... .glossy [material::glossy]\n", "[I|2.194] ........ .grey_and_white_room:initialShadingGroup [material::mixture_wavefrontobj]\n", "[I|2.194] .......... .diffuse [material::diffuse]\n", "[I|2.194] .......... .glossy [material::glossy]\n", "[I|2.195] ........ .grey_and_white_room:lambert2SG_light [material::mixture_wavefrontobj]\n", "[I|2.195] .......... .diffuse [material::diffuse]\n", "[I|2.195] .......... .glossy [material::glossy]\n", "[I|2.195] ........ .lambert3SG [material::mixture_wavefrontobj]\n", "[I|2.195] .......... .diffuse [material::diffuse]\n", "[I|2.195] .......... .glossy [material::glossy]\n", "[I|2.195] ........ .mesh_26 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_27 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_28 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_29 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_30 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_31 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_32 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_33 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_34 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_35 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_36 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_37 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_38 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_39 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_40 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_41 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_42 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_43 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_44 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_45 [mesh::wavefrontobj_ref]\n", "[I|2.195] ........ .mesh_46 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_47 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_48 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_49 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_50 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_51 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_52 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_53 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_54 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_55 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_56 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_57 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_58 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_59 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_60 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_61 [mesh::wavefrontobj_ref]\n", "[I|2.196] ........ .mesh_62 [mesh::wavefrontobj_ref]\n", "[I|2.197] ........ .mesh_63 [mesh::wavefrontobj_ref]\n", "[I|2.197] ........ .mesh_64 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_65 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_66 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_67 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_68 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_69 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_70 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_71 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_72 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_73 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_73_light [light::area]\n", "[I|2.198] ........ .mesh_75 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_75_light [light::area]\n", "[I|2.198] ........ .mesh_77 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_77_light [light::area]\n", "[I|2.198] ........ .mesh_79 [mesh::wavefrontobj_ref]\n", "[I|2.198] ........ .mesh_79_light [light::area]\n", "[I|2.198] ...... .accel [accel::sahbvh]\n", "[I|2.198] ...... .scene [scene::default]\n" ] } ], "source": [ "g = lm.load_asset_group('another_group', 'default')\n", "g.load_serialized('fireplace_room', 'fireplace_room.serialized')\n", "lm.debug.print_asset_tree()" ] }, { "cell_type": "markdown", "id": "73eadc8f", "metadata": {}, "source": [ "### Rendering with serialized asset\n", "\n", "We can render the image using the serializaed asset. Here we are using a locator directly instead of passing the instance, since the previously obtained reference (``scene``) became invalid." ] }, { "cell_type": "code", "execution_count": 20, "id": "f2f8d7f8", "metadata": { "execution": { "iopub.execute_input": "2021-10-22T11:33:25.971028Z", "iopub.status.busy": "2021-10-22T11:33:25.970495Z", "iopub.status.idle": "2021-10-22T11:34:10.175758Z", "shell.execute_reply": "2021-10-22T11:34:10.176174Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[I|2.213] Loading asset [name='film']\n", "[I|2.291] Loading asset [name='renderer']\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "8ec0870e76834f3bb2637897895b8069", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/2073600 [00:00" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "img = np.copy(film.buffer())\n", "f = plt.figure(figsize=(15,15))\n", "ax = f.add_subplot(111)\n", "ax.imshow(np.clip(np.power(img,1/2.2),0,1), origin='lower')\n", "plt.show()" ] } ], "metadata": { "jupytext": { "formats": "ipynb,py:light", "text_representation": { "extension": ".py", "format_name": "light", "format_version": "1.5", "jupytext_version": "1.3.3" } }, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.10" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "137c6c207ef44ec897bb45cd636279cc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "3005e32023ad455a9575654e80644641": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "3083b483a2094762a491ddac8e97dd37": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_c155adcc091f492aaedb6012f25a0ff2", "max": 2073600.0, "min": 0.0, "orientation": "horizontal", "style": "IPY_MODEL_137c6c207ef44ec897bb45cd636279cc", "value": 2073600.0 } }, "374d39f68f194e28b9f3d77e9d2da250": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_ce7ceeaf7c9a4841b331c834417f8b7c", "placeholder": "​", "style": "IPY_MODEL_a7ec02400919454faafebf3473e05b61", "value": "100%" } }, "6ad679d80c974022a5c4d5b065b24e91": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "8ec0870e76834f3bb2637897895b8069": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_374d39f68f194e28b9f3d77e9d2da250", "IPY_MODEL_3083b483a2094762a491ddac8e97dd37", "IPY_MODEL_a72752d08cee470e89e30100b7366dee" ], "layout": "IPY_MODEL_3005e32023ad455a9575654e80644641" } }, "a72752d08cee470e89e30100b7366dee": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_6ad679d80c974022a5c4d5b065b24e91", "placeholder": "​", "style": "IPY_MODEL_ebcb9f1939254c92b9d1b813c5761f8d", "value": " 2073600/2073600 [00:43<00:00, 47992.29it/s]" } }, "a7ec02400919454faafebf3473e05b61": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "c155adcc091f492aaedb6012f25a0ff2": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "ce7ceeaf7c9a4841b331c834417f8b7c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "ebcb9f1939254c92b9d1b813c5761f8d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 5 }