Thursday, May 4, 2017

Ubuntu 17.04 SAMBA woes

Having upgraded, done fresh installs, of Ubuntu 17.04 I noticed that the SAMBA/cifs client didn't behave as expected. When mounting a volume shared from OS X (Sierra) it would work for a while before the client started DDOS'ing the server to such an extent that no other users could log in.

We then tried to connect to a windows share (windows server edition), but with a basic fstab entry it would throw an error:
mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Apparently the cifs protocol defaults to using v1.0 of the protocol. By adding "vers=2.1" or "vers=3.0" to the mount options it will mount correctly.

Sunday, October 4, 2015

Weekend Project: Stamp

One of my favourite go-to materials is Sugru and I've been wanting to try out making a stamp from it for a while now. But first I needed a handle. I wipped up a quick one in Fusion 360.

Printing didn't take long, even at .1mm layer height. Infill was 30%. On the next print I will increase the top layers to 7, instead of 5, since the printer wasn't able to create a completely smooth top surface. It would probably work just fine it the infill was higher - like 50%.

Since I'm printing on a glass surface the bottom was pretty smooth. I made good use of a knife to make more grooves to be sure that the Sugru had plenty to adher to.

Printed the "Thumbs up" on a secondary printer. The depth of the relief could probably be half as deep in retrospect. In this one it was 2mm deep. That would make it easier to keep fine details when separating the mold from the stamp.

Note to self: don't mirror the print. Since we are making a positiva - the stamp will be automatically inverted for you.

Before adding the Sugru I swabbed the pattern lightly with canola oil so it wouldn't stick. A Q-tip was perfect for this. I think it came out pretty well considering the finished quality of the printed surface.

Make sure the Sugru get plenty of time to cure. I left it a couple of days since we didn't have the ink-pad yet.

Not perfect, but enough to show that the principle works. The ink doesn't adhere extremely well to the stamp, but that might hopefully change over time as the surface get roughened up. Maybe using some fine sandpaper would help as well.

The stamp handle and "thumbs-up" model can be downloaded here:

Sunday, September 20, 2015

Fun with Unreal Engine and VR

I've been meaning to try out Unreal Engine ever since it became "free". Recently found some time to do just that. Since I haven't coded any C++ for at least 15 years I was curious to see what was needed to get a basic project up and running - which turns out - no code at all. Blueprint (a node based graph network) and tweaking options was more than enough.

Since I haven't upgraded my VR rig yet, and still use my old Oculus DK1 I was pleasantly surprised that it worked out of the box with the latest Oculus 0.7 driver and Unreal Engine 4.9 under Windows 7.

This spring and summer Otoy did a competition called Render The Metaverse and I wanted to view some of the resulting images in VR - since that was the premise of the whole competition. If you own a Gear VR you are in luck, but unfortunately, as far as I have been able to find out, there's no viewer for these stereoscopic cube map images available for the Rift. This was an excellent opportunity to check out how hard it is to develop something in Unreal Engine.

Singe eye cube mapped
As it turns out, it's not hard at all. The most difficult part was to have the cube map for the left and right eye - go to the correct eye. The default behavior is to have a texture mapped to a object and then have the engine create a stereo pair out of that which will get the proper depth when viewed in a VR headset. This, of course, will give you a cube with flat surfaces - although with depth for the cube itself. Since the cube maps provided have depth included we need to take special care to only display the relevant texture to each eye.

The solution here was to create a shader that detects which eye that is being rendered and provide the correct texture. After some searching I found the magic node to be the "ScreenPosition" node. We only need the horizontal component so make sure you add a "BreakOutFloatToComponents" node before feeding the output to the "If" node.

Shader graph network
I also love the "VR Preview" mode in Unreal Engine which lets you test out stuff in the VR goggles easily from within the gui.

Ouput to VR-goggles
Although this solution works really well with the default setup in UE - it remains to bee seen if I can get an even better and more correct result. As it is now, we use the same cube for both textures and this cube is scaled arbitrarily without any thought to real world scale. This might cause issues since the cube itself will be rendered with a depth and then the texture will on it will, in some ways, inherit that depth. That again might work against the depth baked into the stereo cube maps and the result might be a feeling of wrong scale. Therefore we might have to work with the IPD (eye separation) a bit. At this point I'm only guessing, but we might have to set the IPD to 0, but I'm not sure yet.

Further testing needed.

Friday, July 31, 2015

FABtotum Filament Spool

Back from vacation and found some time to play around with 3D printing again. Made a filament spool that actually fit inside the FABtotum. The STL file can be found on Thingiverse.

Stringing is still an issue
The spool consists of two halves so you need to print the part twice.

Test fit.
This version of the spool fits nicely within the filament bay, but I'll probably modify the next version to make it a bit thinner. This way there's less chance of friction.

