Jump to content
WnSoft Forums

Rolling ball


Peter S

Recommended Posts

I have been trying to make a ball look as if it is rolling across a surface and have not had much success. I followed Lin's tutorial from Aug/Sep last year on the 3D cube and used Photoshop's transformation to make a sphere but I am struggling to make any motion look realistic.

I would be grateful for any suggestions as to how I might go about getting a decent result.

Peter

Link to comment
Share on other sites

Hi Peter,

I think the "secret" to getting a natural look is matching the rotational degree to the distance traveled. A rolling sphere will travel 360 degrees in the distance described by it's circumfrence which is found by the formula "pie x diameter" or 3.14159 times the diameter of the sphere. So if you make the ball a diameter which can be "rolled" in some even multiple across the visible distance of the screen, the action will appear "natural" to the observer - otherwise it will seem like it's slipping or spinning rather than rolling.

Let's take an example. Let's say your monitor measures 15 inches across. Remember that that the horizontal distance must be measured from the resting place (which is the "center" of the sphere) to the final resting place. If the ball were to roll from left to right beginning at the extreme left of the monitor and the diameter of the sphere were 4 inches, then it would actually begin its movement at two inches from the extreme left side of the monitor and finish 2 inches from the extreme right. This subtracts 4 inches from the 15 leaving you with 11 inches. 4 time 3.14159 = 12.5 inches so the ball would need to be less than 4 inches in diameter. So let's say it was two inches in diameter. Then you would have 13 inches to work with and a complete rotation would require 6.283 inches so you would get two complete rotations in 12.566 inches of space to look "normal". Essentially then for a monitor width of 15 inches you could "roll" the ball 720 degrees from edge to edge and it would look about normal.

The sample below is far from "perfect" but just an approximation....... It also helps to have some reference for the ball to "roll on" such as a floor, etc., so I've put in a really crude line for reference. Also my "globe" isn't perfectly round which doesn't help. If you pay attention to all the details of distance versus rotation, roundness of the ball and a decent reference such as a floor or the ground, etc., it should look realistic.

Here's a link to the quick and dirty sample:

http://www.lin-evans.net/p2e/rollingball.zip

Lin

I have been trying to make a ball look as if it is rolling across a surface and have not had much success. I followed Lin's tutorial from Aug/Sep last year on the 3D cube and used Photoshop's transformation to make a sphere but I am struggling to make any motion look realistic.

I would be grateful for any suggestions as to how I might go about getting a decent result.

Peter

Link to comment
Share on other sites

Hi Lin,

That was fun and I like the see saw too. I am afraid I didn't explain myself very well in the first place. I was trying to represent the situation if someone was looking down onto a lawn and seeing a ball move. The ball would only be about 4 inches in diameter and it would travel upto around 40 yards. It's obviously easy to create a diagramatic representation but I thought there must be a way of making something a bit more realistic . The 3D transform gave me a less flat looking ball but I probably need to add some sort of moving curve effect over the balls surface. I am sorry I was not more explicit in the first place. I will in fact have an opportunity to apply your thinking sometime later in this project so thanks for your reply.

Peter

Link to comment
Share on other sites

Hi Dom,

Thanks for your suggestion. I created a Yahoo briefcase account and uploaded a file to try to show what I was atempting. It seems I need other peoples Yahoo IDs to enable them to download the file so I am not sure if this was a worthwhile exercise. Can you please tell me what I need to do to get this file so you can see it?

Peter

Link to comment
Share on other sites

Hi Hawk,

Yes it was but I don't think it is anymore. Briefcase takes a bit of getting used to I guess. Hopefully it will be possible to use this link to download the very small file I have used to illustrate the type of thing I was trying to achieve. I have a feeling it may be too complex to be worthwhile as I will be producing quite a lot of different diagrams. I tried to see what the movement looked like with small balls that would be used for movement across an entire lawn and larger balls for shorter movements. The 3D transform certainly looked better than the flat disc to my eyes but still rather unrealistic.

Here is the link. (Hopefully)

http://uk.briefcase.yahoo.com/bc/dorset_co...=bc&.view=l

Peter

Link to comment
Share on other sites

Hi Dom and Hawk,

I'm currently suffering from a severe case of frustration. My folders in briefcase are set to Private and stubbornly refuse to change to anything else. I keep going round and round different screens with occasional "no access" messages and cannot make the changes I need to. The instructions look simple enough but I can't get it to work for me.

Peter

Link to comment
Share on other sites

