Niosop Posted December 17, 2009 Share Posted December 17, 2009 At some point in the future it would be nice if the editor would allow you to vertex paint meshes on a per instance basis. This would let us add almost infinite variety to meshes without having to generate a separate texture for each instance (moss on rocks, cracks on pillars, etc, etc). Ideally we'd be able to select up to 5 materials for a mesh, and use the RGBA channels to determine blending between them kind of like the terrain system currently does. I suppose the .sbx file would have to store vertex color information along with the position/scale/rotation info it already does or reference a separate file for each mesh that had vertex painting applied. A separate file by sbx assigned ID number might be best because then it could be binary and take up much less room. It could be just like the terrain editor paint feature, just allowing you to pick materials instead of just textures. But even just using something exactly like the terrain shader would be fine (diffuse/normal/specular). Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
TylerH Posted December 17, 2009 Share Posted December 17, 2009 Someone wrote a shader that let you do this, but just not in the editor. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Niosop Posted December 17, 2009 Author Share Posted December 17, 2009 Really? Have a link to it? Eternal Crisis is working on one now, and I'm working on a little editor that will let you do the painting and save out a vert color file, but if there's already a shader written it would make EC's job easier. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
TylerH Posted December 18, 2009 Share Posted December 18, 2009 http://forum.leadwerks.com/viewtopic.php?f=7&t=3758 The technique is called texture splatting. I was amazed by this shader Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Niosop Posted December 18, 2009 Author Share Posted December 18, 2009 Awesome, that's almost exactly what I'm going for. Will add a couple extra textures (base texture + 4 in RGBA channels), and normal/spec maps for each for a total of 10. Then I just have to write a little program that will let you walk around your scene and splat the textures onto your static objects to add variety. Have it export the data you painted to files and make a custom post load function that will look through and apply them and we're good to go Thanks so much, this will help save a lot of time. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
TylerH Posted December 18, 2009 Share Posted December 18, 2009 Np. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Masterxilo Posted December 18, 2009 Share Posted December 18, 2009 vertex paint meshes on a per instance basis You'd lose GPU instancing with that. (Meshes that are instantiated all look exactly the same, except for color. Having texture arrays would change this a little bit (then they could also have individual textures), but I don't think it's possible to specify vertex color data per gpu instance.) moss on rocks, cracks on pillars, etc, etc You'd rather do things like that with decals, best with projected decals: Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Niosop Posted December 18, 2009 Author Share Posted December 18, 2009 You'd lose GPU instancing with that. (Meshes that are instantiated all look exactly the same, except for color. Having texture arrays would change this a little bit (then they could also have individual textures), but I don't think it's possible to specify vertex color data per gpu instance.) Yeah, I'm loosing GPU instancing for those things that are painted. Won't know for sure if the performance hit is acceptable until I try it on a large scale. You'd rather do things like that with decals, best with projected decals: I was considering decals, but I thought that having multiple overlapping decals tended to cause Z fighting among them? Is this incorrect? Since the decal is a new surface, wouldn't it incur a similar performance hit? Probably less polys in the decal than in reconstructing the surface, but I don't think poly count is nearly as much of a concern as draw calls now days. I could be (and usually am) wrong though. Reconstructing the surface is basically the same thing as a decal but you don't need the original surface any longer (not sure if that saves anything since it would have been instanced anyways). I suppose if there was a way to directly access texture data in memory then I could generate the desired texture composite dynamically and assign it to a decal, but I haven't figured out how to access texture data yet. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.