Blog of Josh "Renanse" Slack

Updates and commentary from the depths of a 3d Java code spinner's mind.

Tuesday, November 15, 2005

Shadows part 1

Shadows are making their way slowly into jME. See below and note the self-shadowing... :)

(click image to see it in its full glory)

5,2 pqtorus with shadows

Labels:

Wednesday, November 09, 2005

What in the world?

Someone explain this to me. I caught a guy from another project stripping some jME code of its license and author tags and publicly called him on it. This person was someone I considered a friend or at least someone I was generally friendly with. Mostly because he reminds me a bit of myself at his age... Young, full of aplomb and naively optimistic and maybe a bit arrogant about my own abilities. Basically he refused to apologize or even see what was wrong with the situation and then privately we had the following conversation (I'll be nice and hide his identity):

Renanse: If you'd just apologized or something you could have saved a friendship.
Renanse: Good luck in the future.
"other guy": two words:
"other guy": "f***"
(editor: censored here...)
"other guy": "off"
Renanse: Real classy
"other guy": thanks
"other guy": you yanks sure know how to ruin friendships
"other guy": being all superior and whatnot

What does my citizenship have to do with anything? And how does asking someone to fix a license violation equate to "being all superior and whatnot"? Embarrassment maybe? Oh well, with this posting... it's in the past for me.

Perhaps it's like licks on a Tootsie Pop©... The world may never find out.

Labels:

Wednesday, November 02, 2005

ThirdPerson jME System and Editor done

Finally after several weeks, I'm satisfied enough with the ThirdPerson control and camera system and its accompanying Editor to call it a 1.0 release. The editor is pretty cool (similar in form to the particle editor I did in the past) and "allows you to quickly configure in real time all of the options in [this system] and also immediately get a copy of the exact code required to bring your creation into your own app."

From the official notice:


ThirdPersonHandler:

  • Properties can be set either directly via accessor methods or via a HashMap of properties. When setting via properties, all primitive values should be represented as Strings.
  • Movement can be relative to the camera's frame or the targets current rotation.
  • All movement keys can be reconfigured.
  • Left/Right movement can either be rotation in place or gradual rotation over time as the target moves forward (think turning radius) Speed of turning (radians per second) is configurable.
  • Custom movement permission class can be supplied to allow/disallow movement.
  • Customizeable up vector (in case you don't want to follow jME's y axis up model.
  • Lockable back motion (think backing up in a car vs. turning around your avatar to move backwards.)
  • Strafe movement support - can be independently set to target-aligned even if other movement is camera aligned.


ChaseCamera:

  • Autocreates ThirdPersonMouseLook and passes the properties HashMap from the constructor to it.
  • MouseLook can be disabled if only ChaseCamera function is desired.
  • Camera motion is (by default) smoothed by a spring system. The spring constants are configurable - most easily by the editor.
  • Spring smoothing can be disabled if desired.
  • Camera can be configured to always come to rest behind the target. By default it comes to rest in a line straight towards the target regardless of the target's orientation - allowing you to swivel around and view the target from the front.
  • A maximum and minimum camera distance can be configured to keep the camera from getting too close or too far from the target (if your springs are too stretchy for example.)
  • Camera can be configured to look at an offset to the target's location. This is useful for things like moving the camera's center of view from a character's waist - where the worldlocation point may be - to their shoulders.
  • Initial spherical coordinates are configurable.


MouseLook

  • camera's max ascent (how much of an angle it can make with the ground) is configurable and even lockable.
  • Max/min zoom (using mousewheel) is configurable.
  • Mouse speed is seperately configurable - horizontal acceleration, vertical, zoom.
  • Vertical control can be inverted - for those who prefer "pilot controls"


Wow. What a mouthful. For those who slogged down this far, here's a few images of my new editor in action:


Notice the cool custom vertical tabs?


Code window for easy copy/paste to your app.

Labels: