Thank you, Former Me!

Just a little n00bie indie dev “in the trenches” update.  Working on my Mx. Pet Rock app this week (the one with googly eye collision issues that inspired my Dragon Dozer app fixes) and feeling gratitude to my Former Self for having figured something out — a simple scene change menu script — months ago, and saved it in a readable, reusable fashion.

It’s difficult when you’re a complete novice at programming, to annotate (comment) your work, not just clearly, but correctly too.  Some of my prehistoric understanding of code was just wildly off the mark (I’m talking “if this, then this” when in fact “this caused that”), so going back and trying to reuse snippets I wrote months ago is a mixed bag.  But yesterday, my old button/menu solution just worked.  YAY!

Former Me apparently did a bunch of research and testing that resulted in delightfully *working code*, and I love her for that because Present Me couldn’t find the answer despite hours of prayer to the Google Gods.  I just wish Former Me had left a few more breadcrumbs.

Anyway, with that I will leave you with this little tidbit of memegold linked to me by my lifepartnerextraordinaire:

x0ml8

Advertisements

The trouble with dragon collisions, part 3

ETA: http://www.hyperbeamgraphics.com/DragonDozer/index.html

SO.  In previous episodes, I was having trouble setting up the collision mesh for my animated dragon wings for various (now embarrassing) reasons.  Today while working on creating googly-eyes for an entirely different game, I hit upon the solution for Dragon Dozer.

It’s simple.  In Unity, you can place a variety of primitive objects, which are created with their own, form fitting collider component.  They are very easy to place in the scene and scale, move and rotate.  I knew that.  What I didn’t know, was that you can parent the actual primitive — not just the collider, but the actual editable primitive object — to the animated bone of another object: dragon wing bones, for example.  All you have to do to make the collisions work for the parent object then, is to “turn off” the mesh renderer component of the primitive objects.

What I was trying to do was edit the collider components applied directly to bones, which is exceedingly difficult to do.  Any time you click anything but the tiny edit points on the collider in edit mode, edit mode is turned off and you have to go back and enable it again.

I know I had seen mention of this method of parenting primitive meshes to individual bones of an animated model before as I was searching for a solution, but for some reason I always thought people were referring to the collider components themselves as “primitives” because 3D colliders come in sphere, capsule, cube and plane.

What made the lightbulb come on for me today was trying to set up collisions on a modeled plastic googly eye.  You see, you can’t simply put one object with a collider (the little plastic pupil that wiggles around), inside of another object with a collider (the plastic dome container).  When you try it and push play, the containing collider pushes the inner container out faster than a bunny making babies.

The answer then, is that you have to make a thin “shell” out of multiple colliders, whose outsides resist intrusion as intended, and this is called a compound collider.   Here’s a sneak peek at my silly setup:

googlyeyecollider

I am in no way endorsing this setup, it just happens to be what I’ve found actually works to contain the pupil part without spitting it out.

