I'm so fucking lost rn. I'm trying to create a simulation of bubbles going past an object with an collision tree. But I have no idea where and with which nodes I can combine them. Anybody here who can help me on my way?
Collision tree
pre-Simulation tree / distribute points in sphere volume
Simulation
instance sphere
scale, age and shape etc
Attributes and output node
think about how you would solve this problem if you absolutely had to in a professional setting in the shortest amount of time possible versus your other coworker or else you would be fired because your boss is like that.I am going to approach the rest of this post from this perspectiveapproach 1>establish how it would work in another DCC such as houdini (you have houdini knowledge as well and have it installed because you are a graphics professional)>translate that houdini knowledge into blender using a combination of google search and blender manual searchapproach 2>script your setup with bpy and print / return / debug /check every single stageapproach 3>you have a nodemess now and don't understand it and wont take approach 1 or approach 2 because of reasons. Other people are very very busy with their own projects and can't understand your nodemess because it doesn't read up and down and flow well. You will have to start a topic on stack exchange or blenderartists and maybe even have to put a bounty on it. It's up to you now.
>>1005153Well, rip my income then. rn I'm troubleshooting why I can't print the script for some reason. And I haven't really had much luck regarding forums and help channels
>>1005157I think this is an actual use case for learning Python because the stuff you want doesn’t exist in node. Blender’s node was never built for anything pass simple events.
>>1005140Looks hella complicated bro. I ain't reading all that.You say you have no idea, but it looks like you have some basic knowledge to put that much together.What are you having trouble with exactly? Like, when you run your simulation, what's wrong with it? Are the bubbles not colliding with the object properly? Are the bubbles not generating at all? Are they moving in the wrong way? What's happening?
>>1005163he really has no idea. He has no fundamentals. He doesn't know how to debug. He doesn't know how to fix his own problems. He doesn't know how to work with computer graphics.Hell I remember times when I had to make custom builds of blender in source code to get it to do what I wanted. And there was no way I would ever post issues here, because that would mean I couldn't post it to blenderartists and reddit and artstation because it could be traced back here (and also because no one would know the answer anyway). In the end I succeeded with my modifications and my work became that of legend. I continue to modify blender source to this day.
>>1005164Cool story boomer. I'm almost willing to help him. I don't know if I can do the bubble thing. But I have a basic understanding of nodes now. So I can help him make sense of smaller, more specific things.
>>1005165if you want to help him, you have to make him help himself.
>>1005166I see your point. Teach a man to fish and all of that. But at the same time, there were concepts about nodes that I wish I had someone to explain in plain English. It would have saved me a lot of time trying to decipher the super generic manual descriptions, and scouring the internet for solutions to problems that really are quite simple once you know how it's done. I might be able assist him in understanding nodes a little better.Again, my knowledge is still pretty basic. But I'm starting to understand the structure of how nodes works now. So I might be able to help him in parts. And then maybe those parts can culminate into a functional bubble system. What he's asking is not outside of the capabilities of nodes.Though it would probably be a lot easier to learn how to use Blender's built-in particles and collision.
>>1005167if you want to understand the nodes better, clone the source and then search for the node in the source
>>1005168>clone the source and then search for the node in the sourceDo what now, and how?
>>1005169The entirety of blenders open source development is based on committing and cloning.Why dont you google it.
>>1005170>Why dont you google it.Because the idea of looking up programmer shit, just sunk me into an emotional pit of despair.I have a vague idea of what cloning and committing is. I've visited github before.So I guess I go "clone" blender's source huh? It's *that* easy? I just go where? Here? https://github.com/blender/blenderAnd then what? Press the green button that says "code", and download the zip?What then? I've never looked at source code before. Do I need a special kind of viewer?
>>1005171you do realize that geo nodes are "programmer shit" too?Why don't you google your questions? I have to go do actual work
>>1005173You really have mastered the craft of being the least help possible. Truly, I believe your works are as legendary as you say they are. Because a programmer's ability to communicate is in inverse proportion to his ability to program.
>>1005163The simulation ( >>1005143 ) for the bubbles itself works. Its just when I try to add >>1005141 into the tree it fucks up the velocity / direction and turbulence of the particles. It still emits them but incorrect.
I followed a tutorial and thought I could combine it into an existing tree. Because that is how far my basic understanding of coding goes. boxes in boxes.
>>1005162Thats crazy because I've seen someone create a similar effect in an prev version of blender. either that or he was using an alpha build
>>1005176It's pretty hard to follow exactly what's going on with the collision. But I'm guessing that bubbles are deflecting off of each other, right? They're getting the distance between them, and then the reflect node changes the direction of their velocity when they're too close. Correct? Or maybe not bouncing off of each other, but bouncing off of the object they're passing.Well, your Sample Index node is set to Float. Wouldn't it be better to set it Vector?When you plug a vector into a float socket, it only reads the X value, discarding Y and Z. Because floats can only read one value at a time. So you're essentially defeating the point of sampling Normals, by erasing the Y and Z values. Try setting Sample Index to Vector and see what happens.
>>1005191The bubble-particles don't really interact with each other. They sway back and forth, but that is due the turbulence in the simulation. (from what I understood of the guy that give the tutorial) The idea of the collision setup is that when a bubble/particle floats towards the face of the colliding object. It bounces off the face by calculating the the distance to the face and sends it flying an opposite direction. But it only calculates this when the particle is going towards the face, not when it is passing by.
>>1005253*gave*-1 the
>>1005253I see. Well give me an update when/if you implement the suggested change. I'm really hoping that the fix is as easy as changing float to vector.This page helped me understand vectors a little better. Give it a look. https://cgcookie.com/posts/vector-math-made-easy-in-blender-and-geometry-nodesIt explains what the reflect node is doing. And how it's instrumental at getting the bouncing angle off the face.
>>1005278Regrettably so far it hasn't. But maybe I'm missing for it to do work. Thank you for the link
>>1005278All this can be done if you just learn Python programming but no you decided to be a noob and keep asking for help because you can’t understand nodes in Blender when people tell you it can’t be done in nodes. Blender is extremely limited not fully functional 3D software like Maya.
>>1005375>Blender is extremely limited not fully functional 3D software like Maya.son you have complete source code in blender and can view it / extend it while maya is a blackbox
I´m the one that is asking for help/OP. That guy is trying help me by thinking along for a solution within blender first. Hate on me not on him
>>1005378>>1005375forgot the tag
This might help, OP. I wanted to learn how to make a proper bouncing node anyway, so I took your thread as an opportunity. This uses the raycasting node though. So it might not work in the same framework as yours, since yours is doing "sample nearest" stuff.I actually already knew how to make a standard bounce using raycast and reflect. However, there was a problem where the particle would reflect immediately from the position it was previously already at. Meaning, if the particle was last hovering above the surface, then it would reflect from that hovered position. Completely killing the bounce illusion and actually having an inaccurate trajectory.Due to the nature of frame animation, you can't completely eliminate the hovering effect. You can only disguise it by increasing the frame rate of your animation. Or slowing down the particle. Either of those solutions gives the particle more frames to work with near the surface. More frames near the surface tricks the eye into seeing the particle bounce off of it. It's just a trick of the eye, but not a fix. You can never fix this issue without infinity frames.You can however fix the trajectory. That's the part I figured out today. At least, I'm fairly certain. I had to do a lot of troubleshooting, so I'm not 100% I found the solution, but it appears to be working as far as I can tell. It didn't require a bunch of substeps or anything. It only took 1 little reorientation of the particle's position, before adding in the newly reflected velocity. If the particles move fast enough, it might seem like they're sort of shifting aside incorrectly. But that's not so. Their angles are correct. That's why I drew the line. So I can see that it's following the V shape, even when the frames are low. But I can also tell it's correct just by slowing the particle down or increasing the frame rate.This guy shows the basic raycast solution without the trajectory correction. https://www.youtube.com/watch?v=qUrd5Yy7HsY
Video of it working.I tested moving the emitter around in different angles. For the most part, the particle bounces exactly as expected. But every now and again the particle escapes the cage. I'm not sure what's causing that. It could be the effect of me holding the empty mid simulation. Because I can't get it to escape when I'm hands off.
>>1005376Technical standpoint, Blender has what’s known as crossover for C, C++ and Python languages. They do not communicate with each other and therefore cause problems like right now. Your nodes are Python related code while Blender’s rendering is C++. You can not achieve what you want unless you complying with all rules set in Python and C++
>>1005477No they're definitely escaping on their own. I think I see the problem. After they reflect, their new position can be out side of the boundary of the box, setting them free. There are opportunities for that to happen near the corners. So the real solution will require substeps after all. It will probably require doing multiple raycasts. I think I have an idea how. But can't be bothered at the moment.
>>1005481why dont you just cast a second ray
>>1005483I just said I was planning to do that. In fact, I'm going to set it up, so it casts as many rays as it needs to cover the length of the velocity. Just in case the particle needs to perform multiple bounces in a single frame.It's times like these I wish Blender's repeat node was capable of ending when it reached a count inside of the repeat zone. Rather than having to predict the count preceding the repeat zone.
>>1005484i had multiple situations where i wanted to change node behavior so i had to create and publish a new fork. Everyone praised me for it, but, it really shouldn't be that way. In maya you can create new nodes.
>>1005484What did i say, i told you to programmed the thing you wanted and now you are back to nothing. bLEnDer cAN dO AnyTHinG my ass. Next time don’t be a jerk.
>>1005493I don't know who you are, and I don't recall being mean to you. But if I was, then you likely deserved it. I'm not any meaner than people deserve.I also never said "blender can do anything". I don't know who told you that, and why you're throwing it in my face like I'm responsible.It's not a big deal though, I already figured out how to do multiple bounces. I just have to set it up so that it iterates a few times. Blender nodes can't make conditional loops. But I can still set up the iterations to as many as I need.
>>1005481Alright, I think it's fixed now. At least, none of the particles can escape the box anymore. I only did 3 rays. But I image that if a particle got into a very tight situation, it would need more than 3 to handle it.I had to change the text environment, because the bounces go weird when they touch a back face. Now that I think about it, I can probably make it detect when it's hitting a back or front, and adjust accordingly. But fuck it. I feel like it's done enough.Blend file with node: https://files.catbox.moe/zav4nd.blend
>>1005534it's the chink
>>1005534>>1005538You are the asshole here, the answer is still programming but what you did was a brute force method. This is not smart or anything, this is why you have blender become the meme of 3D because of amateurs like you who can’t understand basic 3D concepts.
>>1005549dunning kruger response.
>>1005549if you aren't directly interacting with your GPU instruction sets then you're the meme of true 3D artists.
>>1005571>>1005572>Blender user base in a nutshell, stupid
>anon says it cannot be done>someone does it>anon calls them retarded for not doing the impossible in a different harder wayBizzare.
>>1005607He didn’t do what he wanted, the nodes are layered so that if it does escape the other will block it. Duck tape on a duck tape problem with no actual fix to the hole. This is awful way to do things in 3D when stuff like hitbox exists and detection of other models. Don’t support bad 3D nodes, it’s not optimal nor will it you.
>>1005538It was not fixed after all. I made some pretty critical errors. The switch wasn't turning on for the trajectory correction. So the thing I set out to solve wasn't even solved! Plus, the trajectory correction was miscalculated. It was scaling the wrong portion of the velocity.I almost didn't notice these things. If it were not for the retarded anon doubting me, I probably wouldn't have gone back to work on the node. The plan was to clean it up a little and add another function. But as I was testing 100,000 points, 2 escaped the box. That sent me down the path to recheck everything, and I found the errors.So if you downloaded the previous node. Just delete it. It's wrong. Grab this new fixed version: https://files.catbox.moe/t2yuff.blendNot only does it fix the critical errors, it also fixes the back face error.You can now easily set up the number of substeps with a click.(Look in the modifier panel for this options) 3 substeps seems to be the minimum to get good bounces. But you can set it higher if need be.The speed and number of points can be easily adjusted from the modifier panel too.Spite is a good motivator.
>>1005625>sharing a ".blend" file on this siteabsolute cringe
>>1005625Maybe one day you'll be able to emulate Pong with your Blender. Think of the possibilities.
>>1005607Apologize