Vertex Color Tools
- clintonman
- Captain
- Posts: 5430
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Vertex Color Tools
Click the image to see the animation.
I've been working on some vertex color painting tools. Above is a test of using them in an animated material. The wire frame shows the true geometry and the deform is from the material vertex shader. No vertex colors are shown. Just the values are used to deform the mesh.
The result above is chunky because of the low fidelity mesh and also because the brush has a flat profile. So a brush profile input will need to be added so it can paint with smooth transitions.
- clintonman
- Captain
- Posts: 5430
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Vertex Color Tools
Here's a picture with the vertex colors showing. The plane was painted with progressively lighter colors from left to right. The lighter colors drive the animation to move more.
Also of note in the original post image is that the normals of the plane don't change. Even when deformed it displays as if it was a flat plane. There is no practical way to get the normals to deform with the mesh using the older directx material system. I think that ability came out with directx 10 or 11, geometry shaders.
Re: Vertex Color Tools
I have no idea how you are animating this or what is required.
With regards to Normal Maps, take a look at the Water shader in the Materials - DX9 library.
Example Scene
viewtopic.php?p=8598#p8598
With regards to Normal Maps, take a look at the Water shader in the Materials - DX9 library.
Example Scene
viewtopic.php?p=8598#p8598
- clintonman
- Captain
- Posts: 5430
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Vertex Color Tools
The normalmaps live on top of the geometry normals. The vertex shader is missing the geometry normal changes.trueBlue wrote: ↑27 Jan 2023, 17:43 I have no idea how you are animating this or what is required.
With regards to Normal Maps, take a look at the Water shader in the Materials - DX9 library.
Example Scene
viewtopic.php?p=8598#p8598
- clintonman
- Captain
- Posts: 5430
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Vertex Color Tools
While testing the add brush mode I got this crazy pattern. It should be a smooth color. I was racking my brain and I think I finally figured out why. The add mode will add to the existing color, but I think it is adding color and then adding to the added color. I need to store the original colors in a separate location and use that as the basis for adding, then update all colors at once.
Re: Vertex Color Tools
The plane I posted in the other thread was first painted red to all of the vertices, then I added 3 or 4 colors on top of that
- clintonman
- Captain
- Posts: 5430
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Vertex Color Tools
Splotchy paint and other design flaws are fixed and made the profile editor more intuitive.
- clintonman
- Captain
- Posts: 5430
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Vertex Color Tools
Animation test of vertex displacements driven by vertex colors. The original morph animation is on the left and the vertex color driven animation is on the right. The vertex colors are setup to drive the displacement and color. Normally it would just drive the vertex positions.
The bitmap to drive the animation is created with the Vertex Texture Animation tool. It reads the vertex positions of the morph animation and creates 2 textures from it. The green texture is the animated vertex positions and the purple is the animated geometry normals. The normals aren't used because of a trueSpace limitation. That is the reason the vertex color animation has a smooth surface. The textures and mesh can be exported from tS to be used in a game engine. The texture uses uv set #2 with special uv's it sets up in the mesh.
Far right is the script that drives the animation. Outside of trueSpace the animation would be driven purely by a vertex shader.
This is the vertex shader. The number values shown came from the Vertex Texture Animation tool, a scale and offsets for x, y, z. No X is shown because the offset was 0.
Not shown is the color shader that just uses the vertex colors.
Re: Vertex Color Tools
Nice! is this something that could be used instead of animated phyS cloth?