Game
Veil Mirror: Ghost Control

4 years ago

Another technical talk - about how the mirror actually works.

It's so easy, technical artists hate these tricks!


Hello there, good people of the jolt!

Today, lets talk about the single-most important thing in the game: The mirror.

wedah01.png

Perhaps you've gathered by now that it shows you things, the human eye can't see. If not - well, now you know.

In the picture above that will be two magic sources (More on those on another day).

But not only can it show you things that are not there but it also shows things that should be.

bk9oj01.png

Here, among other things, you see that the "real world" has that sphere distorted out of proportion. But in the mirror it looks to be correct. It's behind a yellow box which is also not there in the real world.

The question that will be answered today is: How do we do it?

The simple answer is: Camera trickery.

1wdla31.png

We have 2 cameras that each render the scene in their own way.

The yellow camera is rendering the image in the mirror (weird property for a mirror, isn't it? But it's magic!).

It renders the basic world and things that are only visible through a mirror. We let it render into a render texture and slap that texture on the mirror mesh. There's a distortion map applied to it as well so it looks like the mirror surface is uneven and somewhat broken or used.

q4_zuq1.png

Here you see the camera rendering directly on screen rather than into a render texture. It's the little picture inside the picture. It's a lot smaller than the player view resolution. Mostly for performance reasons. Currently the texture is 512x512 pixels small. We might make it an option to change the size. A good PC should handle 1024 or higher easily.

The purple camera is rendering the view of the player.

That's the simple part. It renders the player view on screen directly and shows the basic world and things that are only visible outside of the mirror.

With that kind of setup it's easy to do some magic tricks.

Lets see here.

6pypoh1.gif

The distorted ball again.

In the mirror camera we see a normal ball with a purple aura. Or whatever it is.

In the player camera we see the distorted ball and it wobbles.

If we were to pull it apart we can see this in the the editor:

rowq3c1.png

It's simply 2 balls, each on a separate layer but at the same position. Doesn't get any simpler than that, I suppose. But there are more fancy things that can be done.

ltb3pc1.gif

Like magicking a thing back into position by interacting with the object in the ghost world.

And there you've seen the mirror in action as well. With that, I'll sign off. Until the next time!

Cheers!



0 comments

Loading...

Next up

A cosy place to have a drink?

Or maybe just another nesting place for anomalies and demons?

You'll find out soon enough.

Implementing all the ghost behaviours. Here: When ghosts make paintings change.

Here's a better picture of those posessed paintings.

Have a good rutsch into the new year, y'all!

A technical talk about world building tools and workflows in Unity for those who are interested.

We decided that the villa was too large a game space for the gameplay that happens in it. Removed the second story of the house. But we also started on new areas.

Here's the new backside of the main hall. Anything could be posessed

Chiaki Nanami!

Finished a project I've been working on over the last few days!

Modeled and textured in Blender.

#3dart #lowpoly #npbr #fantasy #hut

Heya! I wanted to show some gameplay progress i made so far. I hope you like it ^^

In the quest for accessibility, I'm adding Resurrection Shrines for players on the 'novice' end of the platforming spectrum.

In order to unlock the power of a Shrine, you must collect 3 'Souls' from your dead corpses! (the floating blue orbs)

Finished work on the emotions of a new character for the tank universe