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

    Gradient - InitRenderStruct

    PYTHON Development
    0
    21
    14.7k
    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 25/02/2012 at 09:47, xxxxxxxx wrote:

      Hi Lennart,
      I think I have the solution: just create a Black/White ColorOverLife Gradient and than apply a Colorizer channel (luminance Imput)  to modify the gradient.
      It was so simple :nerd: Let me know if that works for you.

      Cheers
      Luther

      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 25/02/2012 at 17:04, xxxxxxxx wrote:

        Yup, seems to work pretty well.

        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 26/02/2012 at 09:29, xxxxxxxx wrote:

          Would it be possible for one of you guys to post a file of this?

          md.SetArray(c4d.MODATA_COLOR, Color, True) is producing this error: "InvalidObject Length".
          And I can't figure out what I'm doing wrong.

          Thanks,
          -ScottA

          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 26/02/2012 at 10:16, xxxxxxxx wrote:

            I was wondering about this, too. The code Luther posted can't be correct. I guess it should be something like Color _= ColorOverLife.CalcGradientPixel(ageTime/lifeTime).

            Cheers,
            Niklas

            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 26/02/2012 at 12:03, xxxxxxxx wrote:

              Just add the index in the for loop result (I think its just a typo by Luther)
              and it's all dandy.

                
              Color[i] = c4d.Vector(ColorOverLife.CalcGradientPixel(ageTime/lifeTime))   
              
              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 26/02/2012 at 13:01, xxxxxxxx wrote:

                My guess was right then, ha. Btw, enclosing the call to c4d.Gradient.CalcGradientPixel with c4d.Vector() is not necessary. Cheers, Niklas

                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 26/02/2012 at 13:05, xxxxxxxx wrote:

                  Thanks.
                  Got it working now. But having trouble with the luminance part.

                  I assume what you're doing is adding a material to the cloner. Then adding a colorizer to the luminance channel in that material. Then changing the colors for the knots in the colorizer to Black & white to gradually make the particle objects invisible?

                  If that's what you're doing. I'm having a very tough time with that. Because the luminance seems to not fall off from the first knot's color. No matter how I set up the colorizer's knots.

                  -ScottA

                  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 26/02/2012 at 15:31, xxxxxxxx wrote:

                    You make a userdata color gradient, black to white.
                    Thats the base for the code. Then adding a material with Mograph Color shader
                    for alpha and luminance channel on the cloner.
                    In the luminance channel you add the colorizer on the mo color shader.

                    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 26/02/2012 at 16:23, xxxxxxxx wrote:

                      Oh. You're using a Mograph color shader.
                      Now I've got it all working

                      Thanks for the explanation.

                      -ScottA

                      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 27/02/2012 at 01:21, xxxxxxxx wrote:

                        Hi Guys,
                        heres my sample project:
                        ColorOverLife001-1.c4d

                        I hope it's useful to someone.

                        Cheers

                        Luther

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