[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/3/ - 3DCG

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Starting February 1st, 4chan Passes are increasing in price.

One year: $30, Three years: $60


[Advertise on 4chan]


File: Screenshot_18.png (84 KB, 1335x734)
84 KB
84 KB PNG
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?
>>
File: Screenshot_20.png (97 KB, 1299x513)
97 KB
97 KB PNG
Collision tree
>>
File: Screenshot_21.png (74 KB, 1177x598)
74 KB
74 KB PNG
pre-Simulation tree / distribute points in sphere volume
>>
File: Screenshot_22.png (126 KB, 1836x463)
126 KB
126 KB PNG
Simulation
>>
File: Screenshot_23.png (53 KB, 942x529)
53 KB
53 KB PNG
instance sphere
>>
File: Screenshot_24.png (181 KB, 1804x761)
181 KB
181 KB PNG
scale, age and shape etc
>>
File: Screenshot_25.png (89 KB, 1584x453)
89 KB
89 KB PNG
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 perspective

approach 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 search

approach 2
>script your setup with bpy and print / return / debug /check every single stage

approach 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.
>>
>>1005153
Well, 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
>>
>>1005157
I 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.
>>
>>1005140
Looks 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?
>>
>>1005163
he 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.
>>
>>1005164
Cool 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.
>>
>>1005165
if you want to help him, you have to make him help himself.
>>
>>1005166
I 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.
>>
>>1005167
if 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 source
Do what now, and how?
>>
>>1005169
The 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/blender
And 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?
>>
>>1005171
you do realize that geo nodes are "programmer shit" too?

Why don't you google your questions? I have to go do actual work
>>
>>1005173
You 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.
>>
>>1005163
The 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.
>>
>>1005162
Thats 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
>>
>>1005176
It'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.
>>
>>1005191
The 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
>>
>>1005253
I 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-nodes

It explains what the reflect node is doing. And how it's instrumental at getting the bouncing angle off the face.
>>
>>1005278
Regrettably so far it hasn't. But maybe I'm missing for it to do work.

Thank you for the link
>>
>>1005278
All 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
>>1005375
forgot the tag
>>
File: Bounce Sim Nodes.png (305 KB, 1581x755)
305 KB
305 KB PNG
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
>>
File: bounce sim 01.mp4 (41 KB, 374x370)
41 KB
41 KB MP4
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.
>>
>>1005376
Technical 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++
>>
File: bounce sim 02.mp4 (175 KB, 328x302)
175 KB
175 KB MP4
>>1005477
No 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.
>>
>>1005481
why dont you just cast a second ray
>>
>>1005483
I 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.
>>
>>1005484
i 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.
>>
File: IMG_0465.jpg (114 KB, 544x300)
114 KB
114 KB JPG
>>1005484
What 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.
>>
>>1005493
I 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.
>>
File: bounce sim 03.mp4 (175 KB, 356x340)
175 KB
175 KB MP4
>>1005481
Alright, 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
>>
>>1005534
it's the chink
>>
>>1005534
>>1005538
You 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.
>>
>>1005549
dunning kruger response.
>>
>>1005549
if you aren't directly interacting with your GPU instruction sets then you're the meme of true 3D artists.
>>
File: IMG_0485.jpg (170 KB, 640x446)
170 KB
170 KB JPG
>>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 way
Bizzare.
>>
>>1005607
He 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.
>>
File: bounce sim 04.mp4 (492 KB, 388x386)
492 KB
492 KB MP4
>>1005538
It 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.blend
Not 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 site
absolute cringe
>>
>>1005625
Maybe one day you'll be able to emulate Pong with your Blender. Think of the possibilities.
>>
File: IMG_0565.png (615 KB, 1136x640)
615 KB
615 KB PNG
>>1005607
Apologize



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.