Spinning an image on the ball left or right?

druadic

20+ YEARS as a VP author. How time flies...
Site Supporters
Joined
Jun 9, 2003
Messages
1,272
Solutions
4
Reaction score
825
Points
131
Favorite Pinball Machine
Anything before 1939 (pre war), Firepower II, Agents 777
I've been trying to figure this out for sometime but fail to get it.

I KNOW there is a way to have ANY image to rotate or spin on the ball left or right. Can anyone give me some pointers? I'm not getting far with this. I just want to control if the ball rolls left, the image on it would roll left. If the ball moved to the right, it would roll right. ??? The speed on the image would correlate to the ball (spin) movement left or right.

I figured that Xpos would control this but how while on the ball? Any ideas would be greatly appreciated folks. I have checked out quite a few demos and have read up on these issues in VB but still am at a loss.

I have placed the image ON the ball and just want that image to move left and right. I am missing something but for the life of me I can't figure out what it is.

Thanks in advance.

d
 
Last edited:
You mean not have the Ball.Image roll around, just move left...or right in the ball's direction?

I don't know of any command to use for limiting the spin of the Front Image or Back Image.
I plead ignorant, but a workaround would be to declare the ball as a Dim when creating a ball, like (understand, just off the top of my head!!):

Code:
Dim ActiveBall, Place

Sub Plunger_Init()

Set ActiveBall = Plunger.CreateBall

End Sub

Sub Drain_Hit()

Drain.DestroyBall
Set ActiveBall = Plunger.CreateBall

End Sub

Sub Timer1_Timer()

If ActiveBall.X > Place Then
ActiveBall.Image = "RightSideImageName"
Else
ActiveBall.Image = "LeftSideImageName"

Place = ActiveBall.X

End If
End Sub

