Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
03-03-2021, 02:44 PM
(This post was last modified: 03-03-2021, 02:49 PM by josemendez.)
(03-03-2021, 02:38 PM)zero16832 Wrote: i have send your in email yesterday?
Do you mean the original project you sent? That's what I tested in all these Unity versions, but was unable to reproduce any issues (except for 2020.2) I posted here a video of the results.
Using the Burst backend or disabling interpolation should work in any version, though.
Posts: 23
Threads: 4
Joined: Feb 2021
Reputation:
0
(03-03-2021, 02:44 PM)josemendez Wrote: Do you mean the original project you sent? That's what I tested in all these Unity versions, but was unable to reproduce any issues (except for 2020.2) do you have wechat,discord or Telegram?
Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
03-03-2021, 02:53 PM
(This post was last modified: 03-03-2021, 02:53 PM by josemendez.)
(03-03-2021, 02:52 PM)zero16832 Wrote: do you have wechat,discord or Telegram?
Nope, I only offer support through the forum or the support email. No exceptions, sorry.
I will later test the project on the exact same Unity version you reproduced the error in and report back the results.
Posts: 23
Threads: 4
Joined: Feb 2021
Reputation:
0
03-03-2021, 03:00 PM
(This post was last modified: 03-03-2021, 03:01 PM by zero16832.)
(03-03-2021, 02:53 PM)josemendez Wrote: Nope, I only offer support through the forum or the support email. No exceptions, sorry.
I will later test the project on the exact same Unity version you reproduced the error in and report back the results. OK, i will make the other demo send your.
other problem: I want my softbody keep move,how can i to do that?
i test like that(on update function):
Code: for (int i = 0; i < softbody.solverIndices.Length; i++)
{
float xVelocitie = softbody.solver.velocities.x;
xVelocitie -= xOffsetAdd;
if (xVelocitie < -maxSpeed)
{
xVelocitie = -maxSpeed;
}
softbody.solver.velocities = new Vector4(xVelocitie, softbody.solver.velocities.y, softbody.solver.velocities.z, softbody.solver.velocities.w);
}
The problem is that it's too inefficient。Do you have any suggestions?
Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
03-03-2021, 03:05 PM
(This post was last modified: 03-03-2021, 03:09 PM by josemendez.)
(03-03-2021, 03:00 PM)zero16832 Wrote: OK, i will make the other demo send your.
other problem: I want my softbody keep move,how can i to do that?
I'm not sure I understand what you're trying here... unless your floor has friction or you're using velocity damping, or some other external force is slowing the softbody down, it should simply keep moving once you've added a force/acceleration to it.
This already happens in the game: once I press the screen the softbody just keeps moving forward even after lifting the finger, as no forces are acting to slow it down.
Is this what you want? in that case, there's no need to do anything in Update(). Inertia will keep the softbody moving. If you want the softbody to have a "base" velocity, just giving it an impulse at the start is enough. Again, assuming there's nothing slowing it down.
Posts: 23
Threads: 4
Joined: Feb 2021
Reputation:
0
(03-03-2021, 03:05 PM)josemendez Wrote: I'm not sure I understand what you're trying here... unless your floor has friction or you're using velocity damping, or some other external force is slowing the softbody down, it should simply keep moving once you've added a force/acceleration to it.
This already happens in the game: once I press the screen the softbody just keeps moving forward even after lifting the finger, as no forces are acting to slow it down.
Is this what you want? in that case, there's no need to do anything in Update(). Inertia will keep the softbody moving. If you want the softbody to have a "base" velocity, just giving it an impulse at the start is enough. Again, assuming there's nothing slowing it down. It's my fault. I've got friction on the floor。
other question it:
How can I limit softbody speed(use addForce)?
How can I slow down the softbody speed?
Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
03-03-2021, 03:18 PM
(This post was last modified: 03-03-2021, 03:19 PM by josemendez.)
(03-03-2021, 03:12 PM)zero16832 Wrote: How can I limit softbody speed(use addForce)?
How can I slow down the softbody speed?
You can just clamp the velocity of each particle, same if you want to slow it down (by multiplying it by something smaller than 1, say 0.8)
Don't be afraid to iterate over all particles in the body and set their velocities, internally Obi does this literally dozens of times per frame (albeit using multithreading). Doing it in the main thread is slower, but there aren't enough particles in your softbody for this to have an impact on performance.
Posts: 23
Threads: 4
Joined: Feb 2021
Reputation:
0
03-03-2021, 03:34 PM
(This post was last modified: 03-03-2021, 03:40 PM by zero16832.)
(03-03-2021, 03:18 PM)josemendez Wrote: You can just clamp the velocity of each particle, same if you want to slow it down (by multiplying it by something smaller than 1, say 0.8)
Don't be afraid to iterate over all particles in the body and set their velocities, internally Obi does this literally dozens of times per frame (albeit using multithreading). Doing it in the main thread is slower, but there aren't enough particles in your softbody for this to have an impact on performance.
brust and oni Which is more efficient
(03-03-2021, 03:34 PM)zero16832 Wrote: brust and oni Which is more efficient I try to use brush and open inter in xiaomi 8,it FPS is too low
Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
03-03-2021, 03:44 PM
(This post was last modified: 03-03-2021, 03:50 PM by josemendez.)
Burst should be slightly more efficient in all cases, although not by a large margin. It uses Unity's Burst compiler and job system, and part of the data-oriented technology stack (DOTS) See: https://unity.com/dots
If running Burst in editor, make sure you disable the Job debugger as explained in the manual. Performance will be extremely low otherwise:
http://obi.virtualmethodstudio.com/tutor...kends.html
On a device, Burst's performance should be slightly better than Oni's. That's why Burst is the default backend, only if you don't have the required dependencies installed the engine will fall back to Oni.
Posts: 23
Threads: 4
Joined: Feb 2021
Reputation:
0
(03-03-2021, 03:44 PM)josemendez Wrote: Burst should be slightly more efficient in all cases, although not by a large margin. It uses Unity's Burst compiler and job system, and part of the data-oriented technology stack (DOTS) See: https://unity.com/dots
If running Burst in editor, make sure you disable the Job debugger as explained in the manual. Performance will be extremely low otherwise:
http://obi.virtualmethodstudio.com/tutor...kends.html
On a device, Burst's performance should be slightly better than Oni's. That's why Burst is the default backend, only if you don't have the required dependencies installed the engine will fall back to Oni. thx for your help!
other question it: when i move the softbody use (addforce) or (change the softbody.solver.velocities) the softbody shaking a lot. why?
|