Git Product home page Git Product logo

blenderdatavis's Introduction

Addon logo Blender logo

Data visualisation addon for blender

Load data into Blender and create visualisations!

User manual | Video | Blender Market | Gumroad | Column Extractor | Buy me a coffee

Quickstart

Download data_vis.zip and install it in Blender (Edit -> Preferences -> Addons). Or get the folder data_vis (from repo or the zip) and move it into blender addons directory manually.

Possible results

Introduction

Brief section about how to use the addon and what principles are applied to data and visualisations and how addon works. Addon extends Blender UI in two places:

  • Add Object Menu - Create new visualisations under Chart subgroup (Shift + A)
  • View3D Tools - Manipulate with data and some properties (N - DataVis tab) - this position can be edited in settings

Addon uses Blender coordinate system, 2D chart is generated along X and Z axis, 3D charts extend along Y axis. Form of chart creation and parametrization is inspired by matplotlib. I tried to make chart creation simple but customizable.

CSV Format

Addon supports values separated by , (commas) Data are in X, Y, [Z] format, where each entry is on new line. First line can contain labels for axis. Two types of data are supported:

Categorical X, Y X is category and Y is e. g. X occurence

species, occurance
dogs, 5
cats, 10
parrots, 2

Numerical X, Y, [Z] are numerical values.

x, sin(x)
0, 0.0
0.785, 0.706
1.57, 0.99
3.14, 0.0
x, y, x + y
0, 0, 0
0, 1, 1
1, 0, 1
1, 1, 2

Data also can have multiple top values Z in t, t + 1, t + 2. There is a possibility to create animation and keyframes for each data and interpolate between it. (Supported for Bar, Point and Surface chart)

x, y, x + y
0, 0, 0, 3, 10
0, 1, 1, 4, 0
1, 0, 1, 5, 3
1, 1, 2, 1, 2

Creating chart

Use add object menu and select chart which suits your needs. If you set data type and dimensions correctly, chart should create with automatic axis ranges and steps and default coloring. You can try to play with parameters and if you can come up with something cool. All charts sizes are normalized to 1 meter cube, e. g. you can create stem chart by using bar and point chart or dual-line chart by creating two line charts with proper settings. Addon can create materials for chart in two ways. U can check Use Nodes parameter in chart creation and addon automatically creates and assigns node shader material to your chart. Second option is that addon creates materials for each object in chart (only where objects are used). Axis and ticks with text have also default assigned material. U can customize size of step or range of axis to normalize data into different space to combine with different type of chart or to put it in different perspective.

Surface chart is supported only if you install scipy and numpy into Blenders python. This can be done in addon preferences (experimental) or in system console using pip.

Status

Currently supported features:

  • Pie chart (Categorical)
  • Line chart (Categorical, Numeric)
  • Bar chart (Categorical, 2D Numeric, 3D Numeric)
  • Point chart / Scatterplot (2D Numeric, 3D Numeric)
  • Surface chart (Using scipy)
  • Bubble chart (2D, 3D Numeric + animatable size and height)
  • Creating axis with labels from data
  • Ranges of data to visualise can be set
  • Materials and 3 types of coloring of charts (Including default Node Shader for gradients and random colors)
  • Basic animations from data
  • Panel settings (to prevent sidebar cluster)
  • Loaded data list
  • Data inspector
  • Label alignment to active camera or active view
  • Chart container size
  • Example data available in addon

Known issues:

  • Charts from larger files (>200 entries) take long time to generate (except surface chart), because of large numbers of manipulations with objects instead of meshes

Planned features:

  • Multiple categories for categorical charts
  • Function plotting

Feel free to submit any issues or ideas!

Author

Zdeněk Doležal - Bachelor Thesis

Faculty of information technology BUT

Version 2.1.1

blenderdatavis's People

Contributors

griperis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blenderdatavis's Issues

Exporting in glb/gltf with materials

First off, thank you very much for creating this add-on. We're doing some work in Spatial and want to import some data visualizations. This allows us to do that.

I'm new to Blender and having trouble exporting into gltf/glb format with the color included (just getting a white object). I believe I'm including materials in the export but figured I'd ask here as I've had no luck googling. Thanks again/in advance!

Pie chart not working on blender 2.92

