Thursday, 18 February 2010

HP Colour Laserjet 5550 service error 49.4C06

Got a service error 49.4C06 error yesterday in N212. Wasn't able to clear it by switching it off and back on. I deleted the top job in the queue just incase this was blocking it (it was an ai file). Went to the printer and the error was still there (deleted the job from my room). I opened the printer and cleaned out the thing at the top (with the little cleaner thingy) and closed it up. Still error. Switched it off and back on. Error cleared.

I had a look on the internet and found this to occurance:

and this error code explanation page:

It appears that the error is linked to the computer program sending the print job. Possibly illustrator in this case. It might be worth noting that on these computers it is set up with the HP Colour Laserjet 5500 driver and sends the job to the server with HP Colour Laserjet 5500 driver installed. Also, I've only noticed the error since we have installed PaperCut NG on the system. So there are a few variables which need testing.

Maybe the first thing to do would be to update the firmware on the printer though.

3D Character Modelling for Games

Well, after some google searches I found some interesting ones, each using different techniques:

Tutorial using cylinders and a little extrusion:

Modelling a winged devil thing

A comprehensive tutorial modelling by extrusion of a line

I think I prefer the ones which start from scratch but I shall have to give them a go.

Monday, 15 February 2010

OS X auto-mounting shares

Well, as part of my xgrid project, I wanted the machines to mount a networked share before login so that the xgrid app could save the files somewhere. Well, there was no need for this in the end, but it is worth mentioning what I found.

First was to come up with the command line:

mount -t afp  "afp:/at/;" /mnt/test

so this command mounts an afp volume with a guest login (make sure guest access in enabled under the afp service). It share is on the xserve under "Shared" and it mounts it in the folder "/mnt/test" (but this folder must exist)

So, to mount it before login I found AFP automounter StartupItem which I downloaded it from:
AFP automounter StartupItem

So, you need to place this folder in the /Library/StartupItems/, and it needs a file in /etc/ called AFPVolumes. In this text file you need to put the afp mount with username with a tab after it and the place you want to mount it i.e. "afp:/at/;" (with a tab) /mnt/Shared

Now this particular one connects with guest but it has spaces hence the speech marks. This only works if you enable "cleartext" in the file both in /Library/Preferences and ~/Library/Preferences.

You can use the command:

sudo defaults write /Library/Preferences/ afp_cleartext_allow 1

to get this to work, but it might work by default but I'm not sure.

Xgrid and Blender part 3

Well, hopefully the final installment of the Xgrid and Blender saga. So, now I started using gridstuffer, a very useful app. By setting up a text file, and giving it some lines of code you want to submit to the xgrid, it'll render the files to where you specify in the blender file. Unfortunately Blender can only really render to the tmp folder because for some reason it has trouble with permissions in ALL other folders (doh!).

So I finally tried a couple of other commands in blenders command line (which I put in the text file) to see if I could get that to tell blender where to render to. Success! It actually renders to the "Output" folder which you specify in gridstuffer (or generally in Xgrid!).

So the final command looks like this:

/Applications/Blender/ -b KitchenTopFreeTree2.blend -o //kitchen -F TGA -x 1 -f 1
/Applications/Blender/ -b KitchenTopFreeTree2.blend -o //kitchen -F TGA -x 1 -f 2
/Applications/Blender/ -b KitchenTopFreeTree2.blend -o //kitchen -F TGA -x 1 -f 3

the -o specifies the folder and file to save. The -F is the file type, -x specifies whether to add numbers to the end. The -f specifies the frame number!

So the blender file is in the input directory, and the // defines it is in the root of the output directory.

Looking at how the whole thing works, I think the machine you submit it all from is the machine which distributes and collects all the files needed. The server just works out which machines to send it to. I don't think that the files have to be on a share? I shall test this theory out.

So the only pre-requsits are that the machines are on the xgrid network, and they have blender installed in the right directory with the right name (case-sensitive)


Wednesday, 10 February 2010

X-Grid and Blender part 2

So, after looking at the said articles I found that they are actually slightly out of date (2004!) and OS X 10.5 no longer supports the GUI for submitting jobs in that particular way. And plus, to my dismay, I cannot find it to download ANYWHERE! I tried many many things alas and I've ended up spending about 3 days slowly getting there, and I have got somewhere. I think I'll go through all the troubleshooting I went through, so I can say what I have and have not tried.