Needs work, yes.
Like this but with a set of rotating animations substituting for the ball's image in a fast Timer could werk. I just checked to see if I could pull up the ball's Timer but with no luck.
If we knew the internal name, but that's probably not accessible from script.
A shell running VP might be able to manipulate VP, but that's advanced programming.
I think VP Plus uses a shell to control VP with vb.net.
It allows for advanced graphics (can't say for sure about the ball.image though) , but the players then need both VP Plus and vb.net installed in order to play the resultant table.
 
Last edited:
Btw, if you have Visual Basic Express or Visual C++ Express installed and use it to open the VP.exe as a file, you can view the available commands and methods under VBA Test Lib in the list that appears, but these are only the same as those documented by WizardsHat(sp?).
There is a property,
Ball.UserValue
but I don't know what to make of it.
 
You mean not have the Ball.Image roll around, just move left...or right in the ball's direction?

No, Will wants to have the ball image rotate as the ball moves. I told him I didn't think it could be done, but did send someone's demo that probably wasn't any help.
 
Doesn't the ball front and back decal do that?
Don't use the ball's main Image feature. It doesn't move.
Just use the Options > Table > Ball > Front and/or Back Decal.

I think if you use both the Ball Image and the Ball Front/Back Decal, then VP applies the decal as a rotating texture to the static main Image.
 
Last edited:
You can also tint the ball at the same time there is an Image.
Use
Set (Dim name) = Plunger.CreateBall 'or any Object that can create a ball, Kickers, etc.
Set (Dim name) = Kicker1.CreateBall

like in the above code I used the Dim name ActiveBall
Then wherever you want, type
ActiveBall.Color = RGB(255, 0, 0)

Replace "ActiveBall" with the name of your Dim
The tint of the Ball with Image and Decals applied will be Red.
For a Green tint use
ActiveBall.Color = RGB(0, 255, 0)
 
The ball decal is really an illusionary effect and doesn't actually follow the roll direction of the ball, the ball decal will spin on a stationary ball for example.
 
I know there is a way and I ALMOST have it. I want to SPIN the decal or image on the ball as it rolls left or right. It must spin accordingly to the movement of the ball's speed. It CAN be done. It will take me time.

If I can make a script with length control, I sure as hell can find this out. It will just take time.

I appreciate the comments, but still have to find a solution. It's there, I just don't see it as of yet.

d
 
There is no solution to make a ball with a single image appear to spin realisticly at the moment in VP, so you are spinning your wheels here. You can include many ball images and have the ball change its image rapidly and make it appear it is spinning. There is a table with 2 or 3 thousand ball images in it for reflections and even it doesn't make the ball appear to be spinning. You can make the ball appear to spin with Velx and VelY..... Rascal made a nice one with just 6 or so images which gives the ball a look of rolling, but I think tracking individual balls slow VP down if you have an older pc. To take a ball and put a Happy Face on it (not a ball roll decal) and expect it to look like it is really rolling around is not going to happen by us scripting it and running it on an old/cheap pc, which I think all of us at PN have....
 
Okay, I found something but it seems I have to use an external proggie along with VP. This is easily added but I wonder if it's worth the fuss. I'll have to check this out over my 11 days off.

With the demo I've seen, you can rotate ANY image using VB using this external program. So we'll have to wait and see. The demo itself rotates quite perfectly and is liquid smooth. IF I have time I'll check this out but I have 7 WIP on my desktop and those are top priority.

d
 
Okay, I found something but it seems I have to use an external proggie along with VP. This is easily added but I wonder if it's worth the fuss. I'll have to check this out over my 11 days off.

With the demo I've seen, you can rotate ANY image using VB using this external program. So we'll have to wait and see. The demo itself rotates quite perfectly and is liquid smooth. IF I have time I'll check this out but I have 7 WIP on my desktop and those are top priority.

d

An important question; would the external program be needed to play your table? If so, I doubt many folks would bother with it, no matter the game or the author. Greywolf makes some very nice tables, but since he uses extra support files, a lot fewer people download his games than would be the case if it were simpler.
 
Last edited:
An important question; would the external program be needed to play your table? If so, I doubt many folks would bother with it, no matter the game or the author. Greywolf makes some very nice tables, but since he uses extra support files, a lot fewer people download his games that would be the case if it were simpler.

John;

It's just an option actually. You can do that but don't have to. There's more to rotating an image in any type of VB program. It just takes work. I have other code that will rotate an image by 1%. Of course it's a memory hog but it works. Rascal's code is wonderful and works like a charm. I can learn from his scripting abilities and adapt what I have into it. More than likely I will rotate my images at 5%.

d
 
Last edited:
I just remembered a table that used one of my ball images in an intersting way that might be adapted to at least simulate ball rotation. I'll e-mail you the table in a while.
 
Thanks John; got both items from you. I'll have to run VP6 to see what you have with the Pirates table. These seem to be close to what I want but I have to get a good graphics proggie that will rotate an image 5% at a time since PhotoBrush won't do it. It only does it via "arbitrary" which means the WHOLE image is turned. SUCKS.

Oh well, I'll find another way to turn those images. As for the ball "rolling" left and right I got it working. It's not that tough and Rascal's tutorial did give me some ideas. I got an image to turn left and right and roll both ways smoothly.

Thanks guys.

d
 
Hi druadic, I used a free program called CB Model Pro to make my ball images rotate.
Download it here. http://www.cbmodelpro.com/

You can hopfully put your ball texture on a sphere object in this program and rotate it as you like. Capturing the rotation frames out to bmp files as you go. My rotating ball demo uses this program for the texture that moves and then I placed a semi-transparent ball image over it for the ball reflection.

This little modeler program is nice and easy to work with. I made my bowler man in Ten Strike Classic with this program too.

My script in that demo rolls the ball up and down. You can do right and left by watching the velx of a ball and adjusting the rotation time and image loop with those settings.

Here is another fine program for easy 3d modeling. http://www.sculptris.com/
 
Last edited:
The Gimp > Filters > Map > Map Object can do it.
Load a picture and then in Map Object > Options choose Map to: Sphere from the pull-down and click the Orientation tab,
then adjust the Rotation X (diagonal) Y (horizontal) or Z (vertical) slider.
 
Last edited:
Thanks for the links rascal. I have no idea why I decided to DL them, because I'm sure none of it will make a bit of sense to me. I guess I still believe in Beginner's Luck.
 
Hi druadic, I used a free program called CB Model Pro to make my ball images rotate.
Download it here. http://www.cbmodelpro.com/

You can hopfully put your ball texture on a sphere object in this program and rotate it as you like. Capturing the rotation frames out to bmp files as you go. My rotating ball demo uses this program for the texture that moves and then I placed a semi-transparent ball image over it for the ball reflection.

This little modeler program is nice and easy to work with. I made my bowler man in Ten Strike Classic with this program too.

My script in that demo rolls the ball up and down. You can do right and left by watching the velx of a ball and adjusting the rotation time and image loop with those settings.

Here is another fine program for easy 3d modeling. http://www.sculptris.com/


Rascal;

Thanks for posting this over here. I am not allowed over at VPF so I am glad you posted this - thank you so much for the help.

d
 
Thanks for the links rascal. I have no idea why I decided to DL them, because I'm sure none of it will make a bit of sense to me. I guess I still believe in Beginner's Luck.
It's not to bad John, it's like modeling clay kinda. Takes some practice, but it is by far, easier then most 3D programs. It's fun to mess with anyway, even if most everything I make with it ends up being a blob. :)

@druadic - I'll visit here more frequently and keep in touch with you guys. I barely post in the threads even over at VPF. I've never been one to post up a storm. My post count over there is only 448 and I've been there almost since it openned.

By the way guys, I started a fresh WIP of my 1938 Genco Jungle table in VP9. I'm getting carried away (as usual) and making it into a history lesson about Chicago, Genco, the Gensburg brothers, and the times back in 1938. About the time you finally get to the table to play, your bored stiff. ;)

If you guys come across any pictures of David, Lou, or Meyer Gensburg in your journeys, please hold on to them for me. These guys were into everything, from Chicago to Vegas, from the 20's to the 60's, but yet finding a picture of them seems impossible. I think there is quite a hidden story behind these guys, probably worthy of a book. ;)

