One-minute Dungeon

This project, my introduction to Unity, is an interactive special effects showcase:

Webplayer release

[table=“width: 500, align: center”]

[IMG]http://www.zspline.net/blog/wp-content/gallery/oneminutedungeon/sshot1.png[/IMG]
[IMG]http://www.zspline.net/blog/wp-content/gallery/oneminutedungeon/sshot2.png[/IMG]
[IMG]http://www.zspline.net/blog/wp-content/gallery/oneminutedungeon/sshot3.png[/IMG]

[/table]

Modeling was done in Modo, texturing in PS and FilterForge. Each shader
was developed in UDK then ported to Shaderlab. From the asset store I
only used the decal projector plugin and iTween for 3d curves.

Pretty neat stuff!

Thanks patconnole. :slight_smile:
Here is the the “making of” article: http://www.zspline.net/blog/2013/12/16/one-minute-dungeon-behind-the-scenes/

This is awesome! I really liked seeing some of the effect ideas you presented in your “Behind the scenes” article nice work!

Thanks for sharing the information behind the project.
It is feeding my curiosity :smiley:

Nice stuff.

Zoltan, do you have any benchmarking numbers, by any chance ?

Nice one, Zoltan!

I’m really loving the “behind the scenes stuff”. Very interesting stuff! :slight_smile:

Nice one, Zoltan!

I’m really loving the “behind the scenes” breakdown. Very interesting stuff! :slight_smile:

Thanks for the kind words guys!

Here are some numbers:

Environment:
[table=“width: 500, class: outer_border, align: left”]

CPU
Core2Quad Q6600 @ 2.40GHz


RAM
8Gb


GPU
GeForce GTX 650, Driver 331.65


OS
Windows 7 x64


Resolution
530x700

[/table]

Frame stats in the editor
min…max (typical):
[table=“width: 500, class: outer_border”]

Graphics main thread
13..20ms (17ms)


Draw calls (with dynamic batching)
164..451 (350)


Draw calls saved by batching
257..788 (550)


Triangle count
170k..613k (440k)


Used texture count
57..73 (65)


Used texture size
21..25Mb (24Mb)

[/table]

[table=“width: 500, class: outer_border”]

CPU frame time
13..21ms (16ms)


Active Amps emitter
5..10ms


System memory used
410Mb


Memory for textures
63Mb


Memory for meshes
12Mb


Game objects in scene
493


Total objects in scene
2430


Assets
4444

[/table]

Generally, performance is a bit better in the WebPlayer.

This looks very impressive! I’m trying to implement something like the fluid shader, but I’ve run into some problems. Is there any way you could expand on the math used to generate the mask at this part-

“This data, combined with a vector parameter defining the surface of the liquid, produces a mask to blend between glass and fluid.”

I can generate the normalized vertex colors for my mesh and the surface vector, no problem, but I’m not sure how to actually get the mask from there. Any help on that would be greatly appreciated.

-John

Here is the relevant ShaderLab code:

// Fluid mask
float3 vertexPositionLocal = (i.vertexColor.rgb - float3(0.5, 0.5, 0.5)) * (-2);
float fluidMask = dot(normalize(_FluidSurfaceVector.rgb), vertexPositionLocal) + (_FluidSurfaceVector.a * 2);
fluidMask = clamp(fluidMask * _FluidEdgeHardness, 0, 1) * i.vertexColor.a;

First the vertex colors are remapped to the -1…1 range so they origin is relocated
to the center of the mesh.

Then we decide which parts of the object is facing toward or away from the
arbitrary vector, hence the Dot(). The alpha of _FluidSurfaceVector controls the
offset, which translates into the level of the liquid.

The last step is just managing the transition from black to white: how sudden
the change is plus making sure that the outside of the mesh always stays black
(defined by the vertex color alpha).

I hope it helps. :slight_smile:

Makes perfect sense now. Thanks!