So to start with I had my xgrid all setup (previous post), running xgrid admin from my machine. For a test setup I thought I'd try and just get one machine to render an animation, and then get two and so on. So I started with my machine (although I should have started with a third machine). So I made a blender file "box.blend" and tried some command line rendering. Finally I got this command to render the animation:

/Applications/Blender/ -b /Volumes/Shared/xgridprojects/in/box.blend -a

note: I saved it on a network share on the xserve mounted in /Volumes/Shared so that other machines in the future could access this file.

note 2: this is case sensitive so watch out for Blender or blender in the applications folder. I think I renamed it 'Blender' and it prefers to be 'blender' (this held me up for 15 mins!)

the -b renders in the background (put before the file) and the -a renders the animation you have setup in the blend file (default to /tmp/). The /tmp/ directory turned out maybe to be the best directory to render to as blender, when run by this xgrid user (no-one) can't seem to write to any other folders.

The -a attribute renders as many frames as are in the animation. At first this seemed the best but when using with xgrid, the alternative option is -f [frame number] which renders a specific frame. Also, -a can be used with -s [start frame] and -e [end frame] but I think these need to be plaeed carefully either before or after the '-a' attribute.

So, now I knew the commands which xgrid needed to send to each machine I could begin. A big 'downer' was the fact I didn't have the GUI in the tutorial so it was command line stuff. The first thing was to know how to send a job:

xgrid -job submit [-gid grid-identifier] [-si stdin] [-in indir]
           [-dids jobid [, jobid]*] [-email email-address]
           [-art art-path -artid art-identifier] [-artequal art-value]
           [-artmin art-value] [-artmax art-value] cmd [arg1 [...]]


xgrid -job submit -gid /Applications/Blender/ -b /Volumes/Shared/xgridprojects/in/box.blend -a

I think this might have worked, but I saw that actually you can have input directories and output directories! So this is where the network mount might have come in:

xgrid -job submit -gid -in /Volumes/Shared/xgridprojects/in/ -out /Volumes/Shared/xgridprojects/out/ /Applications/Blender/ -b box.blend -a

notice how I didn't have to specify where my box.blend file was, as it automatically looked in the "in" folder. Now this folder was mounted on the computer I was rendering on through xgrid, but I now think that xgrid manages these files all by itself, so I don't think that it has to be mounted (I shall try tomorrow). I think the main point is that it is on the machine which submitted the job!

Now that this worked I tried it on two machines! Alas, it only used one machine to render the entire animation! This was because I didn't specify the variable or 'range' (which was in the tutorial) which changes. The only solution I found was to specify lots of jobs, each rendering a specific part of the animaton. Luckily I found an application for submitting 'Batch' jobs  which is called 'GridStuffer'. You can give it a text file with the cmd for the specific jobs, a different line for each job you want, and it will send it to the xgrid as lots of different jobs. Not only that but if a job fails, it'll keep sending it until it is complete (fully optional though).

So with this handy tool I made a text file like this:

/Applications/Blender/ -b /Volumes/Shared/xgridprojects/in/box.blend -f 1
/Applications/Blender/ -b /Volumes/Shared/xgridprojects/in/box.blend -f 2
/Applications/Blender/ -b /Volumes/Shared/xgridprojects/in/box.blend -f 3
/Applications/Blender/ -b /Volumes/Shared/xgridprojects/in/box.blend -f 4

and it will send them all to the xgrid under different jobs, and keep sending them until they are done. That way the xgrid application will send each job to a different machine and utilise all the processers it needs, YAY!

I think you don't even need the blend file on the server, I think it sends it from that machine (but this theory needs testing). I think what you do need is the blender application on each machine although I seem to remember it saying you didn't!! But anyway, not the hardest thing to do.

One of the main stumbling points at the moment is trying to get all the rendered files from all of the machines '/tmp/' folders. A script could be written and sent out over ARD, but I would prefer it if I could get xgrid to move them, or blender to save to a networked space, which would mean mounting on each machine before jobs are sent out. Preferably all the machines would automount a volume on bootup which could be useful for a lot of other things. Apparenly this might be done by NFS shares but needs looking into.

Well, till another day. Hope this helps sometime again and it wasn't all in vain.

Monday, 8 February 2010

X-Grid setup