While trying to create a chart using DataVis on Blender 2.92 using a nominal CSV, the pie chart keeps turned grey on the menu impeding to create a pie chart.
Can you tell me if there is anything undocumented step needed to create a pie chart or provide a valid CSV to test?

PD: I love your project and I see some possible scenarios to use it for an internal presentation app if you are interested.
Thanks.

Type Error : bpy_struct.__new__(type) expected a single argument

DataVis is a very useful Blender addon. And I want to change it into pure python script to generate charts instead.
For class bar_chart.py:
class OBJECT_OT_BarChart(OBJECT_OT_GenericChart):
It inherited from OBJECT_OT_GenericChart. When I call this class by python:
barchart=OBJECT_OT_BarChart()
It will pop up an error: Type Error : bpy_struct.new(type) expected a single argument

Also after loading a csv file, how the new DataManager instance can be used by general class?
Can you help with this?
Thanks!

Addon is not shown up in the Add-ons list

I wanted to use this addon, so I have downloaded it, I have installed it in the blender. Now I want to enable this addon but it is not shown up in the addons list.

This addon will be really important for me. Please help.

Surface chart generation may be wrong

hi,Surface chart generation may be wrong

For the same data, there are differences between those generated by bar chart and those generated by surface chart, as shown in the figure below
Image 1651820192
Image 1651820203
.

Add a option to customize the tab

Hi.

Could you please add an option in the preferences of your add-on to give the user the choice of the tab to display your add-on? (in order to move the add-on from its own tab to a custom one).

Some users might want to place your add-on in the Edit or in the Tool tab... (or elsewhere).

I invite you to read this related topic (if you want): https://blender.community/c/rightclickselect/dzdbbc/
According to the number of votes, there are many people who don't like having many tabs vertically in the N panel. The only workaround is to add an option in the addon preferences.

This option is very convenient for the user, especially when there are many add-ons that add their own tab on the N panel (it could become overcrowded vertically).


Maybe you could have a look at the source code of these (free) add-ons (to reuse the lines related to this feature)?

Backface Hiding : https://gitlab.com/ChameleonScales/Backface_Hiding

6cb58ec90d0eaf2859819909e32075473fcd9f47

SpeedRetopo : https://gumroad.com/l/speedretopo

1173cda700ee4af649f858070ca426f970587afb

Thank you in advance for considering to add this option.

Unsoported number of labels on first line (Bubble chart)

Hi,
when I try to animate the size of the bubbles in a bubble chart I get the error Unsoported number of labels on first line. In Blender it says this chart needs a XYZW kind of dataset but when I use this for example:

x, y, z, w
0, 0, 0, 3, 1, 3.9, 4.2, 4.9
1, 2, 0, 3, 1, 3.9, 4.2, 4.9
0, 2, 4, 3, 1, 3.9, 4.2, 4.9

the bubbles won't animate. Does the data have to be different in each bubble? Do you need a minimum number of bubbles?

Can't add-on to 3.1.2.

When I download the zip, and install it in preferences, it seems to install correctly, and appears in the scripts folder, but does not appear in the list of add-ons (in preferences) that I can search and then enable via a tick-box.

error when enable "use nodes"

error when enable "use nodes"

Traceback (most recent call last):
  File "/home/ywaby/.config/blender/2.83/scripts/addons/data_vis/operators/bar_chart.py", line 116, in execute
    color_gen = color_factory.create(self.axis_settings.z_range, 2.0, self.container_object.location[2])
  File "/home/ywaby/.config/blender/2.83/scripts/addons/data_vis/colors.py", line 239, in create
    return NodeShader(self.container_name, self.base_color, self.color_type, scale, location_z)
  File "/home/ywaby/.config/blender/2.83/scripts/addons/data_vis/colors.py", line 42, in __init__
    self.material = self.create_gradient_shader()
  File "/home/ywaby/.config/blender/2.83/scripts/addons/data_vis/colors.py", line 122, in create_gradient_shader
    sub_node = self.__create_z_sub_node(nodes, material, -700)
  File "/home/ywaby/.config/blender/2.83/scripts/addons/data_vis/colors.py", line 185, in __create_z_sub_node
    drv = material.node_tree.driver_add('nodes["Math"].inputs[1].default_value')
TypeError: bpy_struct.driver_add(): property "nodes["Math"].inputs[1].default_value" not found

location: <unknown location>:-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.