Hey to all,
I was wondering if anyone had any tips on how I could tile a flip-book.
In my case, when I try to tile it, the flip-book shows ALL the information on my texture sprite sheet, something which I'm trying to avoid for each frame.
Also, as a misc. question, if there a way to control what I frame I want to freeze it on? For example, I want to show frame 4 only, is there a way?
Cheers and ciao.
Replies
It's divided into 4 equal parts and is a Flipbook texture.
It's going to be applied on a mesh I figure.
I would like to tile it if possible. So my first frame is tiled 4 times. However, when I do tile it, it breaks my texture with horrible streaking and shows all of my texture, not only single frames.
So basically, I was wondering if there is a way to tile only one from frame from a Flipbook on a mesh, if not, what would be the other closest solution.
Bonus Question: Is there a way to stop the Flipbook at certain frames or to manually set the values outside of the Properties option on the textures.
Hope that is more clear then before ;P
Also Note that this effectively IS how a flipbook works under the hood. Yes there is a way to tile this on a mesh. plug that Coords node into a Frac before the divide. Mind you you will need to control your frames manually via kismet or unrealscipt this way, however it also means you can pause on frames if you like, or create oscillating sets of frames.
You'll also need to alter the below node setup to accomodate row and collumn textures like the flipbooks are usually set up, or just alter your texture to be in just one long row or one long collumn. Whichever you find easier.
See pic at end of post.
Also get out of my head. :P A controllable multi-tile texture was something I wanted to put together a while back but hadn't bothered to do. This solves that.. so you could have multiple tiling detail textures packed into a single large/medium map.
So that's now solved, and it was simpler than I figured actually. Thanks ace.. one more thing for the material function library.
Question: Is there a specific texture setting I need to employ for it to work? My textures end up stretching, even sprites from UDK.
If that's not it then post your material network. And a sample pic
I basically get 2 different textures as opposed to the first one only.
Tried it with a simplified texture, this one:
Not sure if I misunderstood something, but I also tried on the default UDK sprite textures, but same problemo.
The node structure as I show in the video and screen cap is for mono directional tiling.
Textures like this
If you need bi-directional tiling, like your texture is set up for, you'll either need to break the controls up into rows and columns (the simplest change) or do the math to convert your total number of frames into rows and collumns (the most user friendly way).
Either way you choose you'll need to have the segmentation math applied to the R channel of the UV's also, but controlled by the collumns setting, while the G is controlling the rows.
mattree for multitextures
4 multitexture
16 multitexture
but fac textures has seams problem with UDK and looks terrible.
the hell
Sorry for the huge image This one does a bit more than the standard flipbook, since you can define a transition time as well (fade from one frame to the next).
Can't share the package from work, so I might throw together a function node in UDK when I'm home. I'll probably add comment boxes as well, because this one is notably light on those.
Anyway, the node structure is pretty messy, but ultimately, once you instance the material, you'll have 5 float inputs:
Number of Rows
Number of Columns
Framerate (this is in frames per second)
Transition time (1 = full frame time, 2 = half frame time, etc)
(I should really clamp this to 1, since fractional values are pretty pointless)
The texture atlas will need its wrapmode set to Clamp, though as Hellfire has pointed out, you will see some bleedover from neighbouring frames (unless you use linear filtering, or leave some bleed area in the UVs).