jacksontech

ramblings of a nascent network administrator

Windows 10 Spurious Wake – Check Your NIC Power Settings!

Published by Cody Jackson on May 29, 2017 | 1 Response
Really? REALLY?

I put my Windows 10 desktop to sleep last night and laid down in bed to engage my own “sleep mode”. Five minutes later, with a frantic rush of cooling fans, my PC woke itself back up. I gave the cheerful login screen the middle finger, shut it down, and made a mental note to troubleshoot in the morning.

There’s tons of forum threads and blog posts on Google about spurious wakeups. My old Windows 7 laptop used to wake itself up for the sole purpose of going into hibernation if it had been left in sleep mode for longer than six hours on battery. My Windows 8.1 tablet…still does whatever the heck it’s doing to drain the battery. And my Windows 10 laptop has occasionally woken itself to do updates.

But the cause of my desktop waking up was none of these. Instead, Event Viewer shows me this:

Really? REALLY?

 

To verify, I put my computer to sleep while pinging it with arping from a Linux box. Interestingly, even in the brief time it was asleep, arping continued to receive responses. A few seconds later, the machine boot up again.

This can probably be fixed from the BIOS/UEFI. However, another quick fix is to open the NIC settings in Device Manager and either uncheck “Allow this device to wake the computer” or, if you still want Wake On LAN capabilities, check “Only allow a magic packet to wake the computer”. Apparently, by default, the computer can be woken by any packet that is directed to the NIC. In a noisy LAN environment, this is unacceptable.

Check the circled box if you want to keep WOL; uncheck the box above if you don’t want it to wake your computer, ever.

 

Note that I still haven’t figured out root cause–what sent the traffic in the first place–but that can come later.

 

 

Posted in Computer Tech, Networking | Tagged network card, nic, spurious wake, wake, windows 10

OSVR HDK v1.3/1.4/2.0 – IR Board Firmware Update – Part 1

Published by Cody Jackson on March 29, 2017 | Leave a response
OSVR HDK v1.3 next to ST-Link/V2 USB programmer

Sensics, the developers supporting the Open Source Virtual Reality (OSVR) project, has recently merged improved IR camera tracking code into their codebase. This patch improves the performance of the IR camera tracking system, which uses IR beacons on the OSVR HDK (the bit that goes on your head) to track the users’ position in 3D space. Position tracking with the OSVR has been a thorny issue for some time, so this is a very welcome update.

The new tracking code works in tandem with some changes to the IR beacons on the OSVR HDK. It looks like Sensics released new firmware for the IR LED driver board. This firmware disables some of the redundant LEDs on the HDK, which prevents the IR beacons from blurring together into one pulsating mass at a distance.

Unfortunately, while the HDK and IR camera firmware can both be upgraded over USB, the IR board in the HDK seems to be physically disconnected from the main board, which means the only way to upgrade the firmware is to directly connect a ST-Link/V2 USB programmer to the board.

Some of the early HDKs do not have a connector on the IR Board for the ST-Link/V2. If you have one of these HDKs, you can follow this user’s excellent guide to soldering the proper connector to the IR board. My HDK v1.3 turns out to have the proper header, which is a tiny 4-pin ERNI connector. Here’s the process I used to upgrade the firmware.

OSVR HDK v1.3 next to ST-Link/V2 USB programmer

1. Get the ST-Link/V2 USB programmer. I ordered mine from Digi-Key. There are two variants: the “hockey puck” version, which comes with the correct 4-pin cable for the “P5” header built onto later editions of the HDK, and the $10 version on the OSVR store, which as far as I know does not come with a cable. If you’re soldering your own connector, you’re braver than I am, and you also can probably use the cheaper programmer on the OSVR store because you can make your own cable.

2. Download and install the ST-Link drivers from the ST-Link website. They’re free, but you have to give them your email.

3. Download the latest IR Board Programmer Bundle (.exe) from GitHub.

4. Unscrew the two tiny Phillips screws on the bottom of the HDK.

The two screws on the bottom of the HDK, as well as the itty bitty screwdriver you’ll need to open it.

