All posts by WACOMalt

Making a fake reflective disco ball in Altspace SDK

Hey all. I got asked to write up a little about how I pulled of a fairly convincing spinning discoball in AltspaceVR. The SDK doesnt really support dynamic lighting, or reflections, so we have to approach this as a bit of a visual trick.

When you look at a disco ball, all you are seeing is a normal chrome ball, but the faceted reflections means each face of the ball is reflecting just a fraction of the area it would be on a smooth surface. However overall the reflection is still spherical, just with a lot of gaps between the reflected areas.

So I thought, we can do this with some UV jiggerypokery!

So First, Here’s what we’ll be making:


ooooo shiny!

The most important part of this is prepping your sphere. A simple hard faced sphere wont work because we need the faces’ UVs to be very separated and isolated, but still in the right places relative to the other faces.

So here’s what I did:

Made a sphere, woo! sphere

Then I mapped my skybox image onto it. This could also be a proper reflection sphere image for the location you plan to place the ball.  Here’s the image I used (made from Altspace’s own skybox):


Here it is assigned to my sphere.  Note the sphere is created with perfect UVs for this to map seamplessly: spheretextured

OK, so that’s a nice ball. Now we need to Separate the faces in the UVs so we get that faceted look. I also hardened the normals on the mesh at this point.

So Here are the UVs to begin with: startuvs

But we need to split the faces so they are no longer connected, and then shrink them into themselves. After separating the edges I used a Maya MEL  script I found here to shrink each UV “Shell” down towards its own center. Resulting in this:


Here’s how things are looking in our 3D view:


Now the trick here is that in Altspace we’ll use code to offset the image across these UVs horizontally.  The separation will make them seem to flash and sparkle.

The relevant code in Altspace, after loading the object is:

discoballMat = discoball.children[1].material; = THREE.RepeatWrapping; = THREE.RepeatWrapping;

This puts the current material to a variable. and then sets the map of that material to repeat the texture in all directions. So that once we start animating it to the side there’s another of the same image to go into.

The relevant part in the animation loop is this:

discoball.rotation.y += 0.01; = (THREE.Math.radToDeg(discoball.rotation.y)/360);

And with that, you should have this!



Lets try something new, VR GAME REVIEWS! The Gallery Episode 1: Call of The Starseed

So, my site has been dead for awhile. Why? Because I don’t have viewers. Why? Because I don’t make content! So to avoid a chicken or egg issue here I’m just going to start making posts!

So What has been eating my time recently? The Vive. The HTC Mothafuckin’ Vive. It’s a VR headset. It’s awesome. It has roomscale interactions with Not-yo-momma’s-wiimote motion controllers. You put this thing on, and sure you can see the screen, but you will lose yourself in another world. So now that I’m done gushing about how awesome this tech is, let’s get to the games! As of right now, there’s a total of 238 games on Steam for VR use. Not all of these are Vive only, and not all of them require or support the motion controllers. But suffice to say, for the headset just today beginning to hit actual retail shelves (I’ve had mine for a month now), that’s an impressive lineup!

Today we will be looking into the first game to really make me feel immersed in not just the environment itself (Most roomscale games pull that off perfectly) but the first game to really feel like it had some meat to it story-wise and pull me in. That game is “The Gallery – episode 1: Call of The Starseed”. Long name aside I really enjoyed this game. Let’s get started!

(Spoilers will be at the end of this paragraph, with a warning beforehand):
In The Gallery Episode 1: Call of The Starseed (CoTS from now on because holy crap that’s a long name!) puts you in the shoes of Alex (I think?) a guy who’s sister went missing on some beach. The time-period feels like maybe the early to mid 90’s. You are trying to find your sister, and it seems you and your sister must have been mystery hunters or something, and got led down a crazy rabbit hole. Your sister was on the trail of… something, leaving you clues along the way to follow in her footsteps. The main clues and story drivers are the Tapes she leaves behind, a dairy of sorts she made while discovering what this strange island hides.

