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

    Sampling a texture from UVW Coords?

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 197 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 18/03/2009 at 15:48, xxxxxxxx wrote:

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

      ---------
      Hi,

      in my plugin object, I want to evaluate the color channel of the first material attached. It's not about rendering, my object should do certain things according to the texture color.

      I saw lots of threads about Bitmaps and even more threads about UV coordinates here, but I still have no clue. I don't even know where to start my research.

      Let's say, I have a position on a plane. Any position, maybe it's a vertex point of the mesh, maybe it's a random position on a polygon (determined by barycentric coordinates). How can I find out the color of the applied material at this position?

      Textures (and maybe 2D shaders) will be sufficient, no need to evaluate fancy volume shaders like SLA. Also, I just need UVW Mapping, other mapping are not required (well, if they're easy, I will implement them, too 😉 ).

      Thanks in advance for help!! I really have no idea where to start.

      Greetings,
      Jack

      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 18/03/2009 at 20:24, xxxxxxxx wrote:

        you could probably do it with

        > GetPixel( x, y ) \> \> [vector] GetPixel([int] x, [int] y); \> \> Returns the color in the bitmap at the position given by x and y. If not 0<=x<width and 0<=y<height, the function returns NIL. \>

        this is just what i found from the doc's so it might not be what you need. (not a coffee expert)

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