So far I've found a low res pic of David G. and his wife, and a contact person at the Nevada library where they want $15 for a high res scan of a ribbon cutting at the Vegas Riviera hotel (two of the brothers are listed to be in that picture).

Anyway, it's an interesting easter egg hunt on the Internet. Something I think everyone would enjoy. Anybody that thought that pinball is just a game, needs to take a fun Internet journey into it's past.
 
It's not to bad John, it's like modeling clay kinda. Takes some practice, but it is by far, easier then most 3D programs. It's fun to mess with anyway, even if most everything I make with it ends up being a blob. :)

@druadic - I'll visit here more frequently and keep in touch with you guys. I barely post in the threads even over at VPF. I've never been one to post up a storm. My post count over there is only 448 and I've been there almost since it openned.

By the way guys, I started a fresh WIP of my 1938 Genco Jungle table in VP9. I'm getting carried away (as usual) and making it into a history lesson about Chicago, Genco, the Gensburg brothers, and the times back in 1938. About the time you finally get to the table to play, your bored stiff. ;)

If you guys come across any pictures of David, Lou, or Meyer Gensburg in your journeys, please hold on to them for me. These guys were into everything, from Chicago to Vegas, from the 20's to the 60's, but yet finding a picture of them seems impossible. I think there is quite a hidden story behind these guys, probably worthy of a book. ;)

So far I've found a low res pic of David G. and his wife, and a contact person at the Nevada library where they want $15 for a high res scan of a ribbon cutting at the Vegas Riviera hotel (two of the brothers are listed to be in that picture).

Anyway, it's an interesting easter egg hunt on the Internet. Something I think everyone would enjoy. Anybody that thought that pinball is just a game, needs to take a fun Internet journey into it's past.


Rascal;

I know the feeling. I've been back for a few months and I already have over 300 posts here! Over at VPF I don't think I would post that much really. I did download the one proggie and hope to use it soon but Genco's Good Luck is taking up TONS of my time. I have a few more PF fixes to implement and it's ready for the scripting. This one has been worth every moment I have worked on it and it's been fun.

I did see a David G image not too long ago. OLD pic too. I'll have to look for it again. I can't remember for the life of me where I saw it though.

Thanks again Rascal, your presence here is a breath of fresh air and is always welcome.

d
 
The ball decal is really an illusionary effect and doesn't actually follow the roll direction of the ball, the ball decal will spin on a stationary ball for example.
I never actually realised that, if so. I wonder then how VP decided to relate the spin illusion to the ball's velocity and location. It did seem to be a generally-effective illusion, going back all the way to... maybe VP5 or so?

I also wonder if, with all the progress on VPX through the years, VP now has an accurate, physics-based system of decal rotation. Maybe direct rotation commands now too, similar to the old 'Ball.VelX, Y, Z' stuff?
 
Forum activity
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      Chat Bot Mibs Chat Bot Mibs: Wolfkell is our newest member. Welcome!
      Back
      Top