Bird back to start

Moderator: CPhillips

Bird back to start

Postby faust07 » Thu Feb 18, 2016 9:28 pm

I need help to bring the bird back to the beginning of the curve, and then to let him fly in an infinite loop. The script is in the body of the bird. Thanks in advance!
1

faust07 
 

Re: Bird back to start

Postby solo » Thu Feb 18, 2016 9:42 pm

I have no idea, however I'm impressed with the video of what you have achieved, the camera is also well done on how it tracks the bird.
0
http://www.solos-art.com

If you see a toilet in your dreams do not use it.
User avatar
solo 
Global Moderator
 

Re: Bird back to start

Postby ntxdave » Thu Feb 18, 2016 11:06 pm

Really cool........does SketchyPhysics allow you to define a path?

I assume not or you would already have it in the animation. The motion is very smooth (both the bird and the camera). Well Done...... :thumb: :thumb:
0
User avatar
ntxdave 
 

Re: Bird back to start

Postby pilou » Thu Feb 18, 2016 11:08 pm

Why not have a closed curve? Or with a very tiny gap?
Or with the gap = last segment = first segment
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: Bird back to start

Postby faust07 » Fri Feb 19, 2016 12:13 am

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 ...
0

faust07 
 

Re: Bird back to start

Postby ntxdave » Fri Feb 19, 2016 12:58 am

faust07 wrote: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?
0
User avatar
ntxdave 
 

Re: Bird back to start

Postby Anton_S » Fri Feb 19, 2016 11:23 am

Very nice birdy, faust07.

Here is the code to make the birdy loop on the desired curve.
Code: Select all
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".
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: Bird back to start

Postby pilou » Fri Feb 19, 2016 11:27 am

It's a code for SketchyPhysics or MsPhysics ?

Does it possible also in MSPhysics ?
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: Bird back to start

Postby Anton_S » Fri Feb 19, 2016 11:30 am

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.)
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: Bird back to start

Postby faust07 » Fri Feb 19, 2016 7:16 pm

Thank you very much, Anton! Works like a charme: :thumb:
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...
3

faust07 
 

Re: Bird back to start

Postby HornOxx » Sat Feb 20, 2016 11:35 am

:thumb: :thumb: :thumb:
this whole "SP-thing" is a miracle to me and with big eyes I am so amazed like a child :o
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!
0
never trust a skinny cook
User avatar
HornOxx 
 

Re: Bird back to start

Postby ntxdave » Sat Feb 20, 2016 5:45 pm

Well done @faust07 :thumb: :thumb:

Nice and smooth and the movement of the wings looks very realistic.
0
User avatar
ntxdave 
 

Re: Bird back to start

Postby chri » Sat Feb 20, 2016 10:33 pm

Hi faust

Incredible Job !

Before I saw this, I did not think we could do this , with SKETCHUP.

Thanks for sharing
Chri
0
Last edited by chri on Sun Feb 21, 2016 8:28 pm, edited 1 time in total.
User avatar
chri 
 

Re: Bird back to start

Postby faust07 » Sat Feb 20, 2016 10:47 pm

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...
0

faust07 
 

Re: Bird back to start

Postby faust07 » Mon Feb 22, 2016 8:10 pm

Benchmark for Sketchy Physics...
0

faust07 
 

Re: Bird back to start

Postby pbacot » Mon Feb 22, 2016 9:47 pm

Haha. Talk about rampant development!
0
MacOSX Mojave High Sierra SketchUp Pro v19 Twilight v2 Thea v2 PowerCADD
User avatar
pbacot 
Top SketchUcator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to SketchyPhysics

Who is online

Users browsing this forum: No registered users and 2 guests

Visit our sponsors: