Road Animation Path
Hi,
I am trying to animate infinitely a sequence of elements using animation paths. I want to be able to update the speed of the elements but I want them always at the same distance one from the others. My goal is to have a road translating toward a subject walking on a treadmill and to update the speed of translation according to the subject's speed. I took as example the code implemented into the Vizard examples folder. I have a first set of elements that translate and stop out of the view of the subject and a set of permanent elements that make an infinite loop of the animation path their are linked to. My problem is that my permanent elements either superimpose or let space between them (when the first element starts the loop of the animation again). I am using animation path events to animate the different animation paths I have. I am probably wrongly implementing either the animation paths or the animation events. Here is the code I wrote. Can you tell me how can I improve it or if there is any other solution that I can implement? Code:
|
To get coding suggestions on the forum, it's best to create the simplest possible example that shows the issue.
|
Sorry my bad. Here is the simplest example I could think about. Even if I am interested only in the motion of the quads, I added also balls to show that my elements superimpose. When I attach a texture to the quads and they superimpose, the resulting effect is a flashing of the overlaid part. Do you have any suggestion?
Code:
import viz |
If you're just interested in animating the textures another way of doing this is to modify the texture coordinates over time. See the 'applying textures example' in Teacher in a Book available from our downloads page. If you have 3ds Max, you could animate the textures, export the animation with the OSG model, and control the animation speed in Vizard.
|
Ok I will try that but there still something I do not understand. The texture has to be applied to something, right? In my case this something would be a sequence of quads on the ground. I want to simulate a road translating on the ground. To do that I define an animation path for each quad composing my road. I link each animation path to the others and play them (using viz.FOREVER as attribute to my animation path). If the quads superimpose or separate during the time my script runs, also the texture will do that. Is that correct?
|
All times are GMT -7. The time now is 02:41 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC