Search found 4514 matches

by Norbo
Thu Jul 09, 2020 1:18 am
Forum: General
Topic: Pools
Replies: 7
Views: 4017

Re: Pools

Pretty much, with one small note: using a collection of pools does not necessarily imply locking and contention provided that every worker has a guarantee it's the only one touching a pool; the annoyance is primarily ownership tracking. Also, assuming that the shapes you're concerned about are prima...
by Norbo
Wed Jul 08, 2020 9:24 pm
Forum: General
Topic: Pools
Replies: 7
Views: 4017

Re: Pools

Is there a downside to holding onto the same pools for the lifetime of the app? If we Return memory, but never Clear the pool, will it leak? A leak could happen if you let a BufferPool go out of use while it retains pinned references to memory. If you intend to let a BufferPool get garbage collecte...
by Norbo
Wed Jul 08, 2020 5:37 pm
Forum: Questions and Help
Topic: [Nuget] Include Bepu1 and Bepu2 in one Project
Replies: 3
Views: 39

Re: [Nuget] Include Bepu1 and Bepu2 in one Project

I'll definitely consider it, but could you elaborate more on your use case so I can understand the context better?
by Norbo
Tue Jul 07, 2020 9:07 pm
Forum: General
Topic: about save the snapshot of the space
Replies: 3
Views: 31

Re: about save the snapshot of the space

Rewind-replay clientside prediction is generally doable even without any clientside determinism due to the very short timescales. If you are seeing massive divergence on the client over ~100 milliseconds in a simulation that isn't super chaotic after copying motion states, there may be other problem...
by Norbo
Tue Jul 07, 2020 6:34 pm
Forum: General
Topic: about save the snapshot of the space
Replies: 3
Views: 31

Re: about save the snapshot of the space

Collecting the motion state (position, orientation, linear velocity, angular velocity) gets you 95% of the way there. It's true that it's not a full snapshot, though- the activity state of bodies, the constraints that exist, the accumulated impulses cached for those constraints, and so on all matter...
by Norbo
Tue Jul 07, 2020 5:49 pm
Forum: Questions and Help
Topic: [Nuget] Include Bepu1 and Bepu2 in one Project
Replies: 3
Views: 39

Re: [Nuget] Include Bepu1 and Bepu2 in one Project

Unfortunately that's an oversight. I didn't really think about using both in one project, so unless there's some automagic nuget stuff for handling collisions in dependencies that I'm unaware of, one easy option is to pull down one or both as source and add a project reference, and then modify the o...
by Norbo
Sun Jul 05, 2020 1:36 am
Forum: Questions and Help
Topic: [v2] Friction blending with static objects
Replies: 7
Views: 88

Re: [v2] Friction blending with static objects

FYI, updated nugets: https://www.nuget.org/packages/BEPUphysics/2.3.0-beta0

It's automated now, so they'll be quite a bit more frequent. There's supposed to be a package uploaded to the github registry too, though that's... currently failing for inscrutable reasons.
by Norbo
Thu Jul 02, 2020 6:25 pm
Forum: Questions and Help
Topic: [v2] Friction blending with static objects
Replies: 7
Views: 88

Re: [v2] Friction blending with static objects

If it's convenient and speedy enough, it'll be fine. As always, being 'speedy enough' depends on the data access patterns. If you need to jump through those indirections a million times a frame, it might require some more attention, but otherwise, might as well do the simple thing.
by Norbo
Wed Jul 01, 2020 9:14 pm
Forum: Questions and Help
Topic: [v2] Friction blending with static objects
Replies: 7
Views: 88

Re: [v2] Friction blending with static objects

Historically, infrequently to the point of inconvenience. I keep intending to set up automatic prerelease publishing. I might just do that today while I wait on my ML training runs to fail :P
by Norbo
Wed Jul 01, 2020 8:56 pm
Forum: Questions and Help
Topic: [v2] Friction blending with static objects
Replies: 7
Views: 88

Re: [v2] Friction blending with static objects

Good catch. There's a (bad) reason: laziness! The BodyProperty was a piece of demos-focused code that was intended more as an example than anything else, since it doesn't do anything special. At some point I moved it into the engine and didn't generalize it (or even update some of the comments, appa...
by Norbo
Fri Jun 05, 2020 8:57 pm
Forum: Questions and Help
Topic: Custom prediction of collision resolution
Replies: 1
Views: 386

Re: Custom prediction of collision resolution

Unless there's a reason not to (like performance budget), I'd recommend just going with running the simulation forward. There's no built in 'rewind' functionality, but you could cache the original position/orientation/velocities and reset them afterwards. Or create a separate simulation, create equi...
by Norbo
Thu May 28, 2020 9:53 pm
Forum: Questions and Help
Topic: Custom collision response solving [v1]
Replies: 2
Views: 289

Re: Custom collision response solving [v1]

I would recommend against modifying velocities in the CreatingContact event handler. While you're presumably only using one thread to guarantee determinism in v1 so it shouldn't cause a race condition now, it may help avoid future confusion or bugs if it's in a safer location. Consider enumerating c...
by Norbo
Sun May 24, 2020 10:26 pm
Forum: Questions and Help
Topic: [v1]Accelerating StaticMesh creation
Replies: 2
Views: 287

Re: [v1]Accelerating StaticMesh creation

The easiest thing to do would be to keep a reference to the whole StaticMesh for later use. You can remove it from the Space and re-add it later. There's also the InstancedMesh, which is very similar to the StaticMesh but doesn't bake the world transform into the underlying tree so the shape it uses...
by Norbo
Sun May 17, 2020 4:23 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 2345

Re: BufferPool problem

Unfortunately, I don't have enough information to suggest anything in particular. It definitely shouldn't be throwing access violations :P If you can reproduce it in the demos, I could take a closer look. Grabbing the source and running in debug mode could help too- there are a lot of asserts that w...
by Norbo
Sat May 16, 2020 11:18 pm
Forum: Questions and Help
Topic: BufferPool problem
Replies: 18
Views: 2345

Re: BufferPool problem

Are you using multiple threads to add to/remove from the simulation simultaneously, or while the simulation is running? Both will definitely corrupt the simulation and things will fail in arbitrarily bad ways. If it's not that, the fact that you're seeing access violations means something has gone t...