Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Channel shader coordinates

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 278 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

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

      On 31/08/2010 at 05:45, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :

      ---------
      Hi everyone,

      I'm writing a channel shader which will utilise a third-party pattern generator library. At the moment I can render the pattern but it's showing a big seam, whereas it should be a seamless procedural texture. The library author says I need the 3D coordinates for the point to be textured.

      Right now, in the Output function I'm getting the coordinates using the supplied ChannelData pointer - i.e. cd->p.x, etc. and passing these to the library. This is getting the UVW coordinates, but clearly it's not what I need. What am I doing wrong?

      Please can anyone give me any pointers to where I should be looking? I've looked at the SDK examples and searched here extensively but although there's a lot of threads on shaders, none of them quite answers this question.

      Any help would be very much appreciated.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

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

        On 31/08/2010 at 09:26, xxxxxxxx wrote:

        cd->vd->p is what you need. it´s the surface point in world coordinates.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

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

          On 01/09/2010 at 00:48, xxxxxxxx wrote:

          Many thanks, that's very useful. I'll give it a try!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post