Phonic does it again.
-
Phonic is a modeler who posts SP models to 3dwarehouse. He doesn't do very many but the ones he does are always amazing.
He just posted his first SP3 model and it is very cool.
http://sketchup.google.com/3dwarehouse/search?uq=10947649087242517073&scoring=d
I cant wait to see what he able to do next.
-
After looking at the model in depth it is no less impressive for the amount of work it must have been. Many of the formulas are "if frame do this else do this else do this else do this". After thinking about it there is a easier way.
NOTE this is pretty advanced stuff. Dont be worried if you dont understand it right away (or ever).
[0.12,1,0.3,0.2,1,0.3,0.2,1.23][(frame/30)%7]
This formula will start at 0.12 and at frame 30 change to 1 and at frame 60 change to 0.3 etc 90=0.2 etc.
The first group in the [] is the values to go through. The second [] is an index into the values[].
**Edit:**Changed the formula (%7) so it repeats correctly. Not changed in the attached model however.
-
Hey Chris, this attached model has some problems. i have the rotation servo for the turret set to rotate at intervals of 0.05 over 25 frames, but it suddenly moves back to the origin halfway through! I can't figure it out. I want to build an automatic turret that can fire without control while flying a plane through the stream of projectiles and trying to blow up a target near it. Do you know the reason for this? The elevation for the turret works as i specified. What is the reason for the inconsistency? Help!
-
I found something else. Although i am not sure if i am missing something in the [(frame/250)%7] part, i found a glitch. the rotation is set to span over a lapse of 250 frames, and elevation is set for 25. so i calculated that, since 250 % 25 = 10, the the elevation would cycle through all the specified movements 10 times before 1 cycle with rotation. The elevation ended up cycling 10 times, but the rotation cycle quit halfway through and restarted. i then projected it would be 20 cycles for elev. if the rot. worked correctly. That isn't right! What happened?
-
Not sure if I know what the problem is but here is how that formula works.
[0.12,1,0.3,0.2,1,0.3,0.2,1.23][(frame/30)%7]
The first part in the square brackets is the numbers to cycle through obviously.
The part in the second brackets says which number to use based on the frame.(frame/30)
Means the frame number will advance every 30 frames.
The %7 part says that when you get to frame 8 (or in this case 8*30) start back at 0. The %number part should be the same number as the number of items in the first square bracket part.
Not the only problem is %7 is wrong for the example I gave. It should be %8
There will be a clearer way of doing the same thing in the next version.
Chris
-
Thanks!
-
-
Very cool. Laser beam precision.
-
With this code, you can sequence emitters; Fire with A. (This took literally 2 minutes to make, I'm not claiming it's a masterpiece)
-
Advertisement