Blender Python: The most confusing part of BMesh
HTML-код
- Опубликовано: 8 сен 2024
- In this video, we will go over potentially one of the more confusing parts of Blender's Bmesh Python API called Loops.
We will go over:
* What BMesh Loops are
* How to use them
* How to select an edge loop using BMesh loops
* How to work with UVs and vertex colors
Blender Python Example: Using the modulo operator (%)
• Blender Python Example...
Thanks for another great scripting tutorial !!
Absolutely excellent, nice "tempo", good examples, and both concepts and code VERY well explained !!
Best regards.
Glad you liked it! ❤️
Thank you for the detailed explaination of BMesh edge loops. I now understand a concept that had baffle me. Very useful videos. ( I find the background music distracting, though).
You are welcome!
This is one of the most complicated topics I tried to cover on this channel.
Thank you for the feedback!
Love the video and I learned exactly what I needed to.
The music in the background makes it harder to follow what you are saying. Maybe skip the music or at least lower the level.
Good to know thank you for your feedback ❤️
Yesterday i was looking for a way to programmatically edit UVs because coming from houdini i got used to procedural modeling, and i need a script to automatically create thousands of mesh and setting the UV automatically... Then this morning i found this great tutorial. Thanks
Glad I could help!
This is awesome thank you. I'm feeling some stuff click that hadn't before.
Nice!! 🥳
Your videos are very well done, I very much appreciate your clear, calm way of explaining. Definitely helped me on a few things already.
I'm wondering if you'd consider covering editing or generating UV's with bmesh? There's not much info online and I find it all a bit confusing..
Glad you like them!
Thanks for the idea!
I'll add that idea to the list.
Complex, but amazing tutorial. Thank you!
Glad you enjoyed it! 🥳
Yeah, this topic is probably the most complex thing I have covered on this channel.
I am an absolute goon in coding, but your channel is godsent.
This is exactly what i needed for my ever-increasing issues with blender. The more I work in blender the more annoying it gets with various quirky things that few seem to talk about. I've decided to give scripting a shot to fix some things i so desperately want to be fixed.
You've probably heard something about Serpens 3 addon for blender, if not it is essentially visual scripting through nodes. So I thought to give it a shot and tie it up along with Easy BPY addon for easier scripting and would also bridge chat gpt for seamless work inside blender.
While it seems a good idea on surface, wouldn't that hinder overall understanding and future-proofing of scripting even for beginner? Curious what is your take on it.
Currently a bit piled with work, but i will delve more into your channel in a month or so, can't wait to tinker with scripts. You da man, Vic!
Hey Maxwell,
Thanks for sharing your thoughts!
It really depends on what your goals are and how you plan to use Serpens 3, Easy BPY, and ChatGPT.
I think the tools that you mentioned are a powerful combo if used correctly.
The key to correctly using these add-ons and tools is to actually try to read and understand the code that Serpens 3 and ChatGPT would produce.
You can generate some code for basic tasks with these tools and try to modify the code to get a better understanding of the things that were written for you.
I would recommend starting with this playlist
ruclips.net/video/nmJqIaSZlRs/видео.html
Best of luck on your Python journey!
Okay, thanks for reassuring and yes, I thought i would be a good idea to begin with the video you linked.@@CGPython
thanks a lot. your video is what I want to learning!!
You are welcome! ❤️🔥
Your content is awesome! Thank you Victor!!!
Glad you think so! 💖
Very, very good!
Thank you! Cheers!
The only problem with that while loop is that it will become an infinite loop if the edge loop does not connect.
💯
Yes, that is a problem here!
I try to avoid doing any validation/error checking in my tutorials to get my point across. If I add all the things I want to check for this video would be 1 h+ long :D
Amazing tutorial as always.
Thank you! Cheers!
Loop must be the worst name for corner/edge data of a face. Loop should really be a loop if one uses such word. I wish Blender would eventually get rid of all these non-standard names like they used to have lamps (light), and still have armature (skeleton) etc.
Naming things in programming is very hard. The term "loop" refers to the boundary loop around a face. Maybe a "loop" could have been called a "loop part", but that does not look good next to verts, faces, edges, or polygons (one-word terms). Changing things now would break all the great add-ons that use loops and invalidate all the dev forum/stack overflow answers.
How would you have named this?
@@CGPython100% at least not a loop :) I've used loops quite a lot and always forget the concept because of this bad naming convention - I've used 3ds Max earlier (and several other 3D softwares before that) it was super annoying to see things like lamps, armature, screw modifier and such, terms which no other 3d software used. I understand the fact that one doesn't simply go and change API that has been there for quite while, but in case of Blender IMHO they should. Seems like they are now also making an overhaul to how animation data is stored, which is good.
Anyway, I don't mind different patterns in names personally, having used C# more than Python, I value clear and easy to understand names. Python users seem still be favoring old school short naming conventions, which I find really annoying, especially in forum answers (me = mesh, ob = object etc)
I’m not a fan of the short names as well. I read somewhere a while back that if the (non-technical) user of a tool can’t tell you what a short name means - don’t use it.
For example RGB is something that a user could tell me what that means, but the name “me” not really.
thanks you are the best
You're welcome!
Sir, please upload more tutorials on Bemesh
Could you by any chance make a video on how to extrude manually using bmesh? I am kind of curious how extrude works in low level
Thank you for the idea!
I don't know how do you get this black-lines-and-dots view in the UV editor. In the normal view, after setting uv.y to 0.0, I have to toggle the edit mode off-on to see the change.
As far as I know, you can't get that view outside of edit mode.
I bet it would be possible to create an add-on that would draw the edges and verts in object mode.
Note: you can stay in edit-mode and use the create bmesh from edit mode mesh.
Why did you change the speed of your explanation?
Hey
What do you mean?
Like how fast I speak?
@@CGPython Take the time to explain not reciting the text !
is it possible to create variables, for loops and switch clauses in blender python? Those are the things I miss in geo nodes (well repeat zone is sort of loop) and if you could do it in blender python it would open so many possibilities.
It is possible to create variables, for loops and switch clauses in Blender Python
I have a playlist here going over the basics
ruclips.net/video/nmJqIaSZlRs/видео.html
Too much work with Blender made this guy head looking like 27:28 (press Pause!) Suzanne sample obj ... please be careful guys!
p.s> nice tech tutorials, thx!
Curtis Holt sent me here.
Welcome ❤️
That API is really bonkers / "bm.loops.layers.color" why do these guys try to make it so hard to find stuff, how can a simple task like adding a new vertex color data for (b)mesh be made so cumbersome.
I have not looked at the underlining code (I should have...), but I'm going to guess the Blender developers are giving us access to the raw C data structures that Blender uses to make all the mesh operations so fast and performant.
If they had built a higher-level API for us, it might have been slower. We can always create something like EasyBMesh (similar to what Curtis Holt did with github.com/curtisjamesholt/EasyBPY)
Personally, I would take the most efficient and fastest API that they could give us, sacrificing the learning curve and readability. We can always build on top of a fast API and make it slower :D
If they made it a more friendly high-level API, we might have started to complain about how slow it is.