Hello Guest

Author Topic: Merge 2D backgrounds and 3D characters  (Read 5786 times)

holyknight

  • Newbie
  • *
  • Posts: 2
    • View Profile
Merge 2D backgrounds and 3D characters
« on: December 10, 2012, 10:32:21 am »
Hello  ;),

I would like to know if it's possible to have this kind of 2D/3D merge with your tool : http://www.siliconera.com/postgallery/?p_gal=196796|1
I mean 2D hand painted background and 3D characters.
In this case what is the workflow to reach an approching resultat ?
Are there any ressources or tutorial to do this ?

Best regards

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Merge 2D backgrounds and 3D characters
« Reply #1 on: December 10, 2012, 12:11:55 pm »
2d toolkit doesn't have any features to make this easier directly, but could make the 2d atlas management, etc a lot simpler.

What games like that (and resident evil, etc) do is they have a painted z-buffer for each frame. Basically you need to tell it whats in front of others. Then you just move your sprites in 3d space, and they automatically go in front of and behind other objects. With this method you can have layers too, so you can have nicely soft edges going in front and behind other objects seamlessly.
« Last Edit: December 10, 2012, 12:51:36 pm by unikron »

holyknight

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Merge 2D backgrounds and 3D characters
« Reply #2 on: December 10, 2012, 01:20:26 pm »
Ok thanks you for your quick answer.

When you say : "move your sprites", you mean 2D characters ? Because in my case I would like to use 3D characters.
I heard that in some other games like bastion they flatten everything...

What is the general workflow to do this ?
Do you have any ressources / tutorial in mind using z-buffer trick ?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Merge 2D backgrounds and 3D characters
« Reply #3 on: December 10, 2012, 05:25:51 pm »
Its the same if you move sprites or 3d characters. There shouldn't be any issues.

If you use the z-buffer trick, you're limited to harsh edges. I can't think of any tutorials, but I've done this for a game so i know it works. Options - you could actually build primitive 3d versions of your background, and keep it invisible to draw into the zbuffer.

If you wanna use layered sprites, you can have soft edges but its a lot more work.

Ultimately, I think you'll end up using a hybrid solution. Thats what I ended up doing.