MadMax50 Posted January 2, 2019 Share Posted January 2, 2019 Hello, I am currently reading the solver page on cigiwiki here: http://www.tokeru.com/cgwiki/index.php?title=The_solver_sop I am at the second example where he talks about faked physics. (the ball falling with gravity) I got everything to work but I am curious to know why I am able to initialize some attributes inside the solver but not others. I can't initialize the @v attribute inside the solver but I am able to initialize the @gravity just fine. He states this " Something to keep in mind with solvers is to ensure any values you plan to change within the solver, are initialised before the solver. It's easy to forget this, and do your value initialisations inside the solver, and it doesn't work as you expect. Here for example, you could define @gravity inside the solver, and that's fine, because it doesn't change. If you do that with @v though, the ball just sails up and away forever. This is because you're not letting @v use the result of the previous frame's result of @v, so it never gets adjusted. I don't really understand the last sentence : This is because you're not letting @v use the result of the previous frame's result of @v, so it never gets adjusted. why is @v is not using the previous frames result inside the solver but @gravity does?? I will attach the scene file. Thank you! Solver_fake_physics_demo.hipnc Quote Link to comment Share on other sites More sharing options...
bunker Posted January 3, 2019 Share Posted January 3, 2019 v@v is the initial velocity so you need to initialize v outside the solver SOP gravity is a constant so it doesn't matter if it's set on every frame inside the solver SOP or not Solver_fake_physics_demo2.hipnc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.