Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    how to use AllocRayLight?

    SDK Help
    0
    3
    246
    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
      Helper
      last edited by

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

      On 11/05/2005 at 12:38, xxxxxxxx wrote:

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

      ---------
      Hi,

      How do I use AllocRayLight?
      Here a little code sample from the Output function of my shader.

        
      BaseObject* op = cd->vd->op->link;  
      if(!op) return Vector(1.0, 0.0, 0.0);  
        
      RayLight *light = AllocRayLight(op);  
      if(!light) return Vector(0.0, 1.0, 0.0);  
      

      What Object must I pass to AllocRaylight? Where is the right point to run this function, the manual is a bit vague about it. I like to add some own lights in my shader and to calculate the illumination thru my own IlliminationModel.

      thanks in advance,

      Matthias

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

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

        On 13/05/2005 at 02:21, xxxxxxxx wrote:

        I believe the object you give to AllocRayLight() is used to fill in values. So it needs to be a light object.

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

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

          On 13/05/2005 at 02:46, xxxxxxxx wrote:

          thanks Mikael, I solved the problem by writing my own
          lighting system.

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