Bird back to start
-
@faust07 said:
Thanks, Solo & ntxdave! I'm trying to evolve existing SP models and scripts and to use them for animation. There are a lot of insanely good examples in the Forum and in the warehouse such as path following scripts. Since SketchyPhysics is running very stable for a while (thanks to Anton_S and PituPhysics), it makes fun to experiment with it again. A small intermediate goal is, to send objects such as vehicles, walking people, birds, airplanes, ships etc into short continuous loops ... Unfortunately, my Ruby programming skills are still rudimentary.
@ Pilou: Yes, closed curves and small gaps would be good too. In the script a program loop should be built in with the meaning of - "if objekt is at the end of the path, start again at the beginning". Sounds simple, but I'm not able to write this ...
@Fredo6 is this something that could be done with the upcoming Animator?
-
Very nice birdy, faust07.
Here is the code to make the birdy loop on the desired curve.
setLinearDamping(5.0) onstart { curve_verts = $curPhysicsSimulation.findCurve("path01") @curve_length = $curPhysicsSimulation.getCurveLength(curve_verts) } ontick{ lookAt(evalCurveAbs("path01", (frame * 8) % @curve_length + 180)) dir = position.vector_to(evalCurveAbs("path01", (frame * 8) % @curve_length)) dir.length = dir.length / 12.0 push(dir.to_a) }
Of course, the main curve isn't quite "loopable", so the transitioning from the last point to the starting point won't be quite realistic until the curve is modified to be "loopable".
-
It's a code for SketchyPhysics or MsPhysics ?
Does it possible also in MSPhysics ?
-
The code is for SketchyPhysics (as the birdy was made for SP). Copy and paste it into the body of the bird into the script field.
Yes, everything done in SketchyPhysics can be tweaked to work in MSPhysics. (The code would look different however as the scripting functions differ in SketchyPhysics and MSPhysics.)
-
Thank you very much, Anton! Works like a charme:
And the script supplement looks so easy. Nevertheless, I still need some time to understand it.
Endless flying birds in the sky are no longer a problem...
-
this whole "SP-thing" is a miracle to me and with big eyes I am so amazed like a child
It's great to see the birdยดs flight, itยดs movements just like the perfect camera tracking.
When I myself am glad that any cube falls right down onto the ground, the here shown
SP-level is enchanting.just great!
-
Well done @faust07
Nice and smooth and the movement of the wings looks very realistic.
-
Thanks again for the kind words guys. Here a little more bird action ... Everything is normal SketchUp output. The possibilities for designing camera movements with SketchyPhysics are unlimited. Thats great! The bird is flying in Antons loop. The camera is controlled by the SUp scenes.
Hi Chri. Telepathy ... Unfortunately, I can only animate one bird. To copy Physics objects is very time consuming. But nothing is perfect...
-
Hi faust
Incredible Job !
Before I saw this, I did not think we could do this , with SKETCHUP.
Thanks for sharing
Chri
-
-
Haha. Talk about rampant development!
Advertisement