diff options
author | Matt Ebb <matt@mke3.net> | 2008-09-29 08:19:24 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2008-09-29 08:19:24 +0400 |
commit | bab94c46e07563c65e7a1b0392d70814ddf0de28 (patch) | |
tree | 8d541a890698ec4bbd707763e6e424d063a24d6a /source/blender/makesdna/DNA_texture_types.h | |
parent | 345dc8eb9464efdf6cccac8dddc2cd24e1fe3dbb (diff) |
Point Density texture
The Point Density texture now has some additional options for how
the point locations are cached. Previously it was all relative to
worldspace, but there are now some other options that make things
a lot more convenient for mapping the texture to Local (or Orco).
Thanks to theeth for helping with the space conversions!
The new Object space options allow this sort of thing to be possible
- a particle system, instanced on a transformed renderable object:
http://mke3.net/blender/devel/rendering/volumetrics/pd_objectspace.mov
It's also a lot easier to use multiple instances, just duplicate
the renderable objects and move them around.
The new particle cache options are:
* Emit Object space
This caches the particles relative to the emitter object's
coordinate space (i.e. relative to the emitter's object center).
This makes it possible to map the Texture to Local or Orco
easily, so you can easily move, rotate or scale the rendering
object that has the Point Density texture. It's relative to the
emitter's location, rotation and scale, so if the object you're
rendering the texture on is aligned differently to the emitter,
the results will be rotated etc.
* Emit Object Location
This offsets the particles to the emitter object's location in 3D
space. It's similar to Emit Object Space, however the emitter
object's rotation and scale are ignored. This is probably the
easiest to use, since you don't need to worry about the rotation
and scale of the emitter object (just the rendered object), so
it's the default.
* Global Space
This is the same as previously, the particles are cached in global space, so to use this effectively you'll need to map the texture to Global, and have the rendered object in the right global location.
Diffstat (limited to 'source/blender/makesdna/DNA_texture_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_texture_types.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index ed172c24474..aef8bd95ee4 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -133,12 +133,14 @@ typedef struct PointDensity { short nearest; float radius; - short type; + short source; short pdpad[3]; struct Object *object; /* for 'Particle system' type - source object */ short psysindex; /* and object's psys number */ - short pdpad2[3]; + short psys_cache_space; /* cache particles in worldspace, object space, ... ? */ + + short pdpad2[2]; void *point_tree; /* the kd-tree containing points */ } PointDensity; @@ -406,14 +408,15 @@ typedef struct TexMapping { /* **************** PointDensity ********************* */ -/* type */ +/* source */ #define TEX_PD_PSYS 0 #define TEX_PD_OBJECT 1 #define TEX_PD_FILE 2 -/* psys_space */ -#define TEX_PD_PSYS_WORLDSPACE 0 +/* psys_cache_space */ +#define TEX_PD_PSYS_OBJECTLOC 0 #define TEX_PD_PSYS_OBJECTSPACE 1 +#define TEX_PD_PSYS_WORLDSPACE 2 #endif |