On 07/01/2016 at 03:51, xxxxxxxx wrote:
Cinema 4D Version: R17
Platform: Mac ;
Language(s) : C++ ;
What is the recommended way to get the matrices from a TexData object?
The documentation says this about m (and presumably im) :
This actual value may differ from those specified in the dialog, these are a precalculated raytracer representation.
This seems to be the case... 100% of the time. No matter what I do, whenever I try and access the active texdata in a shader (via cd->vd->tex->m or cd->vd->tex->im), it doesn't line up at all with what the texture tag says in the attribute manager.
How can I get the matrix for the information configured in the texture tag? How does the (SLA?) noise shader do it when configured for Texture mode?
On 08/01/2016 at 01:17, xxxxxxxx wrote:
the SLA noise shader actually dose use TexData::im for its texture space operation.
On 08/01/2016 at 06:32, xxxxxxxx wrote:
Is it just using TexData::im, or is it using something else?
Over here, when I try and access the TexData attached to the cd->vd->tex pointer, m and im are always the same (no offset, no rotation, length of 100 on v1/v2/v3). No matter what I do in the attributes manager for the relevant tag, those values do not change.
It seems like it's easy enough to just go through cd->vd->tex->link instead, but this doesn't seem proper when m and im exist for that purpose (plus I need to invert the matrix returned by ((TextureTag * )cd->vd->tex->link)->GetMl(), whereas cd->vd->tex->im is already inverted).