Parts "glued" together with the 3Doodler
 You need to glue the two halves together. I used a 3Doodler for the purpose, but a regular glue gun should do nicely.

1lb (about half a kg) of black filament winded.
I'm not sure how much filament the spool can hold but after adding about half a kg I would guess it could hold at least three times that amount.

Winding is also something that will have to be addressed in the next version. Maybe some attachment to fit it to a drill.

Monday, June 15, 2015

FABtotum in da house

Finally, after waiting almost nine months, my new 3D printer has arrived!

The FABtotum is a hybrid machine which does both 4-axis milling and 3D scanning in addition to extruding hot plastic.

Back in August last year, when I ordered this machine, I was originally researching new architectures to implement on a new printer build. Then I discovered the FABtotum blog and one page in particular where they discussed different cartesian configurations and their pros and cons. The design decisions seemed really thought through and seeing they had recently finished a successful Indigogo campaign I read up on the rest of the design which also looked solid. It was time to try out a turn-key solution!

Currently I'm going through the calibration process so time will show if it delivers on it's promise.

Saturday, June 6, 2015

Explosive plates for VFX

Disclaimer: this is a big "do not try this at home"-post as it involves flammable gasses and explosions, so don't! Wait, who am I kidding - you're totally going to try this at home aren't you... just don't say I didn't warn you when you stand there missing an eyebrow!

Light it up! Watch your fingers!
So, we recently did a project at work where we needed some fiery effects to spice up a car shot. To be precise we wanted the car, a CG rendered Lamborghini Aventador, to have exhaust flames - and really cool ones at that.

The usual route would be to create these digitally using a variety of tools, for example Trapcode Particular. As we had just a week and a half to produce the whole spot we had to be creative to make sure we finished on time. That meant going old school and shooting a practical effect in camera - allowing us to bag that particular effect in 20 minutes and focus on the rest of the 3D and compositing instead.

What you need
1 x small plastic bottle. We used a 33cl bottle from Ramlösa. You can go bigger, but this was plenty to get the effect we were looking for.
1 x refill canister of Butane gas (ie lighter fluid). You probably can use a regular lighter as well, but you'll need more time to fill the bottle.
1 x lighter, preferably the "long nose" or "expanded reach" kind. If you have long matches that'll work as well. The important part is to keep your fingers safe.
1 x roll of gaffer tape to anchor the bottle to something sturdy so it doesn't shoot off when ignited.
1 x needle, nail or piece of steel wire. I used a paper clip.
1 x pliers to hold the poking device (see previous)
1 x camera on tripod
1 x dark room
Enough safety glasses for everyone present

There's not much too it really. Holding the nail in the pliers heat it using the lighter. Then, quickly, poke a hole in the bottom part of the bottle. You might have to reheat the nail a couple of times to be able to expand the hole so it becomes big enough.

Just about perfect

First of all make sure you are in a well ventilated room where there's nothing flammable.

You'll need something sturdy and heavy enough to fasten the bottle to. This way it won't fly away when you ignite the gas. Gaffer tape is nice to use for the fastening. If you get the matte black kind it can also be used to make sure the bottle doesn't reflect any of the light - making the compositing easier later on.

Set up your camera and frame your shot. Now we add the gas.

Add a tiny amount of liquid gas (less than a second)
Insert the butane gas nozzle into the hole you made earlier and give it a quick push. You don't need much since it will be liquid when pushing the container down onto the bottle. To much butane will not create a bigger explosion since the air/gas mix will be wrong resulting in no explosion at all. Put the butane canister somewhere safe away from everything.

Now turn on the camera, turn off the light in the room and set the flame from the lighter to the small where you added the gas. If you got the mix correct you will hear a satisfying pop and see a bluish flame. If not you might try to add some oxygen. A bicycle pump should work. Use the small hole for this as well. Keep going until all the gas has been burned away.

Before trying again you have to add fresh oxygen by using the pump for a little while more. Add more gas, light, retry.

Ooh, pretty!
Only steps left is to choose best part of shot and add to comp. I'm not going to go into that part here since it's fairly trivial.

And the final TVC

Saturday, March 28, 2015

The Slow Regard of Silent Things

What a great read! As every great story it leaves you a bit sad at the end - not because the story itself, but because the book has ended and you want to stay in that universe with those characters a little while longer.

I love the Kingkiller Chronicle's as well, but this book is something else entirely. Mr. Rothfuss wrote in his introduction to the book, and repeated again in the after word, that this book "doesn't do a lot of the things a classic story is supposed to do". That may be, but I don't think it could have been told any other way either. How you tell the story is as much a part of what makes a great story as the story itself.

This book lands near the top of my favourite book-pile in good company with great storytellers like Neil Gaiman. Five stars easily!