During your journey, you encounter a strange and slightly mad scientist who knew your sister and apparently helped lead her to .. whatever she found. Through the mazes you go and you finally find what she had discovered. The Starseed. A device that can, and does, take you to the stars. where you discover all is not well with your sister, and that you are in grave danger.
The Sister character is believable, but the Scientist guy just seemed like a bad parody character. Like Rick from Rick and Morty if he were shoved into a serious drama, and less funny and interesting.)
Story: 7.5/10

Almost all games for VR right now will leave you a bit disappointed graphically. This is due to the GPU requirements for rendering a high res game, twice. That said this is one of the most polished games out right now graphically. It has a style to it that I really liked, and it is very detailed comparatively. It also has plenty of options to bump up the antialiasing and stuff if you happen to have beastly GPUs.
Graphics: 8/10

The game is a puzzle adventure game of sorts. Though I would say its more walking around than solving puzzles (with one maddeningly notable exception). You teleport around (“Blink” as they call it) and pick up important items along the way. The game uses a very fun inventory system, which although sometimes a bit finicky, is awesome and I love it. You have a backpack on your back, you simply reach back and pull the trigger to grab your bag. You then place it in front of you where it floats in space for you to drop items in and out. It’s very intuitive once you try it. Items involving interactions all seemed really well done. The Zippos flip open with momentum, the flare gun opens to be reloaded in a natural way, and the tape player works as expected, simply slide in a tape and it’ll start playing.

There are a few points of the game though that seemed unpolished to me.
(Spoilers) There’s a part where the mad scientist is throwing some fuses at you and you are supposed to catch them. This would be hard enough if it worked well. But not only does it not work reliably at all, but the scientist also likes to throw other items at you to distract you. this part which was supposed to take only a few seconds, a minute, tops, took me a full 20 minutes. It was maddening. This part of the game was followed by yet another somewhat buggy part. You have to fill in a grid of fuses to activate a security system. The numbers of the resistance on each wire has to reach a certain amount. The resistance amount of each wire is either guessed or found in hints the level (I had to guess two of the wires). And the wires are crossing and zigzagging all over the place. The puzzle is hard, but it’s a good hard. Challenging, but the gameplay mechanic for filling in the puzzle is just annoying. You have to grab these fuses, which are all floating around in zero gravity, and getting caught on various things. some just seem to get stuck and you can’t find them. I had to restart this puzzle 3 times. And the puzzle itself, without the bugs, still would have taken a good 20 minutes (In total I spent an hour and a half on this puzzle. I almost gave up).

This delay is a bit of a good thing, though, as the game is otherwise very short. this can be excused given how new the Vive is and how short a time most games for it have been in development. But it was definitely a let down to reach such a cool lead-in and then see credits roll. That is a testament to how good this game is. I highly recommend it. It’s one of the best story-driven experiences you can get on the Vive right now.
Gameplay: 7.5/10

Overall: 7.5/10 – I highly recommend this game be on the list for anyone who owns a Vive. It’s one of the best out. I docked a half a point due to the bugs I did encounter, but I think these will be sorted out. Play this game.

Quick tip – PROPERLY auto-mounting unprotected Windows shares in linux with full access

I’m mostly writing this to help myself when I need to do this again. This is how you mount a windows share at boot, with full write privileges.

Share your folder
make sure the owner is set to “Everyone” and be sure to add “Anonymous” as a user with full access (when you type in Anonymous, it should correct to “ANONYMOUS LOGON”). This should be done in share permissions as well as folder permissions. Make sure folder is not read-only on windows.
GUEST ACCOUNT may need to be activated:
gpedit.msc -> Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options ->
Accounts: Guest account status: enabled -> REBOOT


Make the folder to mount in
sudo mkdir /media/mountname

Now edit your Fstab file to set up the mounting
sudo nano /etc/fstab

add lines like this:
//192.168.1.XXX/ShareName /media/mountname cifs username=guest,password=,rw,uid=1000,gid=1000,dir_mode=0777,file_mode=0666,iocharset=utf8,sec=ntlm 0 2

The share address can be any valid UNC path. You can use hostname instead of IP if you want.


username=guest,password= – This is your login info for the share. Since the share accepts guest access we are using the guest user, which has no password (but you must define it blank or it will prompt for one)

