Navigation

    • Register
    • Login
    • Search
    • Categories
    1. Home
    2. Kantronin
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Kantronin

    @Kantronin

    2
    Reputation
    15
    Posts
    38
    Profile views
    0
    Followers
    3
    Following
    Joined Last Online

    Kantronin Follow

    Posts made by Kantronin

    • RE: How to create a layer Reflection (Legacy) ?

      I found the solution to my problem, on the internet, with code samples:
      https://www.c4dcafe.com/ipb/forums/topic/101805-materials-and-shaders-with-python/

      posted in Cinema 4D Development
      Kantronin
    • How to create a layer Reflection (Legacy) ?

      Hi

      I created a material.
      I inserted a texture into the COLOR channel.
      Then, I inserted another texture into the BUMP channel.

      Now, I want to insert a texture for the specularity, but I don't know how to create a Layer Reflection (Legacy)
      I only activated the REFLECTANCE channel with the following code:

      mat [c4d.MATERIAL_USE_REFLECTION] = True

      Then I want to apply the following values for this layer:

      0.5 for REFLECTION_LAYER_MAIN_VALUE_ROUGHNESS
      1.0 for REFLECTION_LAYER_MAIN_VALUE_REFLECTION
      0.2 for REFLECTION_LAYER_MAIN_VALUE_SPECULAR
      1.0 for REFLECTION_LAYER_MAIN_VALUE_BUMP

      I suppose that these values must be prefixed by the variable 'mat' which represents the material and also by the id of the layer.

      posted in Cinema 4D Development
      Kantronin
    • RE: Transparency channel - Color update

      I found the solution (I already had this problem but I couldn't remember the right code)

      mat [c4d.MATERIAL_TRANSPARENCY_COLOR] = c4d.Vector (1.0, 1.0, 1.0) #color white
      mat.Update (True, True)

      posted in Cinema 4D Development
      Kantronin
    • Transparency channel - Color update

      Hi,
      In the 'Transparency' channel of a material, I need to modify the color.
      How to read and modify this value with Python ?
      I already have the material identifier.

      posted in Cinema 4D Development
      Kantronin
    • RE: How to apply a material to a selection of an object

      I found the solution to my problem in the Script Log window which shows the manual commands in python

      posted in Cinema 4D Development
      Kantronin
    • How to apply a material to a selection of an object

      Hi,

      I know how to apply a material to an object, but I would like to know how to apply a material to one of the object's selections only.

      posted in Cinema 4D Development
      Kantronin
    • Welding point for a polygon

      Hi
      C4D has a command which allows to weld points of a mesh.
      I would like to make a script in python which would allow me to weld very close points.
      How can I call this command with python ?

      posted in Cinema 4D Development
      Kantronin
    • Adding points to a spline

      Hi,
      I would like to add points to a spline, spreading them evenly, without changing the shape of this spline.
      I can do a python script, but is there a simple way to make this change ?

      posted in Cinema 4D Development
      Kantronin
    • Using AddEditNumberArrows

      Hi,

      I am using a datafield of type AddEditNumberArrows, and I want to have increase or decresase of 0.1

      I defined it like this:

      self.AddEditNumberArrows(datafield_displacement,c4d.BFH_LEFT,70,10) 
      

      And I initialized it in the following way:

      self.SetFloat(datafield_displacement,0.1,min=0.0)
      

      Currently, the values of increments or decrementations are egal to 1.

      How to have 0.1 ?

      posted in Cinema 4D Development
      Kantronin
    • RE: Transform coordinates of a polygon's points

      Indeed, it is necessary to use two matrices
      For an object named polygonName, we will have:

      Matrix = polygonName.GetMg ()
      inverseMatrix = ~ Matrix
      

      Matrix converts local coordinates to global coordinates.
      After finishing working in global coordinates, we return to local coordinates with inverseMatrix
      We can thus modify the polygon with the new local coordinates.

      These two matrices allow to work with the points, which is very convenient.

      This subject is very well explained here:
      Link

      posted in Cinema 4D Development
      Kantronin