Texture Mapping

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 02/02/2004 at 01:13, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   8.207 
Platform:   Windows  ;   
Language(s) :     C++  ;

---------
At the moment I try to program my own kind of material derived from materialdata ( yes I thought about cinema materials, and I definitely need to do my own ones ). As a very first step I try to do a simple texture mapping...at least I hope that this will be simple 😉 I do my first steps to do so within CalcSurface. Take the volumedata->p point and calculate a specific color for it...nice so far. But at that point some questions occure.

  1. The texture tags provide several settings for texture mapping. These settings take influence on the matrix I get with GetMl, right? So this one should give me the mapping information....but I need that information in the CalcSurface method to include that information in my mapping calculation....how do I get the tag data there?
  2. If I attach my material to a plane for example, I get a nice result when rendering the scene. But in the preview my plane is just black. When I use the cinema material with a texture, then the texture is even visible in preview.....how do I get that with my own material?

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 03/02/2004 at 01:54, xxxxxxxx wrote:

  1. I'm pretty sure that this is available. I believe it is in the TexData class, but I don't have the reference handy so I'm not 100%.
  2. Afaik it isn't possible to get those kinds of previews with MaterialData. You might consider implementing your shader as a ShaderData instead, sort of like the SLA projector shader (or whatever clever name it has).