06
Jan
12

Wacom Intous 4 (small) vs. Bamboo

A couple of months ago I purchased a Wacom Bamboo Tablet because my older one was falling appart. I chose the cheapest model, without touch and other fancy stuff. I was pretty satisfied with this, but I was missing the express keys and the eraser on the back of the pen. Therefore I decided to level up to a Intous 4 small tablet to satisfy my needs. Is the difference all that? Well, apart from the obvious, I’d say that if you’re considering buying one of these, if you absolutely need the express keys and the pen eraser you’ll have to invest in the Intous, but if all you’re doing is some basic photoshopping or navigating in your 3d application you can save considerable dollars on choosing the Bamboo. It is very nice and simple, and you don’t have to be so careful with it. You can get 3 and a half Bamboo Tablets for the price of one Intous, and for simple work you won’t notice any difference.

That said, the actual pen in the Bamboo set is kinda cheap versus the rubber coated grip pen that comes with the Intous. Both tablets are worth investigating, and I just wanted to say that if you can’t afford the luxury of the Intous, the Bamboo works fine for me in both Maya, ZBrush and Photoshop and as a general navigation device for the computer.

When it comes to software, the Bamboo only has a single user preset for buttons and mappings, while in the Intous you can specify different settings for different applications you use, that might be important for some users.

I’ll give both tablets a good score, though Bamboo is a better bang for the buck. If you need an advanced tablet: go Intous, if not go Bamboo!

Easy as that.

07
Nov
11

Final Gather with Mental Ray (Maya)

My last post described the GI indirect lighting method that uses photons to create the secondary lighting.
Another way to achieve indirect lighting is with Final Gather, that in contrast to GI looks at the information in the regular direct light and based on that it sends out Final Gather Points. These points land where the regular light rays land and from there it sends out their own rays that collects information about their surroundings and adjusts accordingly to how the point is to be lit. In the end, all the points average their values to get an even distribution of light in the scene.
When you use FG in your renders, you can actually use geometry as lights in your scene with a bright surface shader, so that the FG points sends this out when hitting the geometry.
Final Gather gives very nice looking lights which are soft and delicate, but it isn’t really a “true” indirect light. It is kind of fake compared to real indirect light, and therefore it isn’t the most authentic looking light out there. But it is easy to set up and works very well in many situations. Besides it is faster to render than Global Illumination.

With Final Gather the default settings in Maya usually works ok as a starting point. If your render gets noisy you can increase the accuracy in the render settings. If you set this too high, your render times can drastically increase.
Point Density controls how many points getting sent out.
The default usually works well.

One common problem with FG is that you can get noisy areas in the tight shadows in your scene.
You can remedy this by increasing the accuracy and adjusting the Point Interpolation upwards. This makes the points blend better, but at the expense of loss in detail. You can get the details back with the use of Ambient Occlusion, that I’ll explain later.

The Scale sliders (primary diffuse and secondary diffuse) is used to tone down the intensity of the FG light effect. A darker shade gives less brightness. The secondary diffuse implies using the Secondary Diffuse Bounces.
The Secondary bounces works so that the points that land on a surface, spawns another ray that bounces from the original target and creating a new sample point on the next surface.
This increases calculation but gives more even distribution and more authentic lighting.

Keep on lighting!

07
Nov
11

Global Illumination in Mental Ray Part 1 (Maya 2012)

Direct light is the light we see in our scene without Global Illumination turned on. GI will trace the light and make it bounce between surfaces to give a more real-life light behavior.
The thing that makes GI work is the use of light photons that is emitted from the light source and travel through the scene, illuminating the surfaces by Gathering information about color and luminance on the surfaces they come in contact with. This information is picked up and then the photons bounce to the next surface repeating the work.

Choosing the light type to use is important, as it will affect the way photons work within it. Generally you can think that the photon emission will follow the light emission for each light type.

There are two types of photons in Mental Ray, the first being Global Illumination and the second is Caustics.

The photon intensity setting of the light refers to the light-energy used for the photons when they leave the light source. The default value in Maya is set to 8000, which is pretty intense and often leads to blown out renders when used with small scenes.
The Exponent setting determines how fast the photons will lose their energy as they travel through space.
High values give shorter life so they lose energy faster.

Keep in mind that all these settings are calculated on values that exists in the sizes of objects and the size of your scene in the Units setting in Maya.
So if you build a scene that is many units in size this would need totally different settings in Mental Ray than if your scene is only a few units in size.

