Jump to content



Photo
* * * * * 10 votes

The VP 10.2 beta thread

vpx beta

  • Please log in to reply
1353 replies to this topic

#1341 fuzzel

fuzzel

    spaghetti code

  • VP Dev Team
  • PipPipPipPipPip
  • 2,818 posts

  • Flag: Germany

  • Favorite Pinball: yes I have

Posted 26 October 2018 - 10:08 AM

Yes. The animation is pretty simple and it's not intended to be used with a big animation sequence more than lets say 100 frames.
But in theory you're right. Import 21000 different meshes and VPX will play each frame by flipping the meshes.

#1342 3rdaxis

3rdaxis

    Pinball Fan

  • VIP
  • 718 posts

  • Flag: United States of America

  • Favorite Pinball: The Addams Family

  • PS3 Gamer Tag: Thirdaxis01

Posted 26 October 2018 - 10:15 AM

Thanks Fuzzle. But how do I name them? say I have a Primitive with ten frames in the sequence. I will export the first one on frame (1 out of 10) as Prim_10.obj. Then I would export the second one on frame (2 out of 10) as Prim... what?

Prim2_10? But then I only need to call the first one in the script? Prim_10.Playanim 0,1?


Edited by 3rdaxis, 26 October 2018 - 11:26 AM.


#1343 3rdaxis

3rdaxis

    Pinball Fan

  • VIP
  • 718 posts

  • Flag: United States of America

  • Favorite Pinball: The Addams Family

  • PS3 Gamer Tag: Thirdaxis01

Posted 26 October 2018 - 10:43 AM

So lost. Wait, I think I figured it out. I would name them Prim_1 - Prim_10?  But I still can't figure out what one to call in the script? And I would make them all invisible? I'm spending way to much time trying to figure this out, lol.


Edited by 3rdaxis, 26 October 2018 - 11:58 AM.


#1344 3rdaxis

3rdaxis

    Pinball Fan

  • VIP
  • 718 posts

  • Flag: United States of America

  • Favorite Pinball: The Addams Family

  • PS3 Gamer Tag: Thirdaxis01

Posted 26 October 2018 - 12:22 PM

Okay, I think I understand how you worked it. Thanks Fuzzle. https://www.youtube....eature=youtu.be

What i'm trying to do... https://www.youtube....eature=youtu.be


Edited by 3rdaxis, 26 October 2018 - 12:41 PM.


#1345 3rdaxis

3rdaxis

    Pinball Fan

  • VIP
  • 718 posts

  • Flag: United States of America

  • Favorite Pinball: The Addams Family

  • PS3 Gamer Tag: Thirdaxis01

Posted 26 October 2018 - 12:58 PM

Test_1 https://www.youtube....h?v=BPSnOH2e-jY

Test_2 https://www.youtube....eature=youtu.be

Test_3 https://www.youtube....eature=youtu.be


Edited by 3rdaxis, 26 October 2018 - 01:32 PM.


#1346 fuzzel

fuzzel

    spaghetti code

  • VP Dev Team
  • PipPipPipPipPip
  • 2,818 posts

  • Flag: Germany

  • Favorite Pinball: yes I have

Posted 26 October 2018 - 03:53 PM

You got it :) ! If you have a 10 frames animation you must export each frame to a seperate mesh (mesh_1.obj for frame 1, mesh_2.obj for frame 2, mesh_3 for frame 3 and so on).

From the commandreference.txt:

 

The following only applies to mesh primitives with an animation sequence
------------------------------------------------------------------------
PlayAnim(float startFrame, float speed) - start playing the sequence from 'startFrame' til the end with frame rate 'speed'
PlayAnimEndless(float speed)            - start playing the sequence in a loop with frame rate 'speed'
StopAnim()                              - stop the animation
ContinueAnim(float speed)               - continue a stopped animation with frame rate 'speed'
ShowFrame(float frameNr)                - show the mesh at frame 'frameNr', where 'frameNr' can also be a fractional frame number like 1.23. VP will interpolate between subframes.
 

for example to play a looped animation with full speed use: "PlayAnimEndless(1)" , play the animation with half speed "PlayAnimEndless(0.5)"

So the speed value is an offset that is add to the frame counter. Higher values will speed up the animation.



