Hello Guest

Author Topic: Deformable sprites?  (Read 16543 times)

dakeese

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 50
    • View Profile
Deformable sprites?
« on: January 28, 2013, 02:06:25 am »
I'm wondering how a game like Rayman Jungle Run handles world sprites.  There are lots of curved paths for the ground, but it some areas, I can see repeating patterns if I look closely.

My best guess is that a tile map is used for most of the middle sections, while tile strips are used for the sides and top. These tile strips could be placed on top of the edges of the middle tile map to hide them. But this method would require the tile map edge sprites to be croppable, and the tile strips to be deformable (like how I marked in red).

Are these possible future features for 2D Toolkit, or is that too complicated to work into the system?  Are there other ways to do this?

When I look closely at the screenshot, it looks like maybe only the top surface that you run on uses an overlayed tile strip, and for the rest of it maybe they just used a very high-resolution tile size and came up with many variations of tiles to get all the different edge possibilities. Not sure.


dakeese

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 50
    • View Profile
Re: Deformable sprites?
« Reply #1 on: January 28, 2013, 02:15:44 am »
Here's a shot from Rayman Origins, I think, where you can see where they seem to have one tile map for all the edges, which is deformable, and an underlying tilemap for the center bulk of the land.  The side/top tile map (or tile strips) fade out in the area I marked with black lines so there isn't an easily noticeable seam. And then they add a few plant sprites here and there on top of everything.

« Last Edit: January 28, 2013, 02:17:26 am by dakeese »

fattie

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 106
    • View Profile
Re: Deformable sprites?
« Reply #2 on: February 01, 2013, 09:27:46 am »
Just for the record, Dakeese.

I think more and more as games get in to procedural stuff... For example we had to do a couple projects lately where the "generated images" as you describe were done by really generating them on the fly - I mean painting them on the fly, using code. I suppose you would say a "light AI" approach.

(So in your top example you might paint the correct grey shape, then add the darker mottling randomly, then the software would understand the "edge" and you might have say 25 random plants and the software would paint those in, perhaps add a random tree and some rocks, and so on.)

I have no idea if that is what is done in the examples you give, or, if as you say it is "just" old-fashioned fooling around with tilemaps. But there's a possibility it's not tilemaps at all, but rather they have moved over to let's say "generated painting".

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Deformable sprites?
« Reply #3 on: February 01, 2013, 04:52:11 pm »
I've ran Rayman through GPA on windows (its good fun if you haven't), and they definitely don't use tilemaps, not anywhere near the traiditional sense anyway. They have large-ish textures which they rotate and place, a lot of them overlap one another, which is why you don't see a lot of uniformity in the game. The polygons are quite tightly cropped to fit the textures as well to save bandwidth.
They have a lot of alpha blended edge pieces which overlap push into the main solid bits to add even more variation.

Again, GPA (http://software.intel.com/en-us/vcsource/tools/intel-gpa) = highly recommended. You can learn a lot from that.

dakeese

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 50
    • View Profile
Re: Deformable sprites?
« Reply #4 on: February 02, 2013, 05:37:24 pm »
Sounds interesting. Does this allow you to view a wireframe overlay?

Were you analyzing the PC version of Rayman Origins, or the Android version of Rayman Jungle Run?

Not really sure where to start with this program.  I clicked around in the four different apps (System Analyzer, Platform Analyzer, Frame Analyzer, Monitor) and haven't figured out how to connect it to my Android device.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Deformable sprites?
« Reply #5 on: February 02, 2013, 06:09:25 pm »
I analaysed the PC version of Origins. It lets you look at a wireframe overlay, and also lets you see individual draw calls too :)

dakeese

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 50
    • View Profile
Re: Deformable sprites?
« Reply #6 on: February 02, 2013, 06:16:14 pm »
OK, I've been comparing the Jungle Run to Origins, and see that they probably use a similar method of level design, although due to fillrate limitations I assume the one on the phone has to be very limited on extra decorations and doesn't have the six plus background parallax layers.

I found this video of a game engine that produces similar results. Is this basically what you were describing? (skip to one minute in)
http://vimeo.com/276937

I just discovered "Polygon Tool" on the Asset Store which when combined with 2D Toolkit can produce the same setup.

Aldwin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Deformable sprites?
« Reply #7 on: February 24, 2013, 09:11:55 am »
Hi

The engine used by ubisoft for Rayman Origins is called UbiArt Framework and you can see a little video about art integration here : http://youtu.be/B_QhZYTukac

I'm working on another Ubisoft studio so I saw it working and it's very amazing! Unfortunately, I don't really how it works techincally and, even if I knew, I guess I won't be able to tell you ^^

fattie

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 106
    • View Profile
Re: Deformable sprites?
« Reply #8 on: February 24, 2013, 10:16:48 am »
Great tip, thanks for that

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Deformable sprites?
« Reply #9 on: February 24, 2013, 11:00:46 am »
Hi

The engine used by ubisoft for Rayman Origins is called UbiArt Framework and you can see a little video about art integration here : http://youtu.be/B_QhZYTukac

I'm working on another Ubisoft studio so I saw it working and it's very amazing! Unfortunately, I don't really how it works techincally and, even if I knew, I guess I won't be able to tell you ^^

That video gives away quite a lot actually :)
It doesn't look like they deform the sprites themselves, but build a hierarchy of sprites.

If you're planning on doing that - one tip to avoiding massive numbers drawcalls when scaling - make sure the scale on the root object is non-uniform, and all children are 1,1,1 to start with.

So something like this...
root - 1, 1, 1.2
  child - 1, 1, 1
  anotherchild - 1, 1, 1

Now you can scale everything in X & Y and not have it break batching.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Deformable sprites?
« Reply #10 on: February 24, 2013, 11:03:02 am »
I like how they let you draw geometry to define atlases though. Its really nice way to let the artist pack in arbitrary orientations. I'm usually against manual packing, but not when you can do magical stuff like that - i.e. paint in the correct orientation into an atlas. Maybe I'll add a tool to draw custom shapes like that - it is already supported, just there isn't a nice interface to do it.

fattie

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 106
    • View Profile
Re: Deformable sprites?
« Reply #11 on: February 24, 2013, 11:19:39 am »
It's interesting that based on your recent poll (which is fascinating, I never would have thought) I guess the greatest need is more and more and more simplicity for brand-new users.

(I would never have realised most users were newer users - incredible show of power of marketing information!)

Perhaps really sophisticated needs like this should be put on the back-burner. It makes me wonder what would really really help super-new users.  Who knows?  Tricky.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Deformable sprites?
« Reply #12 on: February 24, 2013, 01:20:04 pm »
Of course :)
I'm planning on taking things a bit further, with an even simpler mode to help with new users.

fattie

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 106
    • View Profile
Re: Deformable sprites?
« Reply #13 on: February 24, 2013, 03:53:38 pm »
I was thinking, you could "eliminate atlases" in a way. There could just be one bucket that holds "all your sprites".

TK could take care of allocating it in to atlases.  Expert users could choose atlases as at present.

Of course it's easy to be an armchair developer  :)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Deformable sprites?
« Reply #14 on: February 24, 2013, 03:56:55 pm »
I think that could only be done if there was a way of creating and managing atlases dynamically. Too many ways for it to go wrong, batching in Unity is already flakey enough as it is :)