When using GI in your lights it is easy to forget that you also need to consider the direct light property, so that the direct light intensity is adjusted up or down depending on
the light you are trying to mimic. These are independent settings and can drastically alter your overall lighting!

There are many settings to control in the Indirect Lighting tab of Mental Ray. I will continue to post tips and tricks on lighting and rendering with Mental Ray in the time to come.

04
Nov
11

Setting up Mental Ray Satellite with Windows slave and Mac OS X host

I don’t know why, but every time I have to set up Mental Ray between different platforms I always stumble some before everything works perfect. Today I configured my quad core Windows computer to do the chewing when rendering from my MacBook Pro laptop.

This is a super-simple setup, but somehow it wasn’t all click and go today either. First of all, I had the slave machine configured earlier, so when I tried to telnet into the port I googled about it would not connect from my Mac host.
So, I checked with the \Windows\System32\Drivers\etc\services file on the Windows machine and got the correct port number 7412 for satellite connections, then I created the maya.rayhosts file in the preferences folder on my mac containing one simple machine.

(File: /Users/chris/Library/Preferences/Autodesk/maya/2012-x64/prefs/maya.rayhosts):
192.168.1.152:7412

After disabling the local network firewall on Windows, it sort of worked, but I got this annoying error message from Mental Ray after the render:

MSG  0.0  info : adding new host 1 (192.168.1.152:7412)
MSG  0.0  error  011330: mi-ray/tcp: not a service (check /etc/services)
MSG  0.0  warn   012219: using fallback inet service 7003

Then I tried to add the correct port for satellite (a different port than the one used with MR Stand alone btw) to the /etc/services.
This did not help either.

But, when I also added the “fallback service”, inet 7003/tcp to /etc/services it managed to actually shut up!

# /etc/services
# Mental ray satellite
mi-ray7412/tcp
inet		7003/tcp

So, if anybody out there experience the same “error” message, you know what to do…
BTW, the error doesn’t stop the render from running, but I believe maybe a nanosecond or two will be wasted if the ports don’t match up and the system has to mage a different route… Who knows?

25
Oct
11

How to stop Maya from asking for network connection (OS X)

For some reason, Maya isn’t allowed to receive network connections without manually letting it by choosing “Allow” or “Deny” in the firewall pop up message. Even if it is listed as “Allow” in the firewall preferences, it asks again every time.

I’m not sure whats causing this behavior, but it sure is annoying. Finally I found a solution for it!

It has to do with “code signing” and something the developer has forgotten to do after changing the application, I don’t know.

I’m not as paranoid to think that someone has altered the code without my knowledge, so I trust the code from Autodesk and sign it myself to stop receiving this message. I’ll route you to the blog where I found the solution here:

Silvanote blog post

I’ve heard people have similar problems with other applications as well, like iTunes.

I take no responsibilities for this solution, it’s totally up to you!

24
Oct
11

Python scripting in Maya week 2

What I forgot to tell you in the last post is how to actually execute the code
in the script editor.
To keep the code you’ve written, select the text first, then press ctrl+enter.
This executes the code, but does not clear the editor.
Just a little tip. Let’s get on with Python in Maya!

in a command such as scale, we can see from the MEL that it has a parameter in
the beginning called -r then a three value numeric parameter to follow.
This has nothing to do with the -r, because the -r (-relative) in MEL is just
a boolean value meaning “True” in Python. The parameter signals a relative
scale, not an absolute scale.
Therefor we must write it as so in python:

scale(4,5,4,r=True)

The reason for putting r=True last in the list is because it is a keyword
argument, and in Python you must put it last if the other arguments are not
also keyword arguments.
Because the relative attribute is set to True, this command can be repeated
to add the same size to the object. Try it out.

Let’s make a script that creates a nicely beveled cube that we can use as
dice or something. I always bevel the edges slightly anyway, so why not have
a script in the shelf that does it for me.

In the script editor, type in the following:

polyCube(w=4,h=4,d=4)
polyBevel(offset=0.10,fillNgons=True,segments=3,smoothingAngle=30)

The first line creates a cube with 4 units in xyz, and the second line bevels
the cube with some adjustments so that it gets smooth and nice.

To place this as a tool in one of your shelves, just select the code from the
script editor and middle mouse drag it into the shelf.

