Game
Veil Mirror: Ghost Control

5 years ago

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


Hello there!

It's a me, Chris. I'll be writing about how we accomplish different things in the game on a technical level. So massive desillusionment (if that's a word) ahead.

Today, lets talk about how we deal with building play space and what to do to light it up.

I have my game development origins in making maps for a number of Valves games. So for building the house layout there was only one option. I wanted a CSG workflow. A technique long forgotten by many yet extremely powerful.

It allowed me to lay out the house in round about an hour or two.

And it's not a small house.

yiux2s1.png

As it goes with rough layouts, it consists of primitive shapes and some measurement textures only.

Those textures are great to get the scale of things right. Everyone surely has come across the games with exceedingly large toilets or chairs you'd have to climb to sit on. Measurement textures are a great way to avoid that from the beginning.

A little texture creation and painting walls to get a rough idea of a room.

It's really easy and I don't have to leave Unity to change the geometry or the textures.

kkqiaz1.gif

With some brushwork and texture work we can quickly arrange a basic dining room. As that's what it is.

wikgp1.png

When that's all done it's easy to add in the details to make it look awesome.

zwjtuq1.png

Of course making custom fit assets like the round trim on the ceiling is somewhat more involved but that's a topic for another day.

So CSG options in Unity. There are two as far as I am concerned. SabreCSG and RealtimeCSG.

The latter used to cost about 50 bucks on the Asset Store but it's now Open Source and you can get yourself a [copy on github](https://github.com/LogicalError/Realtime-CSG-for-unity). And maybe contribute to its development.

I opted for RealtimeCSG because it has an inverted-world workflow in which brushes case out the world rather than adding to it. Sounds weird at first but it's amazing when creating indoor scenes. A room is nothing but a single brush. Changing its form in any way is a matter of changing the brushes shape.

Now that we have a room to look at, it's time to light it.

In that regard there are two topics that need consideration.

ythwvb1.png

First: The light design. What kinds of lights do we want, which colours should they have and what purpose will they serve?

Second: The technical question of what kind of light model should we use?

On the design side, we went for the classic yellow and blue light colour scheme. Just because it looks good and fits well in the game theme. Gas lights tend to have a yellowish colour.

Truth be told: Eletrical lights will have had a yellow-ish glimmer at the time (1880s) just as well. But a contrast colour is needed for good lighting so blue it was.

arnclj1.png

But why does it look good like it does? Simply because blue and yellow are complementary colours. It works with any colour you pick. Try it and see your lighting improve. But don't overdo!

How about the lighting though? We don't want to require a beefy super computer to run the game. So we decided that realtime lighting isn't the way to go. Although many are doing it. We went with a technique that comes with Unity called Shadowmasks.

It creates lightmaps (static lighting) in which lights contribute indirect light (that part of the light that is reflected off of surfaces and such) and shadows. Their direct light will be realtime though.

That means: The most costly part (shadows) of the lights will be baked but wen can still get the good PBR rendering stuff.

And that's what it looks like:

arbtiq1.png

Not bad at all I should think.

And you won't need a super computer to play this at a decent framerate.

...

Hopefully ...

Cheers anyway!



0 comments

Loading...

Next up

Another technical talk - about how the mirror actually works.

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

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

A cosy place to have a drink?

Or maybe just another nesting place for anomalies and demons?

You'll find out soon enough.

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

Here's a better picture of those posessed paintings.

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

Have a looksie at out ludum date entry!

https://gamejolt.com/games/feed-pete/489009

Bandana Dee the Dream Friend

Chiaki Nanami!

🍒Did you like the game? A demo is available for free on Steam.

✌️ Thanks for playing IndieGameiacs!

⚙️ Free Demo: http://bit.ly/UniDuni

📺 Full Video: https://youtu.be/5qEbVXg7GaQ

#steam #uniduni #clops #screenshotsaturday

Path of Kami: The Evolution of the Lore