Holy Boners Unite!
We are tired tonite’.
Archive for the ‘Development’ Category
Holy Boners Unite!
We are tired tonite’.
So… I know what you’re thinking. You’re thinking of yogurt.
What does that even mean, and more importantly, what in the name of Skeletor™ have we been up to since the last post?
Oh do say, old ham, we’ve been up to a lot. Personally, I defected to North Korea, but decided that the communist lifestyle didn’t go well with my evil imperialist ways. So now I’m back to spreading the great word of The Satan™ to children aged between five and six.
But enough of this horrible nonsense. I will now give you a nice list of highlights in our development of Apocalypse these past weeks. It will be both terrible and great and you will feel tingly all over. In no particular order.
We have one big admission, and that is that we are falling more and more in love with the UDK the more we get to know it. In fact, this other day UDK gave me such a raging boner that I leveled a whole city block. I’m still in recovery. I’ll mention some of the things which has helped us achieve greatness: The navmesh system for pathfinding, animation notifications, ease of adding trail particles, the remote control, archetypes, unrealscript in general and much more.
We are afraid that there’ll be a lull in the development in the coming month, as we have to complete our Master Thesis (in the black art of the Ninja). Curses! But fear not, we will get back to working hard once the summer commences. Remember, ninjas don’t need sunlight, they only need computers. (I might be thinking of nerds, but who knows.)
Still, we are eagerly awaiting the next gift from the UDK gods, namely the inclusion of the UI middleware Scaleform Gfx. It will be awesome, as it (hopefully) simplifies the UI development process a lot. It comes at a great time too, as we have yet to implement any heavy UI stuff, and we are a bit fearful of the UDK’s UIscene system. Some of the 3D-stuff you can do with it looks awe-inspiring, as you can have 3D user interfaces directly in the game world.
We shall therefore sacrifice over nine thousand platypuses and retarded babies each day to speed up this integration.
A quick update..we have trees! Messing around with SpeedTree™ today with no prior experience gave the following results:
We raise our guitars to the sky and wail a beautiful tune to the UDK gods for this powerful gift.
the Earth was without form and void. Then we started messing around in the UDK Editor, and there was light, terrain, rivers, smoke and cottages.
This is the first actual development post of our awesome blog. So where to start? What are we doing? Starting out from scratch in this huge system is quite an undertaking, but the will is strong and the results are starting to appear. As indicated, we’ve messed around with terrain, light, materials (river), particles (smoke) and importing content from 3d Studio Max(cottages). This post will tell the epic tale of how we conquered the material editor.
To familiarize ourselves with UDKs material editor we could have started out by creating a boring brick material or something equally unchallenging. However, since we are fearless on the battlefield of game development (and sandwich making) we started out the hard way; by creating a dynamically reflected smooth-moving river with “realistic” physical properties. So..how to create a flowing river? The first challenge was to create the actual geometry for the river surface. UDK features a toolset for creating geometry using CSG. When used to polygonal modeling this approach is a little bit weird, and the results were therefore accordingly weird. The problem here was that we wanted the flow of the river to move along a path, and not in a single direction in world-space (which would look stupid). To do this we created a so-called BSP “brush” which consisted of several surface all together resembling a river surface. Each of these surfaces should be somewhat square and together create a curved river geometry, and have perfectly squared out UV-coordinates (0.0, 0.1, 1.0, 1.1). Such a scheme allows a texture map placed on the river geometry to be seamlessly moving along the U-axis, and creating a “flowing” illusion. The problem we encountered was that we didn’t manage to force the UV-coordinates to be square on a non-square surface. Things were looking grim, but in the horizon shone a beacon of hope and justice (apart from their legal team): 3d Studio Max.
Our unmatched 3d Studio Max powers™ prevailed, and a river mesh was created in minutes, leading to massive guitar wailings, boner raging and democracy in several small African countries. With geometry in hand we went on to conquer the material editor. Having a little experience with water materials we knew what we were looking for, but many hours were spent praying to the unholy UDK before our prayers were heard. The screenshot below outlines the basic river material.
As the node count indicates, the final material is quite complex. Luckily UDK provides these nice grouping tools making it pretty easy to stay in control of the overall result. The final material has four major groups: Normal, Distortion, Opacity and Reflections. Real-time reflection in water has become ubiquitous in recent games, and UDK makes it really easy to create this effect. Simply place a “SceneCaptureReflectActor” in the world to indicate the plane of the reflected surface, hook this up to a TextureRenderTarget, and BAM!…instant reflections. Some of the other groups are pretty trivial: The normal group samples a couple of normal maps, and combine them. When sampling the normals we create directed flow in the river by panning them along the U-axis. The distortion group simply desaturates the sampled normal and scales it up a little bit. The opacity group was the most challenging. We wanted the river to appear a little transparent along the edges, as well as having increased transparency when the angle between the camera and the river geometry’s normal is small. To summarize many hours of frustration, we did a dot product between the camera angle and a fixed normal pointing straight up and combined this with a fresnel operation.
As seen in the screenshot below, our efforts were rewarded with a nice looking river. The keen eye may spot a terrain, some cottages, a little smoke and a…uh robot thingy. More on this later.
Keep on wailing!