Skip to content

Commit 0123f1b

Browse files
author
Roberto De Ioris
authored
Update PlottingGraphsWithMatplotlibAndUnrealEnginePython.md
1 parent 8bda9d7 commit 0123f1b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

tutorials/PlottingGraphsWithMatplotlibAndUnrealEnginePython.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,30 @@ ue.open_editor_for_asset(texture)
6060

6161
## Our project: Plotting a Pie chart tracking overlap events
6262

63+
Our objective is to have a special blueprint in our level exposing 3 cube in 3 different colors.
64+
65+
Whenever you overlap one of the cubes with your character, their internal counter is incremented.
66+
67+
A pie chart "carpet" is on the floor, and it is updated with overlap-counters data (the more you overlap a cube, the bigger will be its slice in the chart)
68+
69+
### Setting up materials
70+
71+
We need 4 materials and 1 material instance for the project:
72+
73+
* a completely red material (just link a constant vector3 to base color)
74+
75+
* a completely green material
76+
77+
* a completely blue material
78+
79+
* a material with a texture parameter linked to base color
80+
81+
* an instance of the previous material exoosing the texture parameter (so it can be updated at runtime)
82+
83+
### The "pie chart carpet" blueprint
84+
85+
86+
6387
```python
6488
import unreal_engine as ue
6589
from unreal_engine.enums import EPixelFormat
@@ -95,3 +119,9 @@ class PlotComponent:
95119
self.fig.canvas.draw()
96120
self.texture.texture_set_data(self.fig.canvas.buffer_rgba())
97121
```
122+
123+
### The "Plotter Platforms"
124+
125+
### Playing it
126+
127+
### Writing a simple unit test

0 commit comments

Comments
 (0)