Jump to content

Vertex painting in editor


Niosop
 Share

Recommended Posts

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).

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

Someone wrote a shader that let you do this, but just not in the editor.

52t__nvidia.png nVidia 530M cpu.gif Intel Core i7 - 2.3Ghz 114229_30245_16_hardware_memory_ram_icon.png 8GB DDR3 RAM Windows7_Start.gif Windows 7 Ultimate (64x)

-----

IconVisualStudio16.png Visual Studio 2010 Ultimate google-Chrome.png Google Chrome PhotoshopLinkIndicator.png Creative Suite 5 icon28.gif FL Studio 10 MicrosoftOfficeLive.png Office 15

-----

csharp.png Expert cpp.png Professional lua_icon.png Expert BMX Programmer

-----

i-windows-live-messenger-2009.pngskype-icon16.pngaim_online.pnggmail.pngicon_48x48_prism-facebook.pngtunein-web.pngyahoo.giftwitter16.png

Link to comment
Share on other sites

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.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

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 :D

 

Thanks so much, this will help save a lot of time.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

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:

Decals_image021.png

Link to comment
Share on other sites

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.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...