lunedì 2 agosto 2010

Getting Logitech Quickcam Express USB webcam to work with Skype on Ubuntu Lucid Lynx 10.04

As said before, this old & cheap camera is terrible. I have just installed Ubuntu 10.04 LTS on my computer in my holidays house and the camera doesn't work anymore. If I run Cheese or Skype in the way described in my previous article, this error message is displayed:

libv4l2: error turning on stream: Input/output error

Anyway, the Input/output error is suspicious: I've just thought the error is due to some unknown USB malfunction or device error. So I have unloaded gspca_STV06xx driver and unplugged the camera. After that, I have connected the camera to another USB port and here we are, now it works fine with Cheese:


and Skype (Options window):


The camera is filming the terrible panorama outside my holidays house.

We need to start Skype in the same way we did on Ubuntu 9.10.

I'd like to understand why the old USB port doesn't work after the upgrade.

Best regards.

lunedì 19 luglio 2010

Maya style navigation in Lightwave

This is just a quick reminder for me but it may be useful for other explorers. If you want to switch between different 3D applications, the hotkeys and the GUI will be the biggest obstacles you'll find. We are supposed to know 3D basic concepts, so we could use different applications for different purposes. For example, Max is very powerful to work on architectural visualization, Lightwave has a terrific, fast rendering engine,a bunch of interesting plugins and so on.
In my humble opinion, Maya style navigation is the best because it's fast, logic, easy to remember. Lightwave shortcut navigation is horrible (ie, the shortcut for the track tool changes if you are using perspective or orthographic views), Max one is uncomfortable.
Anyway, Maya style navigation in Lightwave is possible and the solution comes from the Newtek discussion forums:


"Download this little app http://www.autohotkey.com, then make a txt file with this script (written by evenflcw) in it:"

#SingleInstance force
SetTitleMatchMode, 2

/*
Lightwave Viewport Navigation - AltPlusMinus!

Alt+LMB - Rotate View (Standard LW combo)
Alt+MMB - Zoom View
Alt+RMB - Pan View
WheelUp - Zoom In
WheelDown - Zoom Out
*/

#IfWinActive LightWave ahk_class WMgrBasic

!RButton:: ;When user presses Alt+MMB,
Send ^!{LButton Down} ;Send 'Ctrl+Alt+LMB pressed'
KeyWait RButton ;Wait until MMB is released
Send ^!{LButton Up} ;Then send 'Ctrl+Alt+LMB released'
return

!MButton::
Send +!{LButton Down}
KeyWait MButton
Send +!{LButton Up}
return

*WheelUp::
Send {.}
return

*WheelDown::
Send {,}
return

#IfWinActive


"and save it with an .ahk extension. Just leave it on your desktop or somewhere handy and double click it when needed." 
If you are on Windows 7, you'll probably need to compile the script (right click on it and Compile) and run it as administrator.
As soon as possible, I'd like to create a script to assign the Maya shortcut navigation to 3Ds max.

Best regards.

venerdì 9 luglio 2010

Fantastic video by Jon Lambe

Jon Lambe is a 3D animator. He made a "short and nerdy fan film" about Battlestar Galactica. And he used my Cylon Centurion in a short sequence: the automaton appears in the sky from a Cylon mothership.



Earth from jonlambe on Vimeo.


I really like this video, the visual effects (FTL jumps, camera shake...) and the final composite.

Compliments to Jon.

Best regards.

martedì 29 giugno 2010

Possible conflict between 3ds Max 2011 and JDownloader?

I'm working on an architectural visualization with 3ds Max 2011 x64 (DirectX 9, Windows 7) and JDownloader is downloading a couple of free hdri maps.
I'm experiencing an odd bug: if JDownloader is minimized to a button on the taskbar, right-click menus don't work in Max: they flicker and then disappear. If the taskbar button is hidden, so that it only shows as an icon in the notification area, menus work fine.

Best regards.

mercoledì 23 giugno 2010

Viper MK II is done

After the Cylon Centurion, the second homage to Battlestar Galactica is done. Viper Mark II is finally over: it is "the Colonial Fleet's primary space superiority fighter / attack craft during the initial Cylon War. 40 years later, they are used by Galactica to effectively combat the Cylons and their more advanced fighters  during the exodus from the Twelve Colonies".



The model is highly detailed and was totally redesigned: browsing the internet, specifically flickr, I found out these terrific photos of the original Starbuck's viper. aharvey2k's hi-res photos were a great start to understand and model all of the details and to extrapolate textures and the original font. I used Maya 2011 Hotfix 2 to model the Viper and Mental Ray to generate some test images:


