Jump to content

solver-initializing attributes- basic question


MadMax50

Recommended Posts

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...