Collision free painting

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Collision free painting

Postby Bird » Tue Jun 18, 2024 4:41 pm

in your case for example you should have two loops.
one when you execute the collision for object placement, no physics, that run in on some kind of edit mode.
The another, a loop just like there is now, that does the full update


Sounds good. That's what I do now. In "edit mode' the artist tries to paint collision free instances to create a scene, like making a row of trees or flowers. Then he runs the full physics if he wants to do more.

Thanks!
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Collision free painting

Postby Julio Jerez » Wed Jun 19, 2024 2:35 pm

I was looking at the object placement demo in 3.14

and It does not seem to operate in collision only. It seems to me that doing the placement while the dynamics is running is better because each time you place a object the dynamics will fish up the job of settling it. with collision Onel checks you can only check for static states,
but a scene has lot of integral states, that can possible be predicted by just placing the object.

example, imagine a stack of boxes. when the stack is low, placing a box on top is easy, because the penetration is one contacts deep. So when you tet the box on top loose, it will move down by just a very small amount that is not notable.

now suppose, the stack if ten box high, all place by the object placement, the boxes are now just touching, box the will have to build the internal state, these are the reaction force between contacts,
because they all start at zero, so the stack will oscillate up and down until reach equilibrium.

I will implement using the normal update see how that works and if it needs a Collison only then we can add that.
Julio Jerez
Moderator
Moderator
 
Posts: 12258
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision free painting

Postby Bird » Wed Jun 19, 2024 6:02 pm

Okay, thanks
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Collision free painting

Postby Julio Jerez » Fri Jun 21, 2024 5:22 pm

I added the boiler plate code to show the gizmo as the use drag over the scene.
Still does not do the work of calculating the placement matrix and spawning an object
and need so cleaning.

I will try to finish this weekend,
you can check it out, so that you can give me some input of the functionality as it is written.
Julio Jerez
Moderator
Moderator
 
Posts: 12258
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision free painting

Postby Bird » Fri Jun 21, 2024 8:04 pm

Looks like you are on the right track there.

Here's what I'm trying to do. I'm using the latest version on Github now. In this video, I am using bounding box intersection test to see if the phantom is intersecting any other object other than the one it is resting on. I can't seem to get it working if I rely on the contact count instead. The blue object is the visualization of the Phantom

https://youtu.be/5pnxzvfUY2A
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Collision free painting

Postby Julio Jerez » Fri Jun 21, 2024 11:43 pm

Don't try to use it yet, I have not done yet.

Some things may change as I continue.

Just wait until I tell you it is ok to experiment with it.
Julio Jerez
Moderator
Moderator
 
Posts: 12258
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron