Geo Nodes and Python - Blender Tutorial

preview_player
Показать описание


Tutorial on how to read a CSV file into Blender with Python and store it on a mesh as named attributes.

I'm pretty new to Python so please let me know how to improve in the comments!

---

---

Contents:
00:00 - Introduction
00:30 - What is a CSV?
03:34 - Planning the script
05:38 - get_file_path(file_name)
11:00 - read_csv(file_path)
13:50 - csv_column(data, col)
17:30 - Declarations
21:30 - Creating vertices with Geo Nodes
29:42 - tigger_update()
31:30 - add_attribute(obj, attr_name, type, domain)
37:25 - Write to our named attribute
38:25 - String to Int list
43:00 - Visualising the data with Goemetry Nodes

---

Рекомендации по теме
Комментарии
Автор

As a python noob myself i came up with this:

def add_attribute(obj_name, attr_name, type="FLOAT", domain="POINT"):
attr = bpy.data.objects[obj_name].data.attributes.new(attr_name, type, domain)
return attr

Only after an hour of trail and error though.
Happy with myself, i was thinking afterwards maybe someone else had the same problem, only to read your comment😅

Anyways my line of thought was you can still parse the obj_name as a string and you don't have to parse the object itself

Keep on the good work sir 💯
Your videos pop up always when i'm in need of the knowledge or when i didn't know i needed the knowledge♥

umadgrooves
Автор

Excellent visualization of data! You should do more python geo nodes tutorials! Maybe even a course!

mind_of_a_darkhorse
Автор

Inspiring to see how fluidly you work with different node tree strategies.

alabrrmrbmmr
Автор

Excellent tutorial and timing! I'm a Data Science student and I've been racking my brains for days about how I could create a more interesting visualisation of geodata for the next week's assignment (local restaurant ratings) with blender. This really fits perfectly, thank you so much for taking the time and explaining the process in detail.

DavidSchiess
Автор

Kudos for this work! And kudos for your descriptive narration when adding nodes saying "add node Geometry: Sample Index or Mesh:Edge Neighbors". It makes it so much easier to find the nodes while listening, instead of fighting to remember which category it is in. Keep up the interesting work here... -David

drabodows
Автор

I'm pretty new to Python so please let me know how to improve in the comments!
Edit: it was brought to my attention that I got latitude and longitude back to front so those high spikes should be London 😅
----
I made a mistake on the add_attribute function. That's not the object name, that's the mesh name (it just aligns by default). It should actually be like this:

def add_attribute(obj, attr_name, type="FLOAT", domain="POINT"):
attr = obj.data.attributes.new(attr_name, type, domain)
return attr

Erindale
Автор

This tutorial is fantastic! ❤
Thank you for sharing Erindale!

CGPython
Автор

python + geo nodes work almost like houdini sop. Great tutorial!

dejavu
Автор

47:11, voronoi from points, wow, pure wizardry!

Nicko
Автор

amazing tutorial. many more geo nodes and python to come i hope

meshybonehead
Автор

Thanks for the way of using python in blender with geometrynode. Data turns a beautiful mesh!!

blueitems
Автор

This is incredible. Can't wait to learn Python

UTubeSuhail
Автор

Yes! I was waiting for something just like this!

XYZandRGB
Автор

So cool to finally meet you on common grounds!!^^ usually i have to focus quite a bit and think thrice before being able to follow your moves and today i find myself knowing your next logical step~ what a welcomed sight to have you explore every possible thing!!

sazaam
Автор

Excellent video. There's also a free add-on, the blender spreadsheet importer, developed by Simon Broggi, that works with both csv and json files to do most of the importing for you (any number of columns automatically imported to the correct number of points). Imports everything straight into general attributes that work well with geonodes.

CGFigures
Автор

This is very cool, but I’m going to have to watch it like 10 more times to figure out how to do it for myself. Thanks for the lesson!!!

OnnieKoski
Автор

A really nice walkthrough. Thanks as always!

boriskourt
Автор

Woah, did not know I needed this until I saw it, nice work!

crackedConstant
Автор

This became a very interesting tutorial about python in blender!
It made me remember I made once a python script to import map data in text format into blender in the pre-geometry nodes time. I will have to adapt it to geonodes and share it also.

pedrotarroso
Автор

Great tutorial! Python + Blender opens many doors. I've messed around with geometry equations and such, but never considered loading in a CSV and using Blender as a visualizer 😲! It will be worth working on some beautiful and slick assets and use Blender as a super-charged "matplotlib" for data visualization. So many possibilities!

deemo