Home Coding, Scripting, Shaders

[3Ds Max] vertex colors by objcets position?

greentooth
Offline / Send Message
C86G greentooth

Hey guys, need your help.

How can I edit an object?s vertex colors based on its position?
I basicaly want a position gradient as vertex colors (without having to paint them by hand).

(3Ds Max and UE4)

Replies

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    I'd just pull the information out of the object in my ue4 Shader unless there was a good reason no to tbh 

    However, in max... 
    Probably the simplest conceptual way is to script the vertex paint modifer - it's probably pretty well documented so have a poke around and see how you go. 


  • C86G
    Options
    Offline / Send Message
    C86G greentooth
    Oh, since I need it for UE4 (foliage, you know) maybe you got some link for me or something on how do do that in UE?
  • Eric Chadwick
    Options
    Offline / Send Message
    I've done this in 3ds Max. Make a Composite map. Multiply together two radial gradients. Each on a different UV... one uv from the front, the other from the side. Plug composite into Diffuse of the material. Add a VertexPaint modifier, use it to bake the Diffuse into the vertex colors.

    You can also check out MCG. There's a sample that does vertex color by position.
  • gandhics
    Options
    Offline / Send Message
    gandhics polycounter lvl 7
    You can do easily with Data Channel modifier.
    Just feed object position to vertex color.
    Add Scale if you need to adjust range,
Sign In or Register to comment.