Advanced Member JoseConseco Posted February 26, 2015 Advanced Member Report Share Posted February 26, 2015 Hi, I was wondering is there a way to export hipoly mesh with gloss, metallnes, roughness data encoded in vertex colors? Would be helpful for rendering in external rendering engines, with no need to make lowpoly and bake everything. Quote Link to comment Share on other sites More sharing options...
Contributor Solution ajz3d Posted February 26, 2015 Contributor Solution Report Share Posted February 26, 2015 Hi.Well, yes and no.---"Yes", because technically you can use Copy Channels to copy each of these PBR channels to colour of other paint layers (E.g. source layer's glossiness to destination layer's luminance channel, etc.) Then export several versions of your model, each containing different data written to vertex colour. PLY format supports vertex colour, so I'd use that. You'll end up with several .ply files, each containing different channels in their vertex colours.This is where things get a little bit tricky and the trickiness depends on the software you use.If you're familiar with Houdini, you can import all those models and copy Cd point attributes of each one of them to appropriate point attributes of your render geometry (you'll need to create those attributes). Then you'll need to modify your shader to use these custom attributes instead of texture files for each shader's parameter that correspond to appropriate PBR channel that you have written inside vertex colour of your models.If you don't use Houdini, then you can resort to MeshLab. Import one of your .ply files. You need to apply some kind of texture parametrization. You have a choice to use either Trivial-Per-Angle or Voronoi Atlas (I suggest the latter), but first you have to launch a Per Vertex Texture Function (default parms will do). Now start either one of parametrization functions. I'll only explain Voronoi Atlas. With it you'll need to define number of UV islands. I guess the more of them, the better. It will create a new mesh layer called VoroAtlas, or something like that. Select it and export it to, say, .obj, but remember to include wedge TexCords. Vertex normals are optional. This will be the file you will be rendering. Now, the new mesh has uv coordinates, but does not have any texture yet. Choose Filters->Texture->Transfer vertex attributes to texture (between 2 meshes) and choose your original mesh as source and the VoroAtlas as target. As a vertex attribute to copy, select vertex color, choose the desired texture resolution and filename. Leave the rest as defaults. As a result, a new texture map will be created on the disk (for some weird reason it won't appear on your model even if you have selected Assign Texture in the options window). To copy other maps, keep VoroAtlas mesh on the layers list, sequentially import other .ply files, copy their vertex colour to the VoroMap and remember to change texture file names according to what vertex colours of those .plys store. The thing is that Voronoi Atlas function likes to freeze MeshLab in an endless (or maybe not?) loop.---And "No", because Copy Channels appears to be broken... P. S. Sorry for bad formatting, but Mr. Morpheus will be visiting me any moment now. Quote Link to comment Share on other sites More sharing options...
Advanced Member JoseConseco Posted February 27, 2015 Author Advanced Member Report Share Posted February 27, 2015 thx. ajz3d for in depth explanation. This is just what I was thinking, but I hoped there is easier way. I don't know if fbx suports multiple vertex color channels per vertex, but I guess it is not implemented in 3dc fbx exporter. Anyway I think I can do what you described in blender too, by baking one object vertex data to another. it may be less work than doing retopo and uv, and baking... Quote Link to comment Share on other sites More sharing options...
Contributor ajz3d Posted February 27, 2015 Contributor Report Share Posted February 27, 2015 Now that I think of it, there must be some easier way. Maybe baking hires model to ptex? Not sure how hires model used as a retopo mesh would look like performance-wise. Quote Link to comment Share on other sites More sharing options...
Contributor ajz3d Posted February 27, 2015 Contributor Report Share Posted February 27, 2015 You could also auto create uv-seams on a hires geo and bake hires-to-hires for PPP without normal map (as you won't need it). Brute force! Then (in both cases: ppp and ptex) export the model with textures from the paint room as usual. I need to try this. --- There's also a texture baker that you could probably use if you auto-uved your hires mesh. But I never used it, so I don't know if it reads/writes PBR channels or vertex colour. Quote Link to comment Share on other sites More sharing options...
Advanced Member JoseConseco Posted February 27, 2015 Author Advanced Member Report Share Posted February 27, 2015 yep. I played a bit w ptex and it is really cool. Painting in ptex is faster than uv-mesh, user can paint with real displacement. So maybe zremeshing mesh in zbrush, then back to 3dc for ptex baking with displacement may be the easies way. And soon blender will have support for ptex, so I will be able to render sculpts in cycles. Another way could be baking to vector displacement on very simple model. But I'm not sure if 3dc supports vector displacement. Quote Link to comment Share on other sites More sharing options...
Contributor ajz3d Posted February 27, 2015 Contributor Report Share Posted February 27, 2015 yep. I played a bit w ptex and it is really cool. Painting in ptex is faster than uv-mesh, user can paint with real displacement. So maybe zremeshing mesh in zbrush, then back to 3dc for ptex baking with displacement may be the easies way. And soon blender will have support for ptex, so I will be able to render sculpts in cycles. Another way could be baking to vector displacement on very simple model. But I'm not sure if 3dc supports vector displacement. I believe 3D-Coat does support vector displacement. Can't check it at the moment, but there is an option to export it in the Textures menu, IIRC. Quote Link to comment Share on other sites More sharing options...
Reputable Contributor digman Posted February 27, 2015 Reputable Contributor Report Share Posted February 27, 2015 (edited) Also with Ptex you can put all the texels on one map if you have more than one ptex map in 3DC. It is under the ptex tool bar which is the last icon in the left tool bar. Now you can export that map as a regular displacement map for any renderer... Yes you lose some texel resolution but it is a method where you do not have to export the displacement in an encoded ptex file (ptx) The conversion to one map is not the greatest texture space efficient. I go to the UV room and use PackUV2 to scale and move without flipping or rotation to get better use of texture space. Then I update the map... Here, remember I am just exporting a regular displacement map and not a ptex file... (ptx) This seems to work well for Blender Cycles rendering though I have not indepth tested... Edited February 27, 2015 by digman Quote Link to comment Share on other sites More sharing options...
Contributor ajz3d Posted March 2, 2015 Contributor Report Share Posted March 2, 2015 I believe 3D-Coat does support vector displacement. Can't check it at the moment, but there is an option to export it in the Textures menu, IIRC. Okay, I checked and it appears that vector displacement export is available only if a mesh has been baked for microvertex painting, which is a bummer, considering that microvertex is deprecated. Quote 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.