Sorry I have another question XD I am trying to speed up my workflow as much as I can.
I need a faster and better way to bake selection maps. Currently I use Maya, apply different colored material to each part of the highpoly I need, and then bake it using transfer maps. The problem is the projection of the selection map usually is slightly different than what I get from the normal/AO from xnormal so I have to spend a decent amount of time cleaning it up. On top of this Maya does this so god damn slow that it hurts me on the inside.
Is there a faster and better way to do this? I have seen that xnormal can read polypaint data, but can it read something similar from maya? or could I hack a way to quickly get my color information from Maya to xNormal? I was thinking a good alternate would be to export chunks of the highpoly into zbrush, fill each subtool with a color, and export to xnormal. I would like to avoid that if possible though.
Thanks again PC!
Replies
If anybody stumbles upon this thread then just a quick tip if you do this.
Follow this video, except do color/lighting instead of AO. https://www.youtube.com/watch?v=RY3uzEQjwDU
Maya has no way to bake color without lighting in the bake vertex color menu. So all you need to do is use surface shaders on your highpoly because they hold no lighting information.
Maybe you can use this:
http://www.polycount.com/forum/showthread.php?t=92535
You can apply random colors to uv shells and use as selection map.
I do it all the time and even got a little script and ui for applying preset colours to different polygon selections in Maya.
I also use the same method for bakeing curveature information from Maya since I like the result of a Maya script I use for that over xn.
That is even better! Thank you very much.
So I just tried this and it didn't work. Here are my steps.
Assign the different colors to each material I want on my highpoly. I am using dDo's swatches for this.
Export out FBX of highpoly, lowpoly, and cage.
Load them all into xnormal.
Uncheck box that says ignore per-vertex color.
Check Bake highpoly's vertex colors.
It renders all white, which is the background color I chose.
xNormal wont actually bake the vertex colors into the mesh from the materials I chose I don't think, unless I am missing something. I will still have to do that in Maya, which is annoying because Maya has no option to do that without the lighting.
The workaround is to crank the ambient on all the ddo swatches up fully so no lighting info is baked. It's a PITA, but you can just do it once in the swatches file and then you have it for use later on.
Then do a vertex bake of lighting and color, and the vertices will have the colors baked.
That is a smart idea, but yea a pain in the ass. It is so weird that Maya can't bake vertex colors without lighting information. I wonder if it would be faster to convert all the dDo swatches to Surface Shaders in the hypershade instead. I will mess around with it tomorrow, or maybe Passerby as some crazy script for that lol.
Edit. My girlfriend come to the rescue. She wrote this for me for Python. It switches all the ambient colors of any selected materials to white.
Changing 1,1,1 to 0,0,0 will change it back to black.
That is only one issue though. My major problem is how long it takes to actually bake the map
its something I made that allows me to quickly assign vertex colour to face selections, and to visualize this.
Ahh I see. It might take some time setting up, but as long as the colors for the the ddo materials are the same as the vertex color I assign it should work perfectly fine. Thanks again! Can't wait to try that script out.
it has its pros and cons over the material method
pros:
Simple baking process with XNormal.
doesn't clutter up scene with materials.
easy to apply.
cons:
is per vertex not per face, so there is a little tiny bleed with interpolation between verts.
Yeah, Maya bakes are single threaded and *embarrassingly slow*.
If you're using mesh->smooth for a sub-d object, what you need to do is this: save out a "dirty" copy of your scene, and delete all history, this will freeze your mesh in the sub-divided form and will likely significanlty speed up bake times. I've had scenes where it was taking like 7 hours, to bake a NORMAL MAP AND COLOR MAP, and when I did this it was like half an hour, which is still retarded slow, but atleast workable.
What really sucks about it is that my face looks like Fry's.
Not sure if frozen, or should wait longer.
The work around I have now is pretty fast. I assign surface shaders with the colors I want and bake the color to the vertices in Maya. I did a test last night and it took about 3-4 min to do that in Maya on a smoothed 2 million poly mesh which isn't bad. Then bake the color map in xNormal which takes about another 3-4 min to do.
Passerby's script sounds nice if I can get it to work with the dDo swatch colors easily. In the mean time though my girlfriend wrote me a script that converted all the dDo phong materials in Maya to surface shaders that have the same RGB value and name. Super helpful.
Edit: Script if anybody wants it. Credit: http://sundaram3d.weebly.com/