Ralph, Dom,

Thanks for your interest. Success - I think! With uploading files to the web at least.

I have now created a googlepages web site that I think should allow you to see what my "rolling balls" question is all about.

Go to

http://dorsetimages.googlepages.com/

THIS DOES NOT WORK IF YOU TYPE IN www.<site name>. It has to be as shown above.

I have set this site up specifically to allow me to make files available in this forum and have started with something very small and I hope it works.

Although I use PTE primarily for slide shows this something differentand is perhaps an application for which PTE was not intended. I have not however seen anything else that has the flexibility to include these types of diagrams with images from a digital camera.

It would be good if there is a way to simulate the rolling ball but so far I have not found anything convincing. I am hoping someone can come up with an imaginative solution.

Peter

Link to comment
Share on other sites

Hi Peter,

I changed the levels in Photoshop on the yellow ball so that the "golf ball" type detail could be better revealed, then gave it a 360 clockwise rotation on the first slide and a -1440 degree rotation on the second. Here's a link to the modified pte - see it this is more what you are looking for?

http://www.lin-evans.net/pte/rollingball2.zip

Lin

Ralph, Dom,

Thanks for your interest. Success - I think! With uploading files to the web at least.

I have now created a googlepages web site that I think should allow you to see what my "rolling balls" question is all about.

Go to

http://dorsetimages.googlepages.com/

THIS DOES NOT WORK IF YOU TYPE IN www.<site name>. It has to be as shown above.

I have set this site up specifically to allow me to make files available in this forum and have started with something very small and I hope it works.

Although I use PTE primarily for slide shows this something differentand is perhaps an application for which PTE was not intended. I have not however seen anything else that has the flexibility to include these types of diagrams with images from a digital camera.

It would be good if there is a way to simulate the rolling ball but so far I have not found anything convincing. I am hoping someone can come up with an imaginative solution.

Peter

Link to comment
Share on other sites

Hi Lin , Dom,

It's not quite what I was after. These balls are spinning rather than rolling. I hope that makes sense. If you look down on a ball from above and imagine a red arrow on the top of the ball pointing in the direction of travel and a second yellow arrow following it but hidden underneath the ball. As the ball rolled forwards you would see the red arrow disappear in the direction of travel and the yellow arrow appear and this would keep repeating. I could show this in slow motion by a series of images produced in Photoshop if that would help but...

I have a feeling that this is impossible to create in PTE as the rotation is in the "wrong" plane.

I have however seen many other things on this forum that I would not have thought posible.

Peter

Link to comment
Share on other sites

Hi Peter,

What you are trying to do can't be done really in any software without elaborate creations of sequential images. You can't actually make a two dimensional object perform a 3 dimensional effect. For example, if you take a ball, put it on a surface, photograph it, then rotate it about 12 degrees, photograph it again and repeat until you have 30 frames then you have actually created a still representation of a video. Of course it would be ever so much easier to just put your video camera on a tripod and roll a ball then take the AVI file, use a video decompiler and break it down into the number of frames which represent a 360 degree rotation and use these frames sequentially in P2E or other software to actually sequence the effect.

You see, P2E or any 3D software can't create what isn't there. A ball can't be rotated the way you would like it to be unless the raw material is available to the program to support this. For example, the Earth spins on its axis with the N and S pole in sort of the up and down position relative to the way we normally think of up and down. So as it spins we see the equatorial view if we are observing from the equator. However, if we were observing from either of the poles it would appear to be spinning in a clockwise or anti-clockwise direction. So if you were trying to simulate the solar system, you would simulate it in 3D by observing from an imaginary position above or below the solar system, otherwise we couldn't rotate the planets without using the multiple photo scenario mentioned above. So the way you can actually achieve what you want is to take either a still camera and rotate the ball 12 degrees, snap the photos, repeat 29 more times then you have a ball which can be made to appear to do what you want. This is the way 3D graphics programs such as those used in 3D games work. My illusion and the one created by theDom are correct for the side perspective of seeing the ball roll past but incorrect for seeing it from above. To make it look correct from above you need about thirty keypoints and 30 different images. The slower the ball appears to roll, the more images you actually need. It "can" be done with PTE but not with a sphere illusion created in Photoshop's render 3D. That one is only good for sidewise simulation.

Best regards,

Lin

Hi Lin , Dom,

