For rendering mesh vertex colors you need a render engine that supports this, but none of the standard ones do. What i do is to create a bitmap image through a scripting component and UV map it to the baked surface. This is the process:
- Divide the surface in a grid of points (each point corresponds to a pixel).
- Find out the color that would correspond to each point.
- Use the following code to create a bitmap image:
Dim num As Integer = y
Dim bm As New Bitmap(num, num)
For i As Integer = 0 To num - 1
For j As Integer = 0 To num - 1
bm.SetPixel(i, j, x(i * num + (num - 1 - j)))
Next
Next
' Save the result as a JPEG file.
bm.Save("C:\Users\v\Documents\amid\cubierta\transp.jpg")
End Sub
Where 'y' is the vertical and horizontal resolution (this assumes the image is square) and 'x' is the list of colors. y is a single item, x is a list of items.
It was a great workshop - thank you! By the way - that's me , who gave you that printscreened error massage with some russian text -sorry for that :)
I have one question - maybe you can help me. How to convert color of the mesh into texture (so each vertex will have a color value) - to use it later in maya or 3ds-max? cause when i'm exporting colored mesh (after Geco) as obj or 3ds - it can't convert the color.
Luis Fraguada
You'll have to decompose the mesh and take a look at the verticies...then reconstruct...
Feb 15, 2010
Vicente Soler
- Divide the surface in a grid of points (each point corresponds to a pixel).
- Find out the color that would correspond to each point.
- Use the following code to create a bitmap image:
Dim num As Integer = y
Dim bm As New Bitmap(num, num)
For i As Integer = 0 To num - 1
For j As Integer = 0 To num - 1
bm.SetPixel(i, j, x(i * num + (num - 1 - j)))
Next
Next
' Save the result as a JPEG file.
bm.Save("C:\Users\v\Documents\amid\cubierta\transp.jpg")
End Sub
Where 'y' is the vertical and horizontal resolution (this assumes the image is square) and 'x' is the list of colors. y is a single item, x is a list of items.
Jul 26, 2010
Andrey Adamovich
Hello!
It was a great workshop - thank you! By the way - that's me , who gave you that printscreened error massage with some russian text -sorry for that :)
I have one question - maybe you can help me. How to convert color of the mesh into texture (so each vertex will have a color value) - to use it later in maya or 3ds-max? cause when i'm exporting colored mesh (after Geco) as obj or 3ds - it can't convert the color.
thank you in advance
Andrey
Mar 6, 2011