You can now create small scripts to create elements you use often in your scenes,
such as lighting setups, planes, cameras, you name it. That’s a nice start.

Try to create and do different things in Maya with the script editor open, then
try to “translate” the MEL output into working Python code.

Until net time…

19
Oct
11

First post about Python scripting in Maya

This is the first post in a planned series of posts about Python scripting in
Autodesk Maya. Don’t expect this to turn you into a pro or something, this is
something I do to learn the material better myself.
I don’t know about your experience with Python, but this is not meant to be
a tutorial in the python language. I’ve used Python for some time now, and
I hope you are familiar with the language to get something out of the content.
You can probably do basic stuff without knowing the ins and outs of Python,
but to do something creative you must have some knowledge about the
different datatypes and constructs that defines Python.
One thing that also is important is that you understand the basics of how MEL
works, as most of the same applies to Python for Maya.
Well, let’s get started!

Getting access to Python in Maya

You can use Python either as a single command launcher from the command line,
or as a full scripting environment in the script editor, I’ll mention both in
sequence.
To start using Python in Maya you have to click the command line where it says
“MEL”. This will change into “Python”, and for one-shot commands this is all
you need.

To access Python through the script editor, click the script editor button
also on the command line, next to the output field.
There you’ll see to tabs, MEL and Python. Off course you should choose Python,
but you already knew that!
In the script editor I also choose “Command” -> “Command Completion” and
“Command” -> “Object Path Completion”.
This makes experimenting with Python a lot easier, as you can try out
different functions without knowing the names.

One thing you should be able to do is to transform MEL commands into Python,
so that you can download existing scripts, modify them to your needs and run
them in Python. Most of the scripts out there are still MEL, but py scripts
start to show up here and there.
I’ve always wanted to learn MEL, but it didn’t really make sense to me, so I
find the Python logic easier to grasp. Besides I use it for other tasks, so
I don’t have to learn a whole new language and tools.

Let’s make a polygon cube!
Let’s see, if I watch my script editor output while creating a cube I see that
the MEL needed for this is:

polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;

Well, it’s actually not that complicated but this is all the default arguments
used by MEL in the output. The same cube will appear by just typing:

polyCube

Try that in the command line by changing back to MEL and press enter. Whee!
But hey! This is not Python… True. Lets try to switch back to Python
and run:

polyCube()

as all function calls ends with parentheses.
This does not work, because we have to import the namespace that the Maya
commands live in. We can do that by:

from maya.cmds import *

This makes a bunch of frequently used commands accessible to Python.
Now we can try again with:

polyCube()

or, for a change, let’s say that we wanted to change the defaults. Look back
to the MEL command used to create the polyCube. -w 1 -h 1 -d 1 etc.
All these define width, height, depth, sizeX, sizeY, sizeZ and so on.
To access these preferences in python, we have to write it as arguments
with a value in the construction call:

polyCube(w=2,h=3,d=4)

This creates a different cube with changed parameters.

Well, this wasn’t much but I’ll post more soon!
Try creating different shapes with different attributes to get a feel for how
it works.

Have a nice one!

15
Oct
11

Scripting Maya with Python

This is the introduction to a series of small tutorials I’m going to make while learning to use Python in Maya.

I always learn stuff better if I try to teach what I learn to others while doing it. Maybe someone out there will find use for my experiences!
To start with I want to explain why I want to learn to use Python with Maya.
For some years now, I’ve used both Python and Maya occasionally, just as a hobby.
I am by no means an advanced user of Maya, but I find the software incredibly fascinating.
You can do so much cool stuff with its modules, like the nCloth module, the dynamics and fluids modules, hair and fur, Maya Muscle,
I could go on and on. Incredibly complex software. It’s also very demanding and difficult to learn properly.

People spend years of working with it without learning everything. You just can’t expect to master all aspects of the software, but
that’s not my goal either.
I like to model objects, set up the shaders and render settings and watch the results. Animation is also something that Maya does maybe best in the industry, so a bit of that is also something I like to spend time doing.
When it comes to Python, I learned some of it while working as a network administrator, using it for system scripting mostly.
I’ve never felt the need for extending Maya with anything, because I have plenty to learn before ever needing to customize anything myself.