So, I've managed to get all the Apple Macs in Art and Design Directorate at Chesterfield College! I should hopefully reach 400GHz when all the machines are finally switched on. Here's the general gist of how I did it:

  1. Set up Xserve with XGrid. I did have a problem switching on XGrid but that was fixed on my previous post. Go to "Server Admin" and set it as the Controller. I didn't make it an agent as I didn't want to slow it down (it's only a G4). It's as simple as that
  2. Check XGrid is working by going to your machine and loading "Xgrid Admin". Now connect to your Xserver and all should be there (no agents though)
  3. Set the clients up. This can be done in two ways, Workgroup Manager or Apple Remote Desktop.
    1. I used a combination. I set up my machine by going to the Sharing Pane in System Preferences and clicking "XGrid" and specifying the servers address (DNS). Not using authentication at the moment.
    2. Now go to Workgroup Manager and manage computer groups and preferences, go to Details and add: "/Library/Preferences/" and I always make the changes "Always". This should put these preferences on all the machines in this group.
    3. Start the service on each client machine. I did this through ARD's command line. I've also put how to change preferences on the client machines if Workgroup Manager doesn't work (run as Root):
      1. sudo xgridctl a stop
      1. sudo defaults write /Library/Preferences/ ControllerName
      2. sudo defaults write /Library/Preferences/ ControllerAuthentication None
      3. sudo defaults write /Library/Preferences/ BindToFirstAvailable 0
      4. sudo defaults write /Library/Preferences/ ResolveNameAsNetService 0
      5. sudo defaults read /Library/Preferences/
      6. sudo xgridctl a start
      7. sudo xgridctl a status
Now everything should be working and through XGrid Admin you should see all the clients connecting. Next thing to do is to submit some jobs!

Saturday, 6 February 2010

Xgrid Startup troubles

Well, after a very long time of X-Grid being untested, I decided to open it up and see if I could utilise it for Blender (see other post), but alas, on startup of Xgrid on the server it crashes! Doh!

So, after a little looking through the logs I knew I wouldn't find anything so I googled it and after a few pages the answer was found:

So, basically do this in terminal on the server (or ssh)

sudo xgridctl c stop sudo xgridctl c off sudo rm /var/xgrid/controller/datastore.db sudo rm /var/xgrid/controller/status sudo xgridctl c start sudo xgridctl c on

He's added more, but this fixed it. I'll put the rest on though just incase it helps:

optionally, you could do:
sudo rm /var/xgrid/controller/blobs/*

(this can take a while if your database is old and has grown a lot of crap; another option is thus to rename the blobs to blobs-old and create a new one with the same permissions; then while the controller restarts happily, delete blobs-old).

Carefully check the permissions and ownership before messing up with / var/xgrid/controller.
The owner of most of the files is xgridcontroller (the name can be clipped of in a simple ls -al).

Just need to work out how to send a job to it (which is surely quite important!)

Thursday, 4 February 2010

Blender Render Farm with X-Grid

Well, with my new project only begun I thought I'd optimistically look into a render farm using X-Grid on our Mac OS X 10.4 server (a little outdated though).

So, after not much time I found this article:

and it looks almost complete. Watch this space, although you might have to wait until I have a large enough project to render!

Also, here are the Blender command line arguments:

I'd just like to note that if all goes well, I could easily adapt this for Maya!!

Wednesday, 3 February 2010

My Experience of Camera Tracking with Voodoo and Blender

So, after my research in the previous blog, I decided to give it a go. My first few attempts failed but after some perseverance I succeeded and I shall soon upload the results to Youtube (link here please)(a tree put on the Kitchen work-top surface).

So, the workflow and particular points to mention.

First you need the video, this is important because you will be basing everything on this. It is pivotal. Make sure you either use a tripod, or circle around a point in space. This might just be the limitations of the Voodoo software, but it is complicated! And don't move too fast, nice and slow is best. Motion blur might be an issue in post production as well.

Once filmed make it into an image sequence, quicktime pro does this with ease and speed (yay for apple!)

Now put it into Voodoo (you'll need windows! Doh!), don't forget to put whether it is Free (not tripid) or Rotated (tripod). Another important thing to do is to go into the camera parameters and chance the Focal length to that of the cameras (35mm for the Coolpix S550). The just click track.

Save the result (which takes a while) as a python script.

Now, open Blender. Make a window text, and open the python (.py) file. Now go to File>Run Python Script.