tmorris Posted June 7, 2016 Share Posted June 7, 2016 Not sure where to file this but I am running into some strange behavior trying to blend multiple tracks together and could use some help. Right now we have 3 environmental tracks per world: Sunny, Cloudy & Rainy. Each track contains the the exact same information pertaining to stars rotation. <parameter type="node.rotationXYZ" id="430383359" name="stars"> <keys_y> <key time="0" type="1">0</key> <key time="12" type="1">180</key> <key time="24" type="1">360</key> </keys_y> We are managing the tracks through the following setup: EnvironmentController.cpp Unigine::Engine::get()->runWorldFunction(Unigine::Variable("FWTrackManager::BlendTrack"), Unigine::Variable(m_dayNightRainyTrackIndex), Unigine::Variable(timeOfDay), Unigine::Variable(rain_weight)); Unigine::Engine::get()->runWorldFunction(Unigine::Variable("FWTrackManager::BlendTrack"), Unigine::Variable(m_dayNightCloudyTrackIndex), Unigine::Variable(timeOfDay), Unigine::Variable(clouds_weight)); Unigine::Engine::get()->runWorldFunction(Unigine::Variable("FWTrackManager::BlendTrack"), Unigine::Variable(m_dayNightSunnyTrackIndex), Unigine::Variable(timeOfDay), Unigine::Variable(sun_weight)); FWTrackManager.h void BlendTrack(int index, float time, float weight) { m_trackList[index].Blend(time, weight); } If I have it set to 100% of any 1 environmental track the stars rotate perfectly, however as soon as I add any blending between tracks I start to get inconsistent star rotation behavior. This is most noticeable when the track cycles from end to beginning as there is a noticeable hitch in the rotation when the tracks are blended. On closer examination it is also noticeable at other times along the track(see screenshots). It is almost like blending of this element is also blending the 'time' variable for it as blending appears to move the stars across the sky when it should not. These are all taken at the exact same time of day. You can see the position for 100% sunny and for 100% cloudy are exactly the same, but the intermediate blends are not. This effect also appears to magnify the further along the tracks being blended are to their final time.. I have verified that the blend call is receiving correct time and weight values. This is most likely a problem on our end but I am not experiencing this behavior with any of the other shared track elements and was hoping you might have some ideas of what might be going on so I might do some more digging. Thanks! Link to comment
ded Posted June 8, 2016 Share Posted June 8, 2016 Hi, Perhaps replacing "node.rotationXYZ" with "node.rotationLinearXYZ" will help. In Tracker UI it corresponds to "Const velocity, order XYZ" rotation mode. Link to comment
Recommended Posts