So basically this project with learning how to use Python to script Maya is purely for entertainment.
But, who knows? Maybe I find it so interesting that I can start writing plugins. Or maybe I come across a situation where I miss a certain modeling tool or want to change how the defaults are working, then it would be nice to
roll my own little script instead of relying on others work on places like creativecrash.com.

Anyway, if you’re new to the world of scripting Maya with Python, the upcoming posts to this blog might get you in the right direction of learning it!

So, until next time, sharpen your senses.

09
Sep
11

Easy way to get Apache and MOD_WSGI working on OS X

I’ve fooled around with some Python Web-frameworks lately, and maybe someone would care to know that you don’t have to install MAMP or XXAMP or whatever they are called, because as you probably already know, OS X does have Apache 2 Server already installed, just waiting to be configured to your needs.
Off course, it is very easy and convenient in many cases to just push a button and have it all working, but I always like to have total control over the environment when I do stuff like this, so…
I don’t know if these packages support mod_wsgi anyway, so I’ll explain how to get things going the hard way! Similarly you could enable PHP, but that is a nother story.

This is about getting Python web hosting locally, so you can set up frameworks like Django, py2web and the likes.

I’m using OS X 10.7 (Lion), but I think this will work just as fine with older versions, but then you’ll get the module linked to an older release of Python by default.

Here is some information on mod_wsgi:

The aim of mod_wsgi is to implement a simple to use Apache module which can host any Python application which supports the Python WSGI interface. The module would be suitable for use in hosting high performance production web sites, as well as your average self managed personal sites running on web hosting services.
The mod_wsgi module is written in C code directly against the internal Apache and Python application programming interfaces. As such, for hosting WSGI applications in conjunction with Apache it has a lower memory overhead and performs better than existing WSGI adapters for mod_python or alternative FASTCGI/SCGI/CGI or proxy based solutions.

As mod_wsgi supports the WSGI interface specification, any Python web framework or application which is compatible with the WSGI interface specification should be able to be hosted on top of mod_wsgi.

Major Python web frameworks and toolkits which are known to work include CherryPy, Django, Pylons, TurboGears, Pyramid, web.py, Werkzeug, Web2Py and Zope. Major Python web applications which are known to work include MoinMoin, PyBlosxom and Trac.

How to set it up using the internal Apache web server on OS X:

Download the latest version of mod_wsgi from:
http://code.google.com/p/modwsgi/wiki/DownloadTheSoftware?tm=2

Unpack the sources, and do the usual:

./configure
make
sudo make install

(if you have an older version of OS X, and would like to link to a newer Python version you have installed, use the

–with-python=/path/to/your_python with ./configure command)

Then, you have to edit the Apache configuration to load the newly installed module:

sudo vi /private/etc/apache2/httpd.conf

After the list of default modules to load type in:

#Load mod_wsgi module:
LoadModule wsgi_module libexec/apache2/mod_wsgi.so
WSGIScriptAlias / /Library/WebServer/Documents/

Now you should be ready to serve Python content on the local Apache server that comes with OS X.

To try out your new configuration, create the following .py file, and save it to your document root folder /Library/WebServer/Documents/testpy.py:

def application(environ, start_response):
status = ’200 OK’
output = ‘Hello World!’

response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)

return [output]

Start the web server via System Preferences -> Sharing -> Web Sharing
or via the
sudo /usr/sbin/apachectl start
Terminal command

Visit http://localhost/testpy.py
You should be greeted with the notorious “Hello World!” message, indicating that you now serve Python locally via Apache and mod_wsgi!

16
Jul
11

Useful search commands in GNU/Linux

Finding commands and stuff in Linux:

which <command>
Lists the first occurrence of the <command>

whereis <command>
Lists all occurrences of <command>

locate <command>
Lists all that contains the word

apropos <command>
Search man page descriptions for <*command*>

whatis <command>
Search man pages description for <command>

(sudo) find / -name <command>
Searches entire filesystem for <command>

Debian / Ubuntu based distros specific:

apt-cache search <command>
Lists packages containing <command> from package repositories

dpkg-query -S <command>
Searches the list of installed packages for <command>

dpkg -L <command>
Lists all files installed by <package>

FYI only ;-)




Baltazaar

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 25 other followers

Blog Stats

  • 77,235 hits

Top Rated

 

January 2012
M T W T F S S
« Nov    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Twittery

Technorati

Add to Technorati Favorites

Follow

Get every new post delivered to your Inbox.

Join 25 other followers