Posted by: Sanne | January 13, 2009

Carrying on…

I also write at another site.

Posted by: Sanne | December 2, 2008

Python script: Sky Cube Wizard v0.2

This is a python command line script to rearrange the parts of the top half of a Blender environment map to make a square cube map, typically used in 3D scenes for skies and environments. This version 0.2 also supports sky cube maps from CGTextures as input files, which have a different layout as Blender env maps.

Download: skycubewizard v0.2
The script needs Python and the Python Imaging Library to run.

Blender Artists Thread: http://blenderartists.org/forum/showthread.php?t=142335

Details:

A Blender environment map has a layout like this for the top half of the scene:

test-env-390

The script rearranges it into this image:

test-env-390-cube

This is an image layout that is easily mapped to a half cube. Make a cube in Blender, cut it in half so that only the top half remains, mark the four vertical sides a seams, and unwrap it (Tab into edit mode -> AKEY to select all vertiecs -> UKEY -> Unwrap). The result should look like this:

uv-mapping-500

This UV layout can then be directly used for the cube maps from the wizard.

Since Blender tends to show seams at the vertical sides of the skycube when mapped to the edges of the image, the script automatically extends those sides by four pixels to prevent that. A different extend margin can be set by the -e command line option. The option -h shows a short help and further options.

Example usage:
python skycubewizard.py my-blender-envmap.png

Posted by: Sanne | September 9, 2008

Blender script: Make Particle Objects Real v0.2

I made the script work also for 3D Text and Surface objects, prevented crash with Empty objects.

Limitations:
1. Right now only the first particle system gets operated on. Might be due to a bug in the Python API which I’ll be investigating and reporting if needed.
[EDIT] Might be my mistake. I found that for baked particle systems it works fine, so it seems that’s the solution.

2. Surface objects get duplicated as Curve objects, I found no way around that. Any modifiers on the original object therefore can’t be copied to the new duplicated objects, because their type doesn’t match.

object-make-partobs-real.py version 0.2

BlenderArtists thread

Posted by: Sanne | September 8, 2008

Blender script: Make Particle Objects Real v0.1

Recently I tried to make particle objects real in the new Blender particle system but couldn’t. It doesn’t seem to be supported yet, so until it is, I made a little Python script to do just that.

It converts duplicated particle objects of particle systems which visualization type is set to “Object”, to real objects. Those converted objects are either linked duplicates of the original object, or they get their own data, as user choice. I also wanted to support the visualization type “Group”, but access to the grouped particle objects doesn’t seem to be supported yet by Blender Python.

The script looks for particle systems on the active object only. After the operation the converted objects are selected and also part of a group for easy access.

Here’s the script. Put it in your Blender scripts or custom scripts folder and access it from the scripts window under “Object” or from the Object/Scripts menu entry in the 3D view menu header, menu entry “Make Particle Objects Real”.

object-make-partobs-real.py version 0.1

BlenderArtists thread

Posted by: Sanne | November 21, 2007

Blender Yaf(a)Ray Exporter with Sunsky Update

Here’s a small update to the Blender python exporter GUI (correction of tooltip for “From (update sun)” button):

Yaf(a)Ray GUI Python plugin for Blender:
yafaray_ui-193-sunsky-0.1.1.py.tar.gz

Older Posts »

Categories

Follow

Get every new post delivered to your Inbox.