Animated textures loops with 'hack'

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Animated textures loops with 'hack'

Postby ametist » Sat Apr 25, 2020 10:16 am

I wonder if someone can tell me what I am doing wrong with my animated looped textures - I have set them to loop on the offset setting on the texture, so y offset = 0 at frame 0 on the timeline, y offset = 1 at frame 30 on the timeline, and I have set the curves to linear in the Graphs window. But I see a little 'hack' in the looping, so what I am missing? I have tested with different textures, but no change.
The texture is a square, 512x512.
Attachments
UVlooped texture.png
UVlooped texture.png (12.63 KiB) Viewed 2744 times
User avatar
ametist
 
Posts: 360
Joined: Fri Dec 28, 2007 6:55 am

Re: Animated textures loops with 'hack'

Postby Emor D'ni Lap » Sat Apr 25, 2020 12:32 pm

Ametist, I can only guess what the 'hack' you're seeing looks like.

So here's my best guess:
It's a trick common to any looping animation, whether it's on a 3D object or a 2D texture.
When we're creating a loop animation, we always think in terms of looping around to the starting position - so we animate it that way.
For example, on a rotating object we'll animate from a zero˚ position to a 360˚ position. But if we play that animation and loop it, the zero and the 360 positions are both included - but they're the same, so the animation plays with a duplicated-frame 'hitch' or 'hiccup'.
(In your case, your y=1 has the same offset as your y=0.)

So when animating loops, you have two options:
On, say, a 100-frame loop animation, you cut that last frame and make it a 99-frame animation.
Or, if you really need 100 frames, you create a 101-frame animation and chop that last frame.

But this may not be your problem at all - just a guess!
Emor D'ni Lap
 
Posts: 87
Joined: Sun Jan 30, 2011 12:12 pm

Re: Animated textures loops with 'hack'

Postby ametist » Sun Apr 26, 2020 10:18 am

Thanks for your answer Emor! I actually do this on my rotating objects, but I didnt think of using it for texture animation :oops: .

Anyway, after a couple of hours testing several setups I got it to work with setting the offset animation from 0 to 31 frames, and in the nodetree the loop to stop at 29. But that is with a nicely tiled texture and not with my water texture, though it should be seamless. Both textures from textures.com.

So for now I have made the material quite dark so the 'hitches' isn't that noticable, but I am not quite happy. I will see what I can do further.
Attachments
watertexture.jpg.png
watertexture.jpg.png (151.56 KiB) Viewed 2704 times
tilestexture.jpg.png
tilestexture.jpg.png (134.01 KiB) Viewed 2704 times
User avatar
ametist
 
Posts: 360
Joined: Fri Dec 28, 2007 6:55 am

Re: Animated textures loops with 'hack'

Postby Emor D'ni Lap » Sun Apr 26, 2020 4:05 pm

If you've made a 31-frame animation, you only need to remove that frame 31 that is essentially a duplicate of your first frame's position.
If you've cut after your frame 29, you've now removed frame 30 AND 31, and your animation will now have one missing frame - which will also cause a 'hiccup' in the looping.
Emor D'ni Lap
 
Posts: 87
Joined: Sun Jan 30, 2011 12:12 pm

Re: Animated textures loops with 'hack'

Postby ametist » Mon Apr 27, 2020 5:36 am

I see what you mean Emor and thats the weird thing about this! Because it works exactly so on my rotating objects - on them I have the animation set on the objects rotation from 0 to 359, and the looped animation in the nodetree to the actual stopframe of the animation. They rotate just fine wihout visible 'hitches'.
If I set the looped texture animation to stop at frame 29 in the nodetree, and the actual animation from y offset=0 to y offset= 1 is going from frame 0 to 31 in the timeline, there is a very small 'hitch'. If I set it to stop at 30 in the nodetree the 'hitch' is much more noticable. And I cant change in the offset, or I tried to set the last offset to about 0.97 instead of 1 but that didnt work either. :?
User avatar
ametist
 
Posts: 360
Joined: Fri Dec 28, 2007 6:55 am

Re: Animated textures loops with 'hack'

Postby Tsar Hoikas » Mon Apr 27, 2020 9:18 am

Are you testing this in game or by playing the Blender timeline?
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Animated textures loops with 'hack'

Postby ametist » Mon Apr 27, 2020 9:58 am

I am testing ingame. I delete the previous .dat files and the .sav(just to be sure) before exporting every time.
User avatar
ametist
 
Posts: 360
Joined: Fri Dec 28, 2007 6:55 am


Return to Building

Who is online

Users browsing this forum: No registered users and 0 guests

cron