Mapping noise to a channel



  • 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!



  • 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.



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

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


Log in to reply