Forum rules - please read before posting.

NavMesh creation for 2.5D

edited October 2014 in Technical Q&A
Are there any nice tutorials on how to create a good NaVMesh for a 2.5D game? :)

Comments

  • The ones related to 3D games are appropriate - the key difference between 2.5D games and 3D games is that the bulk of the backgrounds are rendered in the camera, not the scene.
  • The main dilemma I face is that the background picture has perhaps a certain perspective. And it's gonna be hard to create a navmesh that hasn't got a perspective. Bit difficult to explain in words :)

  • Since 2.5D games traditionally use backgrounds that are pre-rendered 3D, the general workflow is to model the NavMesh in the same modeling package as the background was created in.  Free from working to a fixed perspective, you instead model the NavMesh within the set's actual model file, and then export it separately as it's own model.  Difficult to explain on this end, too.
  • I understand what you mean :)
    And I would also create the navmesh in the same project where the original scene is created if it was a 3d rendered scene.

    I'm only wondering if there is a good way to do it with a background image that isn't created in 3d. Let's say I would scan a hand-drawn picture, or even use real life images taken with a camera. 
  • To achieve what you describe you probably would need to follow this process. It requires a 3D modelling app such as Blender or Maya.

    Load the scene/background in as a texture and apply it to a quad plane which fills a 'front' viewport the same shape as the image. This simulates a background image and allows it to be used as a reference.

    Here's the first tricky part: Set up a new PERSPECTIVE camera and set its focal length to match the perspective of whatever the background image was as close as you can. (if you understand photography lenses well this wont be so hard.

    View the background through both the perspective AND the front viewport simultaneously so you can see both.

    Keeping your eyes on both you should be able to construct a planar (flat) navmesh in 3D space which conforms to the perspective of the 2D scene but is actually flat on the 'ground' grid. (you will need to edit the vertexes in the 3D view but keep your eyes on the 2D one)

    When you export this out (say as an FBX) it might help to export the PERSP camera and use that to guide the settings of the game camera you want to use so the perspective of your player's movements matches. Ideally it should be identical but 'close enough' should do.

    All of this is theoretically possible so long as you understand how to do all of the above. If you don't 'get' any of the terminology or understand how to do more than one part of it then you are probably going to struggle. If you get most of it but need a pointer on one of the steps then you'll be able to experiment and get it going.

    Hope it helps!
  • On reflection this might be do-able in Unity with AC and it's navmesh baking. One of the old 2D video tutorials had a way of putting planes and a groundcube in a similar way.
  • I was actually thinking of this one: 


  • Hi Folks,

    it would be cool, if some of you could make a good video tutorial which would show the start from Wizard to the 3D model imports. Or at least, write a step by step points, and share the screenshot of the 3D scene in Max/Maya before its exported out.
    If you could show the set up of 3 images like:  background (sky), mid ground (room) and foreground (parallax), then Import of the 3d models and setting them up.
    Also show the camera set up for resolutions like 1080p. Because there were some offset issues if the image is 2048x1536 resolution. Sometimes its long images like 4096x1536... stuff like that.
    Thank you!
  • Is it 2.5D mode in general you're having trouble with, or scrolling backgrounds?

    2.5D mode is really more of a convenience for more common tasks, but it comes at a cost of being a little more limiting.  For example, it locks the background to the camera - meaning effects like scrolling and parallax aren't possible in it.

    You can still make use of 3D cameras in 2.5D mode, however - just drag the prefabs manually into the scene.  You can find the GameCamera prefab, which allows side-scrolling, in Assets/AdventureCreator/Prefabs/Cameras.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.