5. If you don’t have the P5 header on your IR board, this is where you’ll need to start soldering. If you do, you can go to the next step. The header is circled.

P5 header, a 4-pin ERNI connector.

6. Hook up the programmer, first to the IR board, then to the computer. Use the 4-pin SWIM to ERNI cable connected to the STM8 plug on the programmer (if you’re using a premade cable).

Programmer attached. Used the 4-pin SWIM->ERNI cable.

7. Hook up the HDK to the computer via USB. I also plugged in my power brick for the HDK. This may not be necessary and may potentially also damage the HDK in some unforeseen circumstances, so be careful. The ST-Link/V2 on its own does not seem to have enough juice to power the IR board on its own for programming, hence this step.

8. Run the firmware bundle .exe. It’s a self-extracting archive. Extract to a folder.

9. Start a command prompt with elevated privileges and run Program-IRFirmware.cmd. If you didn’t hook up the power to the HDK, you’ll see “Tries Exceeded” as the ST-Link/V2 tries and fails to power the USB board. Otherwise you’ll see the message in green below.

You should see the message in green.

At this point, disconnect the power/USB from the HDK, disconnect the ST-Link/V2, and reassemble the HDK. Now when you power on the HDK, you should see an asymmetrical pattern in the LEDs. You’re done!

Done!

After installing the IR Board firmware, I also installed the OSVR Performance Upgrade for HDK v1.3/1.4. I don’t know what this does exactly, but the OSVR docs say to do it, so I did it. Annoyingly, you have to provide an address to check out anything from the OSVR store, but at least it’s free.

In Part 2, I’ll describe how to set up the OSVR server configuration file to use the new IR tracking plugin.

Posted in Computer Tech, VR | Tagged Firmware, IR Board, OSVR, OSVR Firmware, VR

Furry Octo Pancake – Postmortem

Published by Cody Jackson on January 1, 2017 | Leave a response

With the upload of the .apk file, I consider this project “done”. (It’s not actually done, I’d like to expand it, but whatever.) Here’s some of my thoughts on the process of building the thing:

Bake EVERYTHING

Mobile phones are limited in their processing power. Realtime lights look awesome, but will bring a mobile phone to its knees. Just say no. But…

Don’t forget to factor in build times

“Hmm, I don’t like the way the lightmaps look. I know, I’ll just kick off a final compile and go to bed.” 27 hours later…

Not good for estimating release dates.

On a related note…

Do learn how to use your darn tools

I had the lightmap settings cranked up way too high for no good reason. Some tweaking brought the build down to a much more manageable 30 minutes or so.

Lots of different materials == rendering state changes == bad

One of the main problems with the game is that it lags terribly because of a high number of state changes and a high number of vertices. Even static batching didn’t help much. The problem is that 1) I’m using Unity’s built-in shaders and 2) I assigned multiple materials per mesh to make things like windows…and I made a ton of windows. In the future I’ll experiment with my own shaders and using some textures and/or vertex colors to pull off different colored materials. On a similar note…

Using vertex displacement for undistortion looks interesting

I’m referring to Brian Kehrer’s excellent talk on achieving smooth VR performance on older devices. The gist of it is to use the vertex shader to correct for lens distortion by moving vertices around, instead of by using a more expensive render texture or postprocessing shader. I really wanted to implement this but did not have time. (As a side note, this is why some objects, like the bed, have way too many vertices–denser meshes is a requirement for this technique, but I went overboard, also contributing to the performance issue.)

And finally…

Gamedev is hard work

I mean, this should be obvious, but the project reaffirmed my belief. The 2-5 minutes of gameplay, relatively unpolished and still a bit buggy (I’ll let my kind readers discover the bugs–yay using users as beta testers!), took over a week to produce. A large game title with hours and hours of content, lots of high quality textures, beautiful graphical effects, a custom soundtrack, animated models, etc etc etc, quickly becomes prohibitive for one person to produce. But it was still fun, and I’m up for another project in the future! Stay tuned.

Posted in Game Dev, Google Cardboard, Projects, VR | Tagged Eight Day Game Project 1, gamedev, Google Cardboard, VR

Furry Octo Pancake (eight day game project) released