rw – mounts the share with read/write permissions

uid=1000,gid=1000 – This sets the user and group info for the mountpoint folder. You can find what values you should use by typing id -u and id -g in the terminal.

dir_mode=0777,file_mode=0666 – This sets the standard access permission for the directory and files. 777 and 666 will give complete access to everything in these folders, by everyone.

iocharset=utf8 – This is a compatibility thing to properly support filenames with odd characters or other languages.

sec=ntlm – This is important. It’s the authentication protocol to use while mounting. NTLM is what most normal windows desktops will use by default. For more info about NTLM click here.

0 2 – These two numbers are order priorities. Basically the first one says if it needs to call sync before unmounting, which we don’t need. The second number is just which pass of mounting it will try to mount this in. Since /media (where our mountpoint is located) isn’t available until the root filesystem is mounted in pass 1, we need this to happen in pass 2. A 0 for the second number will still work because it keeps retrying every failed mount every pass until it works. But no reason to make it messy like that. so 0 2 is safe and clean for cifs.

Done! Go ahead and force a remount by typing sudo mount -v -a to (re)mount everything listed in your fstab file. (-v means verbose for feedback if it fails, -a means all)
Or you can just reboot. You should now see the share’s contents in the mountpoint you specified. And you should have full write privileges. If you dont, check the troubleshooting below.

If this doesnt work for you check all info then try:
smbclient //server/share -U guest
and leave password prompt empty and hit enter. If this gives an error then something on the windows side is wrong. If it works with smbclient, but doesn’t in fstab, probably your security type is wrong. check man mount.cifs – around line 327, to see other security options.

You can also try to use the mount command directly to test your options. Be sure your mountpoint is empty before mounting by running sudo umount -l /media/mountpoint
To mount our example share the command would be:
sudo mount -v -t cifs -o username=guest,password=,rw,uid=1000,gid=1000,dir_mode=0777,file_mode=0666,iocharset=utf8,sec=ntlm //192.168.1.XXX/ShareName /media/mountpoint
-v means verbose, -t means “type”, and -o is for listing options. Any errors here are the same errors you will get when automounting with fstab.

My PirateBox experience

My previous post detailed what PirateBox is, but how do you get one?

Well, there are a few approaches. You can try to find someone selling pre-built boxes, but where is the fun in that?

If you want to make your own you can buy one of the supported Routers (buy links near the top few steps), or build one from a $35 computer called a Raspberry Pi (Note that you will also need a SD/SD Micro card, and a WiFi adapter if you go this route, and it is a bit more in depth to get set up, but it’s more fun 🙂 )

Continue to the experience!

Continue reading My PirateBox experience

PirateBox is a really cool project!

So I recently discovered a project called PirateBox. It is an open source project designed to give people an easy way to share files, without using the internet as a backbone. Instead, PirateBox focuses on local area networks, like a coffee shop, library, or home WiFi.

Piratebox is software that can run on any OpenWRT device, or on the cheap ($35) single board computer the Raspberry Pi.

What it does is it makes a WiFi access point that any wireless device can connect to. This box does not access the internet, so you’ll find no internet connectivity while connected to this access point, but what it does offer is a way for users who are close to each other to share anything they’d like, and chat or post on a locally hosted message board. The box hosts a storage location, say, a large flash drive, so that anyone can view or add to it’s contents. Like adding books to your local library.

Useful for parties or events, people can all upload their images and videos of the event to one centralized place while they are there, and those can later be taken in bulk and shared or archived.

The box comes in handy for people in areas with limited or controlled internet to allow free communication and information to flow, while the internet itself may be censored, blocked, or entirely down. Since these boxes are little computers, they can be adapted easily to expand their capabilities.  They draw very little power and are very cheap to set up compared to a full fledged server. Even if you arent interested in PirateBox you should check out some of the things people are doing with Raspberry Pis

PirateBox has a funded brother called the LibraryBox, both projects share a linked code-base.

Check out the PirateBox project at, or LibraryBox at
I’ll be posting follow up articles about how I set mine up, and what I plan to do with it.