SOHO: Simple Examples

Example Files:

SOHO: Installing Examples

In $HFS/toolkit/samples, you should find a SOHO sub-directory. This contains

The .py Python files need to be installed in the HOUDINI_PATH, in the soho subdirectory. The OTL file can be loaded on the command line (or from the File menu after Houdini has started). For example, on Linux:

    % cd $HOME/houdini$VERSION
    % mkdir soho
    % cp $HFS/toolkit/samples/SOHO/*.py soho
    % cd $HFS/toolkit/samples/SOHO
    % houdini hello.otl

After starting Houdini with the OTL, there should be a new output driver "Hello SOHO".

To create your own output driver, choose "New Operator Type" from the File menu in Houdini.

SOHO: Hello World

This example is about as basic as you can get.
# Simple "hello world" Python script
#  On Linux, this will print to the terminal where Houdini was started.
#  If started graphically, it's unclear where the output goes

print 'Hello world'

If you create a Hello SOHO operator in Houdini, make sure the soho_program parameter is set to Hello1.py, you should be able to hit the render button on the output driver and see "Hello world" printed out.

If you get an error on the output driver saying that there was "no SOHO program" found this means that the output driver was unable to find the Hello1.py program.

SOHO: Hello World (Using HOM)

Hello2.py is a very minor extension to Hello1.py. Instead of using the Python print statement, we use HOM to call hou.ui.displayMessage()

SOHO: Object Traversal

Hello3.py shows how to build a SOHO scene and traverse the objects in the scene. The scene traversal will

SOHO: OpenGL Example

There is a more complete factory example shipped with the Houdini. In $HFS/houdini/soho/, you should find OGL.py. This example uses the pygame and OpenGL Python modules to open a window and render lit object geometry.

This example performs object parameter evaluation and also shows how to access geometry. You can find more information on these functions in HDK_SOHO or by examining HDK_SOHO_API.


Generated on Thu Jan 31 00:29:26 2013 for HDK by  doxygen 1.5.9