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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Mapping noise to a channel

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 440 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

      On 10/07/2017 at 12:19, xxxxxxxx wrote:

      Hi,
      I am trying to map noise to the Density channel of a Pyrocluster material. So far I think I am only applying the noise to the float value of the density channel, but not to the whole object. My guess is that I should try to get some values from the Particle Geometry which the material is assigned. Or I might be totally wrong. This is what I have so far:

      import c4d
      from c4d import gui
      #Welcome to the world of Python
        
        
      def main() :
        
          mat = doc.SearchMaterial("MainCentral_01")
          pnoise = c4d.utils.noise.SNoise(c4d.Vector(1,1,1))
          mat[c4d.PS_DENSITY] = pnoise
          
          c4d.EventAdd()
          
      if __name__=='__main__':
          main()
        
      
      

      Thanks!

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

        On 11/07/2017 at 02:39, xxxxxxxx wrote:

        Hi,

        I don't think it's possible to achieve what you have in mind. You can't plug a function into a parameter, like you might be able to do in nodal systems.

        While you of course can influence the Density parameter based on a noise (like you have done or as it would be possible with Xpresso) you can not change the parameter based on for example a position in space during rendering. In Cinema 4D this is only possible via shaders. So you'd actually need something like a shader slot inside the Pyrocluster material...

        Maybe the Noise tab of a Pyro Cluster material is your best option, but I'm sure you already went through all the options.

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

          On 11/07/2017 at 08:01, xxxxxxxx wrote:

          I see, then I will stick to the Noise tab. Thanks, Andreas!

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