#1347 batch

batch

    VPFroggie

  • Members
  • PipPipPipPipPip
  • 2,152 posts
  • Location:Center of France

  • Flag: France

  • Favorite Pinball: Anyone if gaming and appearence are great

Posted 26 October 2018 - 03:59 PM

VP 10.2 beta thread ?

 

Not VP 10.5 ?


signature_11042026.jpg          DIRECT LINK TO MY TABLES http://www.vpforums....loads&mid=30858    

                                               LINK TO MY 204 BACKDROPS : Design Resources/ Main Resources/Table Templates/Table Resources/Backdrops for VPX Tables (DT 16/9)  2.0 


#1348 vogliadicane

vogliadicane

    Pinball Fan

  • Members
  • PipPipPipPip
  • 517 posts
  • Location:Velbert

  • Flag: Germany

  • Favorite Pinball: The Addams Family

Posted 26 October 2018 - 06:34 PM

I can't beleive it. First I thought, is this really necessary? Now seeing what you've done, I can only say "woow". Kudos for your passion for details :dblthumb:



#1349 3rdaxis

3rdaxis

    Pinball Fan

  • VIP
  • 718 posts

  • Flag: United States of America

  • Favorite Pinball: The Addams Family

  • PS3 Gamer Tag: Thirdaxis01

Posted 26 October 2018 - 09:52 PM

 

I can't beleive it. First I thought, is this really necessary? Now seeing what you've done, I can only say "woow". Kudos for your passion for details :dblthumb:

 

Thanks brother. Something I've wanted to do for awhile now that I knew would pay off. it's not perfect and needs to be a bit more subtle but for a first run it's fine.

Thanks again Fuzzle. Took me awhile to wrap my brain around this one. I've narrowed it down to 6 prim's per target with the in-between frames it works just fine. I like the adjustability you've implemented. VPX never ceases to amaze me:) :give_rose:



#1350 3rdaxis

3rdaxis

    Pinball Fan

  • VIP
  • 718 posts

  • Flag: United States of America

  • Favorite Pinball: The Addams Family

  • PS3 Gamer Tag: Thirdaxis01

Posted 26 October 2018 - 11:22 PM

Some sling shot bounce;) https://www.youtube....h?v=UmhPOqUF3vw



#1351 Ben Logan

Ben Logan

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,275 posts
  • Location:California

  • Flag: ---------

  • Favorite Pinball: System 11

Posted 26 October 2018 - 11:28 PM

Target animation looks great!

#1352 3rdaxis

3rdaxis

    Pinball Fan

  • VIP
  • 718 posts

  • Flag: United States of America

  • Favorite Pinball: The Addams Family

  • PS3 Gamer Tag: Thirdaxis01

Posted 27 October 2018 - 09:08 AM

So this was an interesting find for me and a huge unknown fuzzle. You can actually delete all of the primitives after you import them with their accompanying frames except the last one (Prim_10) and it still works?! A lot of work but cheap none the less. This is great! So I can make an animation 3000 frames long and it will still only be one primitive. :otvclap: I can't be the only person that knows this?


Edited by 3rdaxis, 27 October 2018 - 10:09 AM.


#1353 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 27 October 2018 - 12:28 PM

One quirk you should know, Playanim will play the animation at different speeds depending on your framerate

To get it to play back more accurately you can count frametime (using a -1 interval timer which updates every frame) then multiply your play speed against that

Dim FrameTime, LastFrame 
Sub GameTimer_Timer()
        FrameTime = gametime - InitFrame : LastFrame = GameTime    'Calculate frametime using the 'gametime' global
End Sub

Sub zCol_Band_Anim1_Hit():RubberAnim_1.Playanim 0, 6/1000*FrameTime:End Sub

Alternatively you could use script timers to run the animation using showframe instead of playanim



#1354 3rdaxis

3rdaxis

    Pinball Fan

  • VIP
  • 718 posts

  • Flag: United States of America

  • Favorite Pinball: The Addams Family

  • PS3 Gamer Tag: Thirdaxis01

Posted 27 October 2018 - 03:47 PM

Thanks nFozzy that's good to know. I'm like a kid in a candy store with this stuff. I'm off to the races;)







Also tagged with one or more of these keywords: vpx beta