Home Technical Talk

3ds Max. Linear gradient on spline from start to end

polycounter lvl 6
Offline / Send Message
AlexandrL polycounter lvl 6
Hi guys :)

Is there a way to make vertex color linear gradient on splines (renderable) fast and easy? I need exactly 0 on spline start, and 255 on spline end. 
Maybe there's some techniques or script for that?

Replies

  • spacefrog
    Offline / Send Message
    spacefrog polycounter lvl 15
    Depending on the Max version, there should be a MCG operator available as simple modifier ( UV as HSL gradient ). This is from Max 2017 and up i think. Be sure to enable "generate mapping coordinates" in the spline primitive and enable VTX color display in the viewport. If you want to render the spline, simply apply a material using "Vertex Color" map in the diffuse  slot

    PS: not sure ... maybe you should apply a UV xform modifier below the MCG and rotate the UVs about 90°, as i can't get the MCG modifier  alone to use the V coordinate for the gradient, despite it'S UI saying that it uses the V coordinate ( seems to use U though )

  • coven
    Offline / Send Message
    coven polycounter lvl 6
    Splines generate UV coordinates. If you want to have a gradient go along the length, apply a gradient ramp and set the W coordinate to 90. Also if you have 2018+ I believe, the new path deform can place UV's on the deformed geometry.

    Hope this helps!
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    You can copy uvs into a vertex colour channel using the channel info tool.   This will give you gradients in both u and v directions with a couple of clicks
  • AlexandrL
    Offline / Send Message
    AlexandrL polycounter lvl 6
    Thanks for answers guys! 

    spacefrog said:
    Depending on the Max version, there should be a MCG operator available as simple modifier

    Sadly that im on 2016 and there's no UV as HSL gradient on MCG.

    coven said:
    Splines generate UV coordinates. If you want to have a gradient go along the length, apply a gradient ramp and set the W coordinate to 90. Also if you have 2018+ I believe, the new path deform can place UV's on the deformed geometry.

    Hope this helps!
    Gradient ramps are out of businss, cause they create unapropriate results (white stripes on spline ends which are noticeable).

    poopipe said:
    You can copy uvs into a vertex colour channel using the channel info tool.   This will give you gradients in both u and v directions with a couple of clicks
    Can you please tell more about that? I know "Channel info tool" from Utilities, but where some info about models, model sizes in kb


  • cptSwing
    Offline / Send Message
    cptSwing polycounter lvl 11
    ^ You can copy Channel 1 (usually UV?) to Channel 0 (usually Vertex Color?) using the channel info tool. Basically just rightclick and copy, and rightclick and paste. The spline will have a modifier added which does the actual copypasting.
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    Exactly that^^
Sign In or Register to comment.