Tuesday, 4 February 2014

Outlining and other 3D UI tropes

The all new official web site for Combat-Helo (are we still going with the hyphen?) will launch real soon (this week). All future blog entries will be posted there, this blog will serve as a personal and more technical insight into development for other projects. Where is this awesome new web site? I'm not telling as it's not live yet (check back Thursday).

In the meantime I've been working on 3D user interface code that will work with Leadwerks 2.51 (depreciated). All the bits needed to enhance the GUI such as outlining of selected entities, see the Hellfires in the free-roaming arming mode shown in screen-shots below. 

Once upon a time creating this kind of effect was easy in OpenGL using stencil buffers, or some flipping normals trick combined with object rendering order. However in Leadwerks, complex scenes require a little extra work; the creation of a new World, new Buffer, a Camera, post-shader. Hmmm, exactly the same way the cockpit is rendered.

In the main draw method, once we've done the bulk of the scene mesh rendering, we render this new outline world as a post process prior to the deferred lighting stage. The output buffer of this outline world is then alpha-blended over the Leadwerks gbuffer, a frag shader processes the output buffer adding the highlight colour.

Once that modification to the main render method was completed, we can outline any world entity by copying it into the outline world. This is what we do during arming or other menu mode. We had to use EnityUserData() on created outline world entities to maintain links to the main world entity (you can't parent between worlds without some kind of book-keeping).

In addition to this we needed 3D UI objects to facilitate area marking for things like triggers and unit formations during editing. So I built a class that generates the geometry to create these animated "force-field" looking objects that form fit to the terrain using a feature of the built-in vegetation shaders.


Creating groups of units and assigning them as primary targets, or special formations can be done by area rather than linking at design time. Simply throw down a bunch of vehicles in proximity and ring-fence them as a unit. The Formation manager will try and do the rest. The game portion is starting to come together, I'm sure we can find ways to improve WYSIWYG mission editing.

You can add a dozen oil storage tanks, wrap them in a target-zone and set the zone as a "primary target". Destruction of a percentage of primary targets are considered for mission evaluation. We also have secondary, tertiary and specials.

Sadly what you don't have is an infinite supply of ammo...unless you enable cheats and type "/rearm" into the console window.

A Call for Arms

We're looking for new models, specifically more radar and SAM units such as SA-10s, Rapier batteries etc. to make deadly spaces (the Hills have Eyes, or so I'm told). I'm still working on the ASE demonstration video, I stopped to add some features to the avionics when recording but I'll pick it up again this weekend once we've launched the new site.

I would love to add more threats to our release, if you've been in touch already then expect an email from me in the next few days. With so much going on I'm behind as usual.

See you at the new site at www.combat-helo.com in a few days and clear skies. You have control.


  1. Hi Richard. It looks like real pain in the......tail rotor. :-) I mean that object outlining. Its always interesting, like from the point of view of someone, who just plays stuff (me), this thing would look absolutely easy and it causes so much trouble. Cant wait for the new website. :-) Great thing with that priority targets selecting. Its gonna accelerate mission creation significantly, right? Awesome stuff as always. Good luck with all the work.

  2. otr214427
    Work from home theory is fast gaining popularity because of the freedom and flexibility that comes with it. Since one is not bound by fixed working hours, they can schedule their work at the time when they feel most productive and convenient to them. Women & Men benefit a lot from this concept of work since they can balance their home and work perfectly. People mostly find that in this situation, their productivity is higher and stress levels lower. Those who like isolation and a tranquil work environment also tend to prefer this way of working. Today, with the kind of communication networks available, millions of people worldwide are considering this option.

    Women & Men who want to be independent but cannot afford to leave their responsibilities at home aside will benefit a lot from this concept of work. It makes it easier to maintain a healthy balance between home and work. The family doesn't get neglected and you can get your work done too. You can thus effectively juggle home responsibilities with your career. Working from home is definitely a viable option but it also needs a lot of hard work and discipline. You have to make a time schedule for yourself and stick to it. There will be a time frame of course for any job you take up and you have to fulfill that project within that time frame.

    There are many things that can be done working from home. A few of them is listed below that will give you a general idea about the benefits of this concept.

    This is the most common and highly preferred job that Women & Men like doing. Since in today's competitive world both the parents have to work they need a secure place to leave behind their children who will take care of them and parents can also relax without being worried all the time. In this job you don't require any degree or qualifications. You only have to know how to take care of children. Parents are happy to pay handsome salary and you can also earn a lot without putting too much of an effort.

    For those who have a garden or an open space at your disposal and are also interested in gardening can go for this method of earning money. If given proper time and efforts nursery business can flourish very well and you will earn handsomely. But just as all jobs establishing it will be a bit difficult but the end results are outstanding.

    Freelance can be in different wings. Either you can be a freelance reporter or a freelance photographer. You can also do designing or be in the advertising field doing project on your own. Being independent and working independently will depend on your field of work and the availability of its worth in the market. If you like doing jewellery designing you can do that at home totally independently. You can also work on freelancing as a marketing executive working from home. Wanna know more, email us on workfromhome.otr214427@gmail.com and we will send you information on how you can actually work as a marketing freelancer.

    Internet related work
    This is a very vast field and here sky is the limit. All you need is a computer and Internet facility. Whatever field you are into work at home is perfect match in the software field. You can match your time according to your convenience and complete whatever projects you get. To learn more about how to work from home, contact us today on workfromhome.otr214427@gmail.comand our team will get you started on some excellent work from home projects.

    Diet food
    Since now a days Women & Men are more conscious of the food that they eat hence they prefer to have homemade low cal food and if you can start supplying low cal food to various offices then it will be a very good source of income and not too much of efforts. You can hire a few ladies who will help you out and this can be a good business.

    Thus think over this concept and go ahead.