It's not quite what I was after. These balls are spinning rather than rolling. I hope that makes sense. If you look down on a ball from above and imagine a red arrow on the top of the ball pointing in the direction of travel and a second yellow arrow following it but hidden underneath the ball. As the ball rolled forwards you would see the red arrow disappear in the direction of travel and the yellow arrow appear and this would keep repeating. I could show this in slow motion by a series of images produced in Photoshop if that would help but...

I have a feeling that this is impossible to create in PTE as the rotation is in the "wrong" plane.

I have however seen many other things on this forum that I would not have thought posible.

Peter

Link to comment
Share on other sites

Hi, Peter,

Is this along the lines of what you are looking for? I know it's a pretty accurate simulation of most of my golf games in the past. B) You can download it HERE.

I'm sure JP and Dom could, with a little PS and spreadsheet work, could come up with a much better-looking effect! :)

Link to comment
Share on other sites

Hi Al,

Thanks for your simulation. I think it is probably as good as is reasonable without vast numbers of key points. I think Lin's explanation is clear as to why this is such a difficult nut to crack.

How did you achieve your effect? You seem to have put three balls in a frame, displaced them by a very small amount and then switched opacities on and off. Is that correct?

I am sorry that you often end up right on the lip and they just refuse to drop! MOst annoying. <_<

Peter

Thanks also to all the other contributors.

Link to comment
Share on other sites

with a little PS and spreadsheet work, could come up with a much better-looking effect!

As you ask, I did very quickly, without spreadsheet a little test where there are 3 modifications :

The number as notice Peter S was spinning

The light on the ball which must be always from the same point

The shadow.

Test ball here edit : The link has been change for the new version

With time it's possible to do better (for instance make the white grey when in the opposite of the light) and better calculation of the width of the number.

Link to comment
Share on other sites

Jean-Pierre,

That is amazing. I really did think the effect you achieved on the lowest ball was impossible. I might have guessed that there is no such word in your dictionary.

Could you please post the PTE file with an explanation. I would really love to know how you managed it and it seems quite quickly.

Thanks very much for this and your many other insights.

Peter

Link to comment
Share on other sites

Could you please post the PTE file with an explanation

I have made a more complete version, the template is here. I added an elliptic movement for the number to be better. The shadow isn't perfect, it will be necessary to redo it. I changed the distance gone through by the ball (pi x D) for every rotation.

During each half rotation the number has an opacity of 100% an 0.4% for the other half rotation (0.4% and not 0%, it's in order there are always the same quantity of calculation to do, it make all the effects more regular).

The 2 values of the elliptic's object are at the same value which make the hight of the ellipse at 0 (on the same line).

There are 7 points for the width of the number (100% when in the middle, 70.7% at 1/4 position) to be more realist.

In the example there are 2 rotations.

It's possible to put the number at another place than in the middle (made on slide #2) and to change its color during the rotation (white to grey) , but I haven't do that.

Link to comment
Share on other sites

Jean-Pierre,

This work, the Hellicopter Rotor and many previous demos have made me realise how important it is to understand the use of rectangles and the parent child relationship if you wish to make complex movements. It may not be widely read but I am sure someone could write a whole book on this fascinating topic! When it is explained it all seems logical. Seeing the solution in the first place does however take a special type of thinking. I don't know how you do it but am very pleased that you do and that you are so generous in sharing your work with everyone.

Thanks once again.

Vous etes tres gentil. (Sorry no accents on my keyboard!)

Link to comment
Share on other sites

Jean-Pierre.

Following on from your fantastic demo, would it be possible to modify the technique to simulate a moon orbiting around a planet on the horizontal plain and running in front and then behind the planet, the thought stems from the number on the ball rectangle.

What do you think?

Tom.

Link to comment
Share on other sites

Jean-Pierre.

Following on from your fantastic demo, would it be possible to modify the technique to simulate a moon orbiting around a planet on the horizontal plain and running in front and then behind the planet, the thought stems from the number on the ball rectangle.

What do you think?

Tom.

Tom,

Lin had the idea to make an animation of the solar system.

"Solar System Demo with Sun, Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn and Star field including Milky Way"

img7.gif

You can download the demo on his website :

http://www.lin-evans.net/demo/index.html

You can download a demo I made for a show of my last eclipse in Libya, which I think is what you are refering too (second sequence) :

TheDom-3DSolar-Small.jpg

Here is the demo : http://thefreedom.free.fr/share/dload.php?...amp;file_id=116

Here is the full PTE project : http://thefreedom.free.fr/share/dload.php?...amp;file_id=144

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...