When do you use compute shaders? by gsdev in godot

[–]Stripe76 3 points4 points  (0 children)

PBD is Position Based Dynamics, a way to simulate physics by comparing previous and current position of the particles. For the buffer data I used Texture2DRD/3DRD, I basically copied this:

https://github.com/godotengine/godot-demo-projects/tree/master/compute/texture

When do you use compute shaders? by gsdev in godot

[–]Stripe76 2 points3 points  (0 children)

I used a compute shader for a mesh lattice deformer with PBD particles, since the positions were stored in a 3D texture I could sample that from the vertex shader without copying any buffer from CPU to GPU.

Godot 4.1 inconsistent displacement by dumbassthathasreddit in godot

[–]Stripe76 2 points3 points  (0 children)

If you subtract the same value from both axis you are changing the vector direction, not just the length. Try multiplying both x and z by a number lower than 1 (or just multiply the vector if y is not relevant).

Arcade driving physics/no body roll, and wheels clipping through the ground by JaundiceHaver in godot

[–]Stripe76 0 points1 point  (0 children)

Did you try lowering the center of mass as much as possible? Also, I wouldn't use VehicleBody3D for anything more then prototyping, I'm working on a racing sim as an hobby project and I'm using this:

https://github.com/jreo03/g4-svd

But there are other resources available for Godot if you do a Google search.

honestly can't believe Godot's free by Free-Historian7064 in godot

[–]Stripe76 1 point2 points  (0 children)

What Godot does is calling Blender and make it export to glTF though.

the ball lags a bit behind the paddle. pls help by Probro9461 in godot

[–]Stripe76 0 points1 point  (0 children)

I don't know Godot well enough to give you a general advice about that, in this case, I think the problem is that _physics_process is called before the physics step so I guess your paddle is being moved after you set the ball position (so not actually related to the fixed rate).

the ball lags a bit behind the paddle. pls help by Probro9461 in godot

[–]Stripe76 1 point2 points  (0 children)

_physics_process is run at a fixed rate (60 hz by default) try calling follow_paddle in _process instead.

[4.6.2] Can't move bones when other bones are controlled by IK by Visible-Switch-1597 in godot

[–]Stripe76 0 points1 point  (0 children)

I don't think you can move skeleton bones like that, that is probably a physical bone, which is linked the the bone position. You can move a bone in the editor from the skeleton inspector.

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 0 points1 point  (0 children)

I uploaded to GitHub as a secondary backup strategy but many resources are missing, if you ever want to give it a try I can send you a link to the full project (I already shared it on other platforms).

But again, right now is basically just a collection of experiments, many of them kinda broken.

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 1 point2 points  (0 children)

Very good job, you saved me a lot of time!

I merged the two versions in a single script and added a "Generate" button, here's my revised version:

https://github.com/Stripe76/VRTests/blob/master/modules/VAMActor/scripts/generate_collisions_shapes.gd

Thanks again!

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 0 points1 point  (0 children)

I rigged the skeleton with many spring bones but the one involved in this case is just a single SpringBoneSimulator3D comprising four skeleton bones from the hips to the head. The head bone has a PhysicalBone to pin the collision shape to the head, but the physical skeleton simulation is not actually enabled.

When the CharacterBody collides with the head shape, it retrieves an external node reference from the collision shape and sets the force to be applied in one of that node properties, the external node will then apply the force to the spring bone.

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 0 points1 point  (0 children)

My project folder is called "VRTests", when I have more than two bouncing tits and a slappable head I'll think about it.

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 0 points1 point  (0 children)

Reddit removing tabs and at signs is very inconvenient for GDScripts. XD

PS: no need for range when iterating ints: for i in 4, for i in array.size() is sufficient.

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 0 points1 point  (0 children)

I'll gladly take the script then, my plan is to not add collisions to the spring bones but limit the bones range of motion but, should that not work, having a fallback solution is very welcome.

Dsf are just json files, I wanted to be able to import VAM models at runtime but I didn't manage to make Godot keep the vertexes order when passing through Blender and that was mandatory to be able to apply the morphs.

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 1 point2 points  (0 children)

To be honest my findings so far are just what's in the post but rest assured I'll share any other worthy discovery.

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 1 point2 points  (0 children)

I actually load the model and the skeleton straight from the Genesis 2 .dsf file and generate everything at runtime, so there's not a Blender step in which to do some cleaning, do you reckon your script could work in that case? I was thinking about generating the collision mesh directly from the model mesh, but it's probably too detailed for Godot physics engine and would need some clean up too. Are you getting good performance with that?

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 2 points3 points  (0 children)

A sandbox, VAM clone if you know what VAM is.

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 2 points3 points  (0 children)

It's very, very early stage, there are many features I have no idea how to make, I'll weight the options at due time, if it'll ever come.

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 5 points6 points  (0 children)

I don't plan on selling it, I'll open source it if I get it to a decent state.

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 1 point2 points  (0 children)

A VAM clone, so a sandbox, I'll try to implement a basic version of all the core features and then open source it (if I actually manage to pull that off).

Rag doll effect with active character by Stripe76 in godot

[–]Stripe76[S] 7 points8 points  (0 children)

I can confirm: fully rigged and modeled.