As for the shaders, I used mi_car_paint_phen to simulate the unique characteristics of a mild car paint. I decreased the weight for the primary specular color and  modified the parameters for the flakes to match the aharvey2k's  photos. A mia_exposure_photographic was plugged into the MR lens shader slot of the camera. This shader is a tone mapper that converts actual pixel luminances (in candela per square meter) into image pixels as seen by a camera, applying camera-related parameters (such as f-stops and shutter times) for the exposure, as well as applying tone mapping that emulates film and camera effects. mib_blackbody light shaders were connected to the color parameters of the light shaders. I used a light probe image to illuminate the viper with measurements of real light. Below a couple of quick render tests.



I made an attempt to plug layered textures into dirt_color and dirt_weight to cover the underlaying paint and clearcoat layers in order to to get variations in the dirt across the surface. The dirt texture was painted over the UV map in Photoshop. The focal length is obviouslly wrong but this attempt helps me to notify some problem: probably I have to decrease the reflections and, in any case, the image should be modified into a compositing package.


Last, but not  least, homage will be the Cylon Raider.

Best regards.

sabato 19 giugno 2010

Fixing GRUB errors on Ubuntu Lucid Lynx 10.04

Sometimes getting GRUB to work properly on our computer can be a painful process. In my experience this difficulty often derives from the complexity of multiple hard drive system. For example, my brother has an old pc with 2 hd drives, (SATA and IDE). The SATA disk is the main bootable drive, the IDE one is used for storage purposes.
It should be easy to get GRUB to work properly on a pc with 2 drives on 2010. Well, it's not.
When setup finishes to install Ubuntu, we reboot the machine and we should be presented with this screen:


Unfortunately it doesn't happen. We could see a lot of different errors, no matter what, the result is that GRUB isn't capable of loading our preferred OS. Anyway there are good news: if the Ubuntu installation went fine, we don't need to install the OS again, we have to fix GRUB, specifically its configuration file.
First of all, a preamble: this guide cannot be exhaustive since there are such different configurations, systems and situations. We need to pay attention to play with hard disk drives. We have to back up all our data (for example a preexisting Windows partition.
So what's the point? The point is a generic way to mount our filesystem, fix GRUB and install it again. Probably we will need additional informations to get GRUB to work properly and fix the issue in the right way, but internet is great and Google is our friend.

So, without further ado, let's get started.
  1. We will use Ubuntu LiveCD to access our fresh install of Ubuntu. So, let's boot Ubuntu LiveCD as usual: we want to try Ubuntu without any change to our box, even though it's has been installed properly.
  2. At this moment we need to retrieve a couple of informations. We have to know the name of the partition where we installed Ubuntu (available as /) and the filesystem type. We can use GParted to retrieve these parameters:


    In the above example,  /dev/sda3 is our root device, the filesystem is ext3. Run the terminal from theUbuntu LiveCD and execute these commands:

     stefano@SERVER:~$ sudo mkdir /mnt/root
     stefano@SERVER:~$ sudo mount -t ext3 /dev/sda3 /mnt/root
     stefano@SERVER:~$ sudo mount -t proc none /mnt/root/proc
     stefano@SERVER:~$ sudo mount -o bind /dev /mnt/root/dev
     stefano@SERVER:~$ sudo chroot /mnt/root /bin/bash
     root@SERVER:~$ cd /boot/grub/
     root@SERVER:~$ nano grub.cfg

  3. nano is a simple terminal-based text editor. The Page Up and Page Down keys, the Arrow keys, and the Insert key and Delete key all work as in most other text editors.
    Now, before continuing this procedure, we have to understand that GRUB uses a different way to classify the hard disk drives: (hdX,Y). More specifically we  have (hdX=drive where Ubuntu has been installed,Y=partition where Ubuntu has been installed-1). sda = 0, sdb = 1 and so on.
    /dev/sda3 is written as (hd0,2) in grub because Y is always one digit less in (hdX,Y).
    We have to find all occurrences of (hdX,Y) and replace them with (hd0,2).
  4. After that, we can save grub.cfg and install again GRUB executing the command:

     root@SERVER:~$ grub-install /dev/sda
This guide is a work in progress so if you find something wrong, please let me know it.

Best regards

giovedì 17 giugno 2010

QWidget: Cannot create a QWidget // Maya exited with status 1

Yesterday I've seen this error, for the first time, using batch rendering with Mental Ray. The problem was a plug-in (Maxwell Render plug-in for Maya 2011) never used in my scene but oddly loaded opening the file. The plug-in could not be unloaded because of a reference to maxwellpreviewdata. If I "forced" Maya to unload the plug-in, I got an error that stated:

Plug- in cannot be unloaded because it defines a MPxData derived type that is still in use.

Uninstalling the plug-in is the easiest thing to do, it's a temporary solution that fixes the problem, allowing Mental Ray to work fine again.
As a matter of fact, if I reinstalled the plug-in, the problem came up again.
Next I tried to delete unknown and locked nodes, running the MEL commands:
  1. lockNode -lock off `ls -type unknown`;
  2. delete `ls -type unknown`;
to clean up the file but it didn't work, Maxwell Render Plug-in was loaded again opening the scene.
The last step I made was a "brute force attack" to the scene not to waste my time.
I saved the scene as Maya Ascii file, opened it with Wordpad, deleted the line:

requires "Maxwell Render 2.0.39"

and saved the ascii file.

It worked, the plug-in isn't loaded opening the file and Mental Ray can melt again my cpu. This solution is very rough and I'd like to find out a more elegant fix.
Anyway I hope to be helpful.

Best regards.

lunedì 14 giugno 2010

Installing Bonus Tools for Maya 2011 [win64] on Windows 7

In my humble opinion, Autodesk should change the way to automate the building of packages for Windows. I've never seen so many errors and requirements to install a very small piece of software like Bonus Tools for Maya.
"Bonus Tools is a free collection of useful Maya scripts and plug-ins. After installing Bonus Tools, users will have a pull-down menu for easy access to the tools that cover all aspects of everyday use: general UI, modeling, animation, texturing, rendering and cloth." 
Cool! Unfortunately installing this piece of software on a fresh install of Windows 7 x64 is very hard, at least for me.
Double click on the msi file and the first problem appears:

"The InstallScript  engine is missing from this machine. If available, please run ISScript.msi, or contact your support personnel for  further assistance."

What's Installscript? It's a system to create Windows setup files:according to InstallShield,, it should keep "customers happy". Actually I'm not happy and Installscript acts like a virus: you can install it, you can't remove it, you have to live with it. No way to uninstall it via Add/Remove Programs or using Windows Installer Clean up.
InstallShield explains here how to determine the version number of the ISScript engine we need, download it, and install it.
Unfortunately  I could not use the procedure explained to determine the version number I needed, so I tried it out myself.
Version 8 works for me.
It seems that installing multiple ISScript versions doesn't affect pc performances.
Ok, another problem:
"Registry Error: Module path is empty. Unable to set up Registry details to configure Bonus Tools." 

Unable to set up Registry: it seems a problem due to system privileges. I ran a dos command prompt as Admin. I navigated to the location of the msi file and typed:

msiexec /i MayaBonusTools2011_win64.msi

This procedure avoids the registry error. Finally Bonus tools have been installed.
Now I have to figure out how to install them on Vista x86. Other kind of problems on Vista.

lunedì 24 maggio 2010

CGPersia Toolbar 0.1b

New Beta version available here.
Nothing fancy in this version, I added a few search options (it's possible to search keywords in  blog and specific forums). Menus have been reorganized.
This version is supported by Firefox 3.6.*. Next release will be available for next versions of Firefox.
Best regards.

giovedì 6 maggio 2010

Cylon Centurion - Final render

It's time to complete my homage to Battlestar Galactica, one of my favorite TV shows. The first model to render is the fabulous Cylon Centurion, "a fully armored, metallic automaton that functions as the basic foot-soldier of the Cylon ground forces".
I used Autodesk Maya 2011 to model and render  my centurion. The Cylon soldier has got a lot of bevelled and rounded surfaces, so I decided to use Subdivision Surfaces when possible.
Finding good photos and references was the most difficult part of this process. I found out this site and it was a good starting point for the body. Unfortunately, the head and some details are barely visible, but I found out 
two more photos for the head.





Due to the low-quality photos, the head was quite complicated but the images I found in a second moment were good and the modeling part turned into a great amusement. I used a low poly sphere to start sculpting the head. On the left there's the original model, on the right my low poly cage.



I converted the low poly cage into a subdivision surface to smooth the head. After conversion, all edges were creased: the result is very good for me.
Only the head was modeled with polygons, all other parts were approximated  using subdiv surfaces.



Once the model was finished, I had to assign good materials to subdiv surfaces. I used a metal material created by Jeff Patton, a great CG artist, for all metallic parts. I downloaded a good, free angular map to lluminate my model with measurements of real light.



Test above is really good for me but I'd like to add my centurion to a photo representing a real scenario.



With Final Gather turned on, rendering took 1 hour on my computer but I like very much the result: the centurion is hunting rebels in a Caprica's wood.
The next model to render will be my new Viper MK II.