[Bf-committers] renderpipeline - coordinates

Brecht Van Lommel brecht at blender.org
Tue Jul 20 11:30:45 CEST 2010


Hi,

All vertex/halo/strand coordinates are already in camera space, except
when obi->flag & R_TRANSFORMED is set, in which case they need to be
multiplied with obi->mat (for instancing). Shading is done in camera
space, and lamps have camera space coordinates too.

Brecht.

On Tue, Jul 20, 2010 at 1:27 AM, Aurel W. <aurel.w at gmail.com> wrote:
> Hi,
>
> since no one could help me with this in the irc channel, i try to ask
> on the ml.
>
> In the renderer I am not quit sure, which coordinates are used for
> actual stuff like shading. Just as an example lamp_get_visibility
> takes a coordinate, to check, if from this point a lightsource is
> visible. Those aren't global coordinates in world space, so I assume
> that those are in camera space?
>
> My issue, what I try to do is to map local coordinates from an object
> to these coordinates (more precisely in vol_precache_part) to call
> functions like point_inside_obi() and vol_get_scattering(), but this
> is more a general question, and hasn't much to do with the volume
> rendering. So i assumed, that I have to transform this coordinates by
> the object matrix and the viewingmatrix, so I multiply by
> obi->ob->obmat and R.viewmat. But this seems to be wrong.
>
> So how do I transform from local space to this coordinates and also vise versa?
>
> thx, aurel
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list