Barricades and Buttons
Posted by JTippetts, 11 November 2013 · 563 views
Goblinson Crusoe Urho3D turn-based rpg hex-based rpg Blender Cycles
Goblinson Crusoe now has the ability to use wood planks to construct a wooden barricade. Wooden barricades have 1000 life, and are extremely resistant to all forms of damage except Siege and Fire (against which they have a -100 vulnerability). With this ability, he can now fort up and hunker down.
I also made a couple of buttons for the cannon and barricade build skills.
I just used the actual models for the two entities, rotated them a bit and squished them down on Z, then back-dropped them against the standard button background. It works pretty well, I think, and that's the method I'll probably use for most buttons of that nature.
Speaking of buttons, someone asked me how I make my button graphics. The answer (as is the answer to every thing I do) is Blender. I model the various pieces in Blender, assign materials using Blender Cycles nodes, and render a sprite sheet. I created a sort of glossy/matte material (it's part diffuse, part velvet and part glossy shader) to form the basis of the button graphics, derive from it for different colors and variants, and set up some directional lights for an even lighting scheme. Here is a shot of the 3D view in my buttons.blend file:
The render size is set to 1024x1024, and each button is scaled so that when rendered they will be 64x64 for the action buttons, 32x32 for the spellbook scroll buttons, and 16x16 for the combat log scroll buttons. For each of the action buttons I render one instance using a gray material (for deactivated buttons), one using a normal material (for an activated button), one using a lighter material (for hovered-over buttons) and one using a darker material (for clicked buttons). In my uistyles.lua file, I assign locations for the buttons so that skills know where to find their icon. As you can see, I don't have a whole lot of buttons yet; but then, I don't have a lot of skills yet, either. It takes about 10 seconds to render my buttons out to png when I make changes.
I also use Blender a lot for rendering out different textures, in conjunction of course with the Accidental Noise Library. For example:
That is a rock wrap texture for a lava-filled rock. While it's not in use right now (I didn't like the base model it was built to wrap, and in fact may have even deleted that model) it was made using Blender Cycles, since the node system provides powerful shader-like tools for creating materials that are emissive in parts and diffuse in others. Other examples include rendering wood textures (using a procedural wood material I found), stone textures, etc... It does take some careful unwrapping and staging to use Cycles for this kind of work, though, since Cycles currently can't be used to bake to texture. That means that I need to stage objects in the 3D to line up with UV layouts, rotating and aligning them so that when rendered they correspond to the uv map. This means also that I need to be careful with lighting, since the layout won't correspond to real-world orientation and thus lighting might look wonky. It works best for simple procedurals like the wood, or for things like the stone/lava maps above. The UV unwrap needs to be very simple and straightforward, so it doesn't work very well for complex unwrapped models like GC himself.
Other procedurals I bake directly from ANL module chains into a UV map. I wrote code to load a model, create an image and rasterize the model into its UV, baking data from the ANL module into the image. This is how I generate most of my stone and dirt textures, how I generated the mottled, rusty metal of the bombard barrel, and so forth. It's actually fairly rare that I do any actual hand-painting of models any more, at least for environment stuff. Some things, like the Basic Spell Book texture, Goblinson's skin, etc... I had to paint, but I've done a few tests involving procedurally generating a skin for a character using only a painted blend map to delineate materials, and have gotten good results, so I might try re-skinning GC that way and see how I like it.