Tuesday, August 25, 2009

What the Fog?


Garish red-blue fog controlled by color and intensity gradients

Fog is an important part of 3D rendering, since it can add depth and atmosphere to an otherwise flat looking render. Most 3D packages has some kind of built-in fog rendering capability, but advanced packages like Houdini only provide the framework for the user to build their own fog shaders.


Render-ready multiple fog types with a simple Lightwave-style interface

As an ex-Lightwave user, I was used to having a simple and friendly interface to quickly setup a nice looking distance based fog render. So my mission was to bring basic Lightwave style interface to a fog atmosphere shader in Houdini. Starting from a "VOP VEX Fog SHOP" node and some basic fog formulas, I eventually added a bit more variety in the form of ramps to control color and fog intensity based on distance.


The VOP sub-network for the Ramp fog function

There are no fancy algorithms or advanced techniques here, just plain vanilla distance based fog with a bit more user control. If there's any interest in this I'll build an OTL and upload it somewhere for everyone to use and pick apart.

Monday, August 24, 2009

Double vision and more...

Everyone knows what the DS in Nintendo DS stands for, and the dual screen functionality of the highly popular handheld console has certainly been put to both novel and innovative use. Some games would have the upper screen display the action while statistics are shown on the lower screen, while other games provide alternative viewpoints of the same action on each screen.

All very well for the DS, which got me thinking. A lot of modern graphics cards and notebooks support dual monitors. Why don't PC game makers put the dual screens to good use too?

For example:
1) Both screens could show a wide angle (albeit disjointed) view of the action.


Wide angle game action on dual monitors? Sweet...

2) One screen could show the action (e.g. FPS) while the other show the map or mission objectives.

FPS with real-time map on second monitor? Sweet...

3) One screen could show the action (e.g. RTS, RPG) while the other show the statistics or inventory.

MMORPG on dual monitors? Sweet...

Some games already support multi-display outputs, but I feel PC games should start to provide such an option to extend the PC gaming experience over console games. Yes you can probably have a less cluttered WoW display by manually moving the map and stat windows to the second screen, but developer support for that option would be so much nicer.

Hidden possibilities abound for the innovatice game developer ;)

(Disclaimer: All game screens shown here are mock-ups)

Thursday, August 20, 2009

VEXed I am of late...

VEX (Vector Expression) is an internal expression language in Houdini which can be used to develop custom shaders and other stuff. VEX puts a lot of power in the user's hands and is one of the reasons why Houdini is such a flexible and powerful tool for VFX and CG work.

I've only begun to play around with it for a couple of days, but I was already able to implement a Lightwave style fog shader (linear and exponential fog) complete with a simple user-interface in a VOP (VEX operator) network, mostly through experimentation.

Now that I got a taste of things procedural, I just have to dive deeper. I got my hands on "Texturing & Modeling: A Procedural Approach" by David S. Ebert et al. from the school library and will be reading it every chance I get.

Saturday, August 15, 2009

Rigid body tubes in Houdini

Using rigid body dynamics to simulate a ball rolling down a tube. How difficult can that be?

Well, it took me quite a while to get it to a working level, and I'm still a little confounded by some of the things I had to do. Creating the hollow tube is half the challenge, since boolean refused to function properly when I started doing this test on version 9.5. Now I'm on 10.0.359, and the boolean still baffles me.



I created my hollow tube by taking a solid outer tube A, and tunneling away the inside with a narrower inner tube B using boolean subtraction in the Cookie node. Technically, I should do a A-B, but in my scene, I had to select B-A to get the right behavior. Sure, I can get what I wanted using this workaround, but it ain't logical.

Yes Houdini is powerful and logical, but it's not as intuitive as the real world. A lot of powerful features have become much more accessible to the average end-user through the shelf tools, but considerable knowledge of it's inner workings is still required to squeeze out some basic logical behavior if you are trying something different.

To be fair, Houdini is probably the only widely available commercial 3D tool that even allows you to do such simulations with relative ease and reliability. Anyways, I'm still taking baby steps with this software, but hoping to walk and run with it some day.

Tuesday, August 11, 2009

MTBF

No, I'm not cursing or swearing. MTBF = Mean Time Between Failure.

Things fall apart, sooner than you'd expect too. My less-than-one-year-old Maxtor USB external Hard Disk decided to die on me yesterday. I was almost pondering whether I should be distraught over my McDonald's dinner. Weeks of hard work had disappeared down the toilet and I didn't have any backups.

As I nibbled numbly on my burger, I decided that I would use my powers of intention to resurrect it long enough to allow me to back up my data. So after a not-so-happy meal at the local Macs, I returned home to work my "magic". Lo and behold, my drive was alive again, so I quickly backed up the important data.

So is the USB drive dead? Yes and no. Sometimes it's recognized and sometimes not. Now if I can only find my warranty card, I should hopefully get a direct replacement.

Tuesday, August 4, 2009

Give Me A Break!

Sleeping at 3-5am every morning, waking up at 7:30, working from 9am til 9pm, then doing my own stuff at home until 3-5am again isn't my idea of a perfect daily cycle, but currently this is the only way I can have a full-time job and still do my own research/study/play games/socialize... etc.

Sure, I develop courses for Games Development and Digital Visual Effects at work, but my personal interests range from mathematics, quantum physics, technology, anime, movies and music to philosophy, metaphysics and spirituality. While more of a armchair scientist than a hardcore researcher, I nevertheless wish for more time to do my own explorations into the world of string theory, game theory, chaos theory and TOE. Ideally, make money while doing so too.

The only thing I dislike about my day job is the paper and administrative work. I don't mind teaching, developing curriculum, doing research and projects all day, but I'm really not interested in coordinating people, booking facilities and making sure all the right forms are signed and filed. I want to get paid to build fantastic virtual worlds, not waste time dotting my i's and covering my ass with the necessarily paper trail.

In Singapore, managers are valued more than ground people because they can get incapable people to do seemingly impossible tasks and make everything appear more impressive than they actually are. Stay too long, and one may even be convinced by the system, that sheep needs to be shepherded, but anyone who does a little bit of research and independent thinking can see right through the con job.

Slowly Progressing

Learning Houdini


I managed to get the pieces of my girl model to break using rigid bodies simulation. The trick is to use a Connectivity node to identify the connected pieces resulting from the Cookie operation, then grouping them using a Partition node. Feeding the named groups into a RBD Fractured Object AutoDopNetwork does the rest. Still not entirely happy with the results, until I can get the hard edges on each piece of debris to look sharp.



The images above show another completely useless and arbitrary project that is part of my Houdini learning curve. Starting from a closed curve, a polygon surface is generated, extruded, subdivided and tiny strands of grass/hair is scattered on the surface. Instead of the default scatter based on primitive area, I used an alternate attribute (area) which allows the "grass" to stick to the surface (instead of re-scattering) when the latter is deformed in an animation.

I'm only beginning to figure out the basics of SOPs. Can't wait til I know enough fundamentals to create more original and useful results.

Sunday, August 2, 2009

Baby Steps

Since I got back from Japan, I've been busy with preparing the curriculum for a specialist diploma in games development as well as an upcoming 5-day certificate course in PS3 visual arts creation. Finally, I managed to squeeze out some free time to try out some Houdini stuff.

I haven't really touched Houdini since Peter Robbinson's bootcamp 5 months back, so I practically had to start all over from the introductory lessons. Here I've imported a OBJ model created in Modo and Lightwave, scattered some metaballs along it's surface, and boolean'd them out to create huge chunks of holes that looks like she's been blasted with a high-calibre cannon.



The Cookie node's boolean function works, but isn't 100% clean all the time, often resulting in stray and broken geometry. Metaballs seem to work better than polygon spheres for creating holes, and a bit of tweaking can minimize the errors, but I still haven't found a perfect solution.

Also, I'm still trying to figure out how to automatically convert the broken up model into individual pieces of rigid bodies. RBD Fractured Object doesn't do it for me, so currently I'm using a Group Geometry node to manually select primitives and assign group names for the rigid body simulation. However, this is not a good solution because the simulation will break if I make changes upstream.

Other than that, I think I need a faster (multi-core) PC. My notebook turned sluggish when I added the DOP network, and this isn't even a complex scene.