I'm probably going to be called names for asking this but...
I was checking out
this video on planning and making modular environments and the author is showing a modular city he made (at 32') mentioning vertex coloring.
I don't understand how this can work for a modular set; if you're painting vertex in your 3d package on piece X then all instances of piece X will have the same vertex color information inside of Unity, correct? Then how did he achieve the subtle variation he's tlking about in his video, I'm confused.
Thanks!
Replies
Unless there is some shader instancing vertex stream magic trick that ONLY changes the vertex color data per model, only paying the cost of the extra vertex color data and not the complete info (position, normal, uv, etc).
in some other occasions, I export painted meshes from my 3d package, and use a simple script that clone the meshes, and alter their vertex colors .
More noob questions:
@Botanika, that sounds like what I'm trying to do (the simple script approach).
Could you detail your workflow a little bit?
At what point do you use that scripts? What happens to the clones - are they considered as new meshes, are they still considered as instances of the first one by Unity?
The vertex info alteration is random? etc.
In my tests . all the painted clones that are using the same material can be batched into 1 drawcall, witch is great for adding variations to your level for cheap (almost free).
my workflow is pretty straightforward :
>I model my modular meshes in 3ds max, assign different vertex colors to each of the elements of the mesh. and export them to unity as an fbx.
>Bring my pieces into the editor, recolor them with a script, and build the level.
> do another pass with synoptic vertex painting tool, and paint some dirt and scratches to add more variation.
If you want, you can try my script and see if it fits in your workflow, just make sure to create a folder with the name "Editor" in your project directory, and place this file inside of it.
https://drive.google.com/file/d/0B3n1sS2Im_HhVTRBbmNoVU83NDQ/edit?usp=sharing
Vertex Colors in 3ds Max.
the same mesh in unity with a vertex color unlit shader applied.
you can access the script from : Window > Mesh Painter.
it automatically process all the mesh's vertices, and find the colors originally painted on the mesh.
you can then change the color of any of the elements of the teapot. and save the mesh as a new.
Ps : You can recolor multiple meshes at once, by selecting them all, and ticking the "link Meshes" checkbox, this is especially useful for painting meshes with multiple Lods.
Here is a modular level study I did a while back in Unity.
https://8dd9ebc876e38ff771991a3034cc44b1b97f45cc.googledrive.com/host/0B3n1sS2Im_HhZW83ak9TWHFMWFU/full%20resolution.html
this small scene uses a total of 3 materials(glass, decals, and one for everything else), all the variations are done with the technique demonstrated above.
sorry for my bad English.
I'll let you know how it goes. I really like your level, in any case!