Player Customization

So I am testing out swapping meshes and textures for the player customization. So far, I have a skinned player who’s head and hair meshes can swap to another set, and a skin texture that swaps. I have added some face bones to my rig, as well as four hair bones to give some mild hair animation.

I was having an issue with one of my meshes. Some of the faces weren’t showing up in Unity, despite the normals being correct in Blender. It turns out the mesh’s textures were all… screwy? I’m not sure. Some of the faces were displaying a different texture. It was very strange.

My test project is a huge mess right now, so I will start a new project tomorrow and populate it with various meshes and textures. I’d like to have at least the female character creation system set up in a reasonable amount of time.

I don’t want to give myself a concrete due date at the moment, because I am going away this weekend, and the Jaws of Hakkon DLC for Dragon Age is coming out tomorrow, apparently, for PS4, so I will probably be losing some work time in the near future.

Here’s the terrible demo. Press A to swap body texture, S to swap face mesh, and SPACE to swap hair mesh (god help us with this hair mesh. I haven’t figured out alphas on shaders quite yet):

http://www.johnalatouf.com/testing/FaceSwap.html

Unity Raycasting Reflections

Okay, so, Unity is kind of a pain, but I did manage (with lots of help and the use of a pretty good tutorial here http://www.41post.com/4162/programming/unity-raycast-reflection) manage to put together something that I want.

http://www.johnalatouf.com/testing/LightPuzzleTest.html

There are still some bugs. For one thing, the way to select the mirrors is stupid right now, but that’s fixable. You have to click and remain hovering over them with the mouse, then spin them using the left and right keys. More concerning is the fact that when I have two beams hitting one mirror, the first reflection beam is replaced with the new reflection. It shouldn’t do this. I guess it should display both? I don’t know, that might just be annoying. I’ll think about it.

My Art Site

So I have created a new theme for my art website. I built it off of http://underscores.me/ which is a great starting theme. I studied a few tutorials to figure out how to make the layout scroll horizontally. The links in the navigation menu point to the id of each div. When a link is clicked, the html,body scrolls to that target minus the width of the margin to centre it. At the same time, the background and foreground divs also animate the same distance with different timing.

Getting the whole thing to line up at all screen sizes was a delightful experience. Javascript makes it fairly easy to detect the size of a window and when it resizes, so I was able to dynamically resize the images easily in a browser. The real challenge was making the whole thing work for mobile. It doesn’t help that mobile devices insist on holding onto javascript no matter how many times you try to clear their caches. In the end, I had to rename js files over and over just to test my tweaks.

The sky is a simple CSS gradient that changes based on the hour. The hour also adjusts brightness and contrast effects on the foreground and background images.

Outstanding Issues:

  • The pages are hard coded into the index.php file. I’m not happy about this. It works fine for my website, but WordPress themes should be more dynamic than this. I would like to find a way to load pages dynamically and resize the website to account for new pages.
  • There’s no support for sub menu links.
  • I have disabled the links to entry permalinks. I wasn’t sure how I wanted to display those yet. Right now, they’re just a mess.