Hi all. New to forums, so I’m sorry if this is the wrong forum. Anyway, I’m a huge fan of the 2D Zelda games and have been mucking around with them for a long while. The Link’s Awakening remake inspired me to try my hand at 3D for the first time, but I’m struggling even in the prototyping stage. I just can’t get the camera to work in a way that shows all the walls like in the picture I’ve included. Is there a combination of FoV and Projecting that will magically create the effect? Do the walls have a slight tilt to them to “cheat”? Any help would be amazing!
No need to cheat. Is most likely typical top down, or nearly top down camera.
With few clicks you can achieve such effect.
- Add camera
- Tilt down
- Adjust height
Sure, but I’m pretty sure the walls are tilted in that specific screenshot (you can tell by the shadows for example the right most leaf).
Link between worlds famously did even more tricks than that. Link’s awakening feels a bit more straightforward than this though.
Thanks all. Now to decide on the perfect angle.
If you apply the tilt at the shader level, you can prototype that super quick.
You just blew my brain Murgilod. I haven’t done much with shaders yet being new to 3D. I’m assuming you would only use the shader tilt for the prototyping and not for finished product?
Use for both. Shaders have the advantage that they only change the way it is rendered. From the perspective of the code the wall will not have a tilt to it. This way you don’t have to do anything special for that wall when you write code to affect walls.
Consider my mind also blown. Is that something you could do in Amplify?
Yeah, it’s actually pretty trivial.
You may want to change the way this is formulated, but this is basically what I was doing testing something similar.
edit: here’s a version that offsets the top so the bottom of your collision meshes will always line up:
That’s so cool. I had never experienced this side of shaders. Looking it up I found rotations, and now tilts. Thanks a ton!
Yeah thanks! I’ve only just begun to delve into shaders as it seems like the only way I’m going to get the look I want… That is really cool.
One thing worth keeping in mind is that this can affect rendering, because altered geometry will not be within Renderer.bounds.
It won’t matter much if the game is pretty much unlit, but it will if you’re using shadows, point lights and so on.
Thinking about it frustrum culling should be using Renderer.bounds, so there might be some object pop in.
This particular shader in the use case of things like Link Between worlds ,with a largely fixed camera that won’t encounter most rotational edge cases, should be fine. If you want to get around that for other use cases, use a skinned mesh renderer and adjust its localbounds. That’s a bit more work, but it’ll do it.
edit:
I bet you could get away with a change to the way the camera matrix is set up to handle all this, but that’s a bit more difficult to implement and test. I’ve done weirder things with a camera matrix though.