There you have it, the proverbial two birds, non-lethally contained in one (compound) collider (or in other words, two problems solved with one solution.  Yay!  I spent the afternoon outfitting my dragon wings with colliders that move with the bones, and now my projectile physics work as intended and I am happy as a clam!

Updating my site

Recently I announced to friends and family that I’m reverting back to my old name, Laurie Annis.  I’m going to keep my kids’ last name legally until they are all 18, but I’ve been switching to the new/old name in other ways until then.

Toward that end I’ve been updating my accounts on Facebook, Tumblr, Twitter, WordPress and so forth, but I’ve also completely revamped my website and changed the address to HyperbeamGraphics.com.  I’ve transitioned what once was a portfolio site into a gallery of my many services.

The main portion of the newly redesigned site is the shop where I sell 3d models, textures and graphics for indie games.  I’ve gotten pretty good at customizing the Ecwid shopping cart, so if you need any help on your own shop site, hit me up!  There’s also a section of all the shops I run with my original 2D and 3D artwork on everything from jewelry to gift wrap.  I even dedicated a portion of the page to tutorials I’ve published.

I’ve been brushing up on my web design skills and switched to a responsive design for the whole site, learning a thing or two about bootstrap along the way.  I’m currently working to upgrade my demo Unity environments to the Web GL format that will be more widely supported going forward.

So there it is, the latest news on my site update.  As always it’s a work in progress, but I’d be pleased if you paid it a visit!

The trouble with dragon collisions update

I believe I may have found the solution to my trouble with dragon collisions.  If you recall, the issue was that I want to be able to throw objects at my animated dragon, and have collisions register all over the body, but I had discovered that you can’t add a mesh collider to an animated object.  You can only add primitive colliders (capsule, cube, sphere) to individual bones of the rig, which was making the prospect of creating a smooth, animated dragon wing that registers collisions, a nightmare.

Until I stumbled across this video, which explains Unity’s interactive cloth:  https://www.youtube.com/watch?v=8b-hVa4dlVA

The demonstration of a soccer goal net reacting to balls thrown at it realistically seems to be the exact solution I need.  We shall see!

Simple swinging sign update

Recently I did a significant amount of work on one of my previously mentioned “To Do” items: Simple Sign Animation and figured I should update my blog to let you know where to find it.  Instead of simply adding my swinging sign animation as a new game object for sale on my Asset Shoppe, I’ve posted an entire tutorial on how to create your own in Blender and import it with the animation into Unity:

http://laurieannismorgan.com/store/tutsign1.html

I’ve even added a little demo environment where you can walk around and see the animation play in real time:

http://laurieannismorgan.com/store/Sign_Webplayer.html

In the process of creating an entire tutorial, I decided to dedicate a space for future tutorials, and have also added a nifty one on creating a realistic pine tree for games, using a series of particle effects converted to real objects.  Check it out!

http://laurieannismorgan.com/store/tuthome.html

 

The trouble with dragon collisions

In my last post, I outlined a few of the projects I have in progress and what it will take to complete them.  One in particular deserves a bit more attention than that, and perhaps even some feedback, in order to get over a major hurdle.  Regarding my Dragon Dozer game, which will be a Unity 3D browser game, the top obstacle I listed was to, “find a way to add realistic collision to animated model.”

Unlike most of the hurdles I’m facing with my other projects, this one is appears to be a literal game killer, at least from my perspective.  The basic element that is essential to my progress is an animated dragon model that the player will hit (or avoid hitting) with projectiles.  Fortunately I have the dragon modeled, textured and animated, and his animations so far are simple.  He’s sleeping.  The main animation is the dragon breathing and swishing his tail, which I’ve already completed and tested in Unity: https://www.youtube.com/watch?v=fy_YQFRJGF4&list=UU8hCAFT0KdXdxReurhU18Pw

My design was to have the dragon register collisions with the projectile as you would expect, accurately, and anywhere on its body.  Ding the wing, the dragon reacts.  Bump the rump, you get the point.  I understand how to add collision meshes to most objects, so I’ve got my projectiles all figured out.  Unfortunately, I didn’t find out until after testing my dragon in Unity, but you can’t add a mesh collider to an animated object.  You can only add primitive colliders (capsule, cube, sphere) to individual bones of the rig, and achieve pretty…lumpy collision with an animated object that way.  This would be adequate where you just want, say, a fast moving NPC to register collision with a projectile enough to simply record a “hit,” but this isn’t an action game, and I actually want projectiles to realistically bounce off every surface of the dragon instead of going through or bouncing off thin air.  That’s kinda the entire point of the game.

So, what to do?  Constructing a group of primitives that is adequately form fitting to the shape of an animated dragon, is proving to be far beyond my capabilities.  For one thing — and perhaps I need to revise my rig and animations anyway because of this fact — my dragon rig has a lot of tiny bones, especially in the tail, to effect the smooth, organic bend that I was going for.  I’ll admit I’m largely self taught on the subject of envelopes and weights, and therefore maybe I’m missing some technique for skinning my rig that would enable my mesh to deform more smoothly with fewer bones, but right now the fewer bones I have, the more angular the mesh deformation I’m getting.  Or maybe I only need more bones in the tail but not elsewhere, as not much of the mesh deforms aside from that.  Either way, I still want (visually) realistic collision on every part of the dragon, and lots of bones makes for an organizational nightmare, because you have to drill down through the rig’s hierarchy in order to apply collisions.  Fewer bones would mean fewer primitives I can use for collision though, so the fit would be less precise.

Now, I do have a low poly set of dragon mesh pieces that I wish I could use for collisions, and it has been a few months since I have attempted to test this out, but I seem to remember that I was not able to use any other mesh at all besides primitives as a collision object for an animation.  Writing this post has already inspired me to set up a quick and dirty new rig and collision mesh set to test this out again, and I hunted down some threads on Unity Answers that support my conclusion that this is the case, so I guess I’ve succeeded in motivating myself to tackle this again, but I’d still appreciate feedback that anyone may wish to offer that might help me get the results I’m looking for.

In the works

In addition to lacking a little self promotion, I desperately need some encouragement to complete a bunch of projects that I’ve poured many hours and love into, but just haven’t gotten to the point of publishing.  As a little bit of a kick to my own rear, I thought I would post a short list of the most pressing projects here, along with details about what it will take to get them complete.

Low Poly Medieval Marketplace

What I have modeled and textured:

  • weathered market stand with 3 colored tarp variations
  • weathered wooden crate
  • weathered wooden table and benches
  • 15 fruits and vegetables
  • woven basket
  • sack of grain
  • tileable cobblestone ground texture
  • bottles

What I need to do:

  • decide whether to publish individual textures or a single texture map (or both) for the fruts/vegetables
  • render new textures for glass bottles
  • do final export prep work, note poly counts, name all objects properly, test normals, remove double verts
  • export to .fbx or .obj or both, test in Unity
  • create promotional materials (renders, graphics, text)
  • publish

Rustic Construction Site

What I have modeled and textured:

  • weathered wooden scaffolding and ladder
  • rustic bucket, saw, hammer, tongs
  • tree stump with anvil

What I need to do:

  • decide for or against additional props (fire pit/forge, logs, hut, coiled rope, trees, more?)
  • decide whether and how to model and texture rope ties
  • re-model support poles
  • prep, test, export, promote, publish

Desert Foliage

What I have modeled and textured:

  • saguaro cactus, 3 varieties
  • blooming ocotillo
  • blooming agave
  • tumble weed
  • boulders
  • textures only, palo verde tree

What I need to do:

  • render desert ground textures (dirt, rock, rocky dirt, dry grass)
  • render vertical grass textures for terrain
  • decide whether to finish modeling palo verde tree
  • modify blooming models for non blooming versions
  • prep, test, export, promote, publish

Horror Props

What I have modeled and textured:

  • texture only, dungeon walls
  • high poly skull, low poly skull
  • shackles and chains
  • candles
  • gravestones only, no texture
  • medium poly creepy tree
  • harvest moon
  • pumpkin

What I need to do:

  • brainstorm scene and additional props
  • design and model original jack-o-lantern face for pumpkin
  • texture gravestones
  • model spiderweb candelabra and candle variations, texture flame (animate?)

Dragon Dozer Game

What I have:

  • environment and game piece models and textures
  • dragon model, texture and animation
  • projectile system
  • collision set up on most models

What I need to do:

  • find a way to add realistic collision to animated model
  • create UI graphics
  • implement UI
  • really a lot more but those are the big obstacles

Simple Sign Animation

What I have:

  • chain models
  • rig
  • animation
  • sign texture

What I need:

  • simple sign model
  • add rig
  • export, test in Unity
  • publish

Weathered Old Books

What I have:

  • two book models, open and closed
  • hundreds of texture options (ornate, plain, new, destroyed, multiple finishes, endless colors)

What I need:

  • decide on an adequate number of textures to offer
  • export textures
  • process textures for multiple resolutions
  • create promotional materials (renders, graphics, text)
  • publish