Published by Cody Jackson on December 31, 2016 | Leave a response

After eight days of work, here’s my VR Google Cardboard game! Check out the release page here. The .apk build will be uploaded within a few hours.

I also added a VR section to the blog where I can in the future collect all my tutorials, projects, and other articles.

Posted in Game Dev, Google Cardboard, Personal, Projects, VR | Tagged Eight Day Game Project 1, gamedev, Google Cardboard, VR

VR Game Project – Day 8 of 8

Published by Cody Jackson on December 31, 2016 | Leave a response
Final geometry

The last day is finally here! I spent most of it optimizing and polishing. All of the buildings were lovingly trimmed away in Blender so that only faces facing towards the player were preserved. I also tweaked the lighting a lot and added music. It’s still compiling the lightmap on my lightmap. As soon as it’s done, I’ll upload a build.

Speaking of music, the music I ended up choosing was on of 70 tracks released by Mark Sparling under CC-BY. Check out his website or his soundcloud.

Screenshots!

Beauty shot of the office

 

 

Beauty shot of the buildings

 

Final geometry

Posted in Game Dev, Google Cardboard, Personal, VR | Tagged Eight Day Game Project 1, gamedev, Google Cardboard, Unity, VR

VR Game Project – Day 7 of 8

Published by Cody Jackson on December 29, 2016 | Leave a response
New transparent targets.

Lots more polishing. After doing some “hallway testing” (by grabbing random victims in the hall and asking them to test the game), I tweaked the targets to make them both more obvious and slightly cooler looking. I also added ambient sounds, although they seem to be buggy–the first time the player enters the level, they play full volume even outside their range. Odd! Anyway, have some screenshots.

 

New transparent targets.

 

New office sign!

There are some bugs still, but I think the game is playable enough as is to release after tomorrow. I’m hoping to find some music to go along with it, but if not, that can come for Version 2.0.

Posted in Game Dev, Google Cardboard, Personal, VR | Tagged Eight Day Game Project 1, gamedev, Google Cardboard, VR

VR Game Project – Day 6 of 8

Published by Cody Jackson on December 29, 2016 | Leave a response
End target. Click this to make a winner is you!

Lots of behind-the-scene progress. The story is now complete and the game can be played beginning to end (which only takes about 2-5 minutes…hey, I only had 8 days here…).

End target. Click this to make a winner is you!

Kitchenette in the apartment.

Posted in Game Dev, Google Cardboard, Projects, VR | Tagged Eight Day Game Project 1, gamedev, Google Cardboard, VR

VR Game Project – Day 5 of 8

Published by Cody Jackson on December 27, 2016 | Leave a response
It speaks! IT LIVES.

Finally! A dialog system!

It speaks! IT LIVES.

Also finished most of the main external geometry:

So many wasteful polygons

However, the buildings are very inefficient. I might remake them in Blender to reduce polycount.

 

Also, the main “puzzle”:

Hmm, what is the password?

Future work is mostly focused on making the apartment prettier and adding an endgame trigger. Then sounds and optimizations, etc. I also want to add spaceships out past the balcony, and if possible, some nice ambient music.

Posted in Game Dev, Google Cardboard, VR | Tagged Eight Day Game Project 1, gamedev, Unity, VR

VR Game Project – Day 4 of 8

Published by Cody Jackson on December 27, 2016 | Leave a response
A robot, sitting at a desk!

Late update–I completed the work last night but had to go to bed.

I spent most of the day doing modeling and 3D animation. I have a fully-rigged Robot that animates a typing loop at its desk. This robot is an NPC that can be interacted with!

A robot, sitting at a desk!

Same robot, fully rigged.

Trees!

 

The dialog system is still in progress. Check out the Day 5 post–which will be up in a few hours–to see what it looks like!

 

 

Posted in Game Dev, Google Cardboard, Projects, VR | Tagged Eight Day Game Project 1, Game Dev, Google Cardboard, VR

VR Game Project – Day 3 of 8

Published by Cody Jackson on December 25, 2016 | Leave a response
Adding a UV map in Blender

More progress, although not in the direction I was anticipating!

Bug Fixes and Improvements

The “blink” script continued to be problematic, so I removed the fancy one I grabbed from the Unity wiki and wrote my own very simple one. It works. I will release it CC-BY when I upload the source and build.

I did some “hallway testing” with family members. One of them had trouble getting out of the starting room because the door closed too fast after it opened. Instead of bumping up the delay, I did some hacking and came up with a context-sensitive “polite” door that refuses to close as long as you’re looking at it. Unrealistic? Maybe. Convenient for the game? Very much so! Like the “blink” script, I will release the door controller CC-BY later.

Last, the targets did not fully disable their collider when you teleported to them. I added some code that fixes this.

Lighting

Got lots more lighting done. I figured out my workflow…

  1. Create my models in Blender.
  2. Assign materials to vertices. I tried to keep the names straight so I wouldn’t end up with lots of duplicates (Unity reuses materials after it sees one for the first time, which is kinda nice) but I still ended up with a few typos and duplicate materials. Oh well, lesson learned.
  3. Create a UV map.
  4. In Unity, check the “Generate Lightmap UV” checkbox.
  5. Mark the mesh as static.
  6. Mark all my lights as “bake” vs “realtime”
  7. Disable realtime GI baking in the scene lightmap settings and just leave general GI baking enabled.
  8. Tweak the Baked GI resolution (40-60 seems good for testing; 128 looks reasonable for final builds)
  9. Check “Final Gather” for final builds.
  10. Bake!

Adding a UV map in Blender

Telling Unity to create lightmap UVs.

Skybox

It’s wasteful to use 6 huge images, but I did make a skybox using Unity’s skybox shader. I used Ingar’s space sky textures from Unvanquished for now. These are available CC-BY-SA 3.0 and I will make these files available when I realize a build and the source.

Furniture!

A table, a chair, a couch, a bed, a bedside table, two lamps, a computer monitor, a keyboard, a small desk, and a refined version of the curvy desk, all handcrafted with the finest non-GMO free range organic vertices by yours truly.

Screenshots

Here’s the fun bits!

In game screenshot. Office!

In game screenshot. Polite door won’t close until you look away. Just like Wheatley!

In game screenshot. Bedroom lighting.

In game screenshot. You have to find the password!

New version of the office, with fancy chairs.

Computer monitor.

General mesh outline. I don’t see me adding new areas in the time I have left in the challenge.

Adding computer monitors.

Second take on the appartment. New furniture!

Early take on some lighting.

Early build with bed.

Tomorrow’s work

  • Dialog system. No, really. I need this.
  • Possibly a cute little robot to sit in the chair. I don’t know. I’ve never successfully animated anything in Blender before.
Posted in Game Dev, Google Cardboard, Personal, Projects, VR | Tagged Eight Day Game Project 1, Game Dev, Google Cardboard, personal, Projects, Unity, VR
1 2 … 6 Next →
email me my linkedin twitter google plus github

Pages

  • About
  • Articles and FAQs
  • Furry Octo Pancake
  • Minecraft Map
  • QuotaMonitor
  • Virtual Reality
  • Your Privacy

Archives

  • May 2017
  • March 2017
  • January 2017
  • December 2016
  • July 2016
  • June 2016
  • February 2016
  • January 2016
  • November 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • March 2015
  • December 2014
  • October 2014
  • July 2014
  • May 2014
  • March 2014
  • January 2014
  • December 2013
  • November 2013
  • September 2013
  • August 2013
  • July 2013

Categories

  • AIBlocks
  • Computer Tech
  • Education
  • Game Dev
  • Google Cardboard
  • Linux
  • Minecraft
  • Networking
  • Personal
  • Projects
  • Security
  • Unvanquished
  • VR

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Copyright © 2018 Cody Jackson jacksontech.

Powered by WordPress and Plain WP.

Disclaimer: The information expressed here is for educational purposes only; most of it was gathered through experiments or trial-and-error. I hope it's useful in some way, but I don't promise it's suitable for any purpose. I can't guarantee that it is correct, either! Use the information presented here at your own risk. If something breaks, you'll have to glue the pieces back together as best you can...

Opinions expressed here are my own, nobody else's.