What is Ptex
Ptex is one of the more amazing technologies, allowing you to paint extremely high-resolution textures on a per polygon basis, as well as completely bypassing all UV work as it does not require any manual input for the creation of the UV maps.
Ptex, in its current implementation, only supports quad polygons, no triangles or N-gons.
It’s important to note that when using Ptex in 3DCoat, you can increase the resolution of individual polygons if you require more texture details in the local area of that polygon. By increasing the resolution of a polygon or group of polygons, it is effectively increasing the size of that polygon on the auto-generated Ptex UV map.
For example, you could paint very small details inside of areas on a mesh that calls for an extreme close-up shot or just requires more detail in one area yet, you don’t want to create a lot of very high-resolution texture maps. Ptex works quite well for this purpose.
Even more remarkable is that the .ptex format can store hundreds of thousands of textures directly within one .ptex file. At this time, only external application that supports the .ptex format will be able to import/export the .ptex file for use. To fill in this gap in .ptex support, we have provided for the export of an ordinary texture map, based on Ptex technology, in the TGA, BMP, and PNG formats.
Ptex import options
Upon importing a mesh for Ptex painting, you will be prompted to select a number of options:
Millions of polygons: This is the mesh resolution as subdivided after the “Smooth object” operation is performed.
This should be higher than the number of pixels of your texture map.
Carcass resolution: This is the mid-poly resolution; it only affects the viewport performance and display of the mesh in the viewport.
Ptex Texture Size for Export
You can select a texture resolution between 512×512 and 8192×8192. You can also change this at any time you need to scale up or down your texture resolution.
Weld vertices: This will weld any vertices which share the same position.
Swap Y and Z: This will swap the Y and Z axes. This allows for an easier time bringing meshes from applications such as Rhino or 3DSMax.
Ignore smoothing groups: Ticking this will ignore any smoothing groups which you have on your mesh.
Invert normals: This will flip the normals of each polygon. Auto smoothing groups: This will automatically scan the mesh for sharp angles between polygons and apply smoothing groups to them automatically, maintaining any sharp edges that are present.
Each of the following Ptex functions requires a selection.
To make a selection, simply activate the Ptex Local resolution tool and “paint over” the polygons in the viewport.
Local Resolution parameters
Clear: Clear any selection.
Invert selection: Inverts your selection.
Expand: Expands your selection by one contiguous polygon.
Contract: Contracts your selection by one contiguous polygon.
Select level: Manually key a local polygonal subdivision level.
Increase resolution: Increases the local resolution of the currently selected polygons. This effectively increases the polygon size on the auto-generated Ptex UV maps.
Decrease resolution: Decrease the local resolution of the currently selected polygons. This effectively decreases the polygon size of the auto-generated Ptex UV maps.
To max level: Sets your current selection to the maximum level allowed for Ptex. They are effectively increasing selected polygons, nearly taking up their UV map.
To min level: Sets your current selection to the minimum level allowed for Ptex. Effectively shrinking selected polygons, allowing more polygons per UV map.
Ptex Texture Size: You can pick the texture resolution for each ptex-generated texture. Selectable resolutions range from as low as 512×512 to as high as 8192×8192. You can change this at any time to suit your needs, as well as upon importing the mesh for Ptex painting.
Optimize: Organizes polygons on every auto-generated Ptex UV map to fit more polygons based on local resolution (poly size per UV space).
NOTE: When using this, do keep in mind that if you have been using a mesh with specific auto-generated Ptex UV maps, it will completely reorganize the polys on all UV maps, rendering your previous auto-generated UV maps useless.
However, you can always bake the details from one mesh to another. Just be sure to save two meshes:
Your original and the baking target mesh. For more information on Ptex, please visit the official Ptex website at
http://ptex.us/
– Ptex is a special mapping where texture 2^n x 2^m is associated with each face. The resolution of each face can be changed dynamically.
– Ptex is very close to the micro vertex approach because patch N x M was associated with every face in the micro vertex approach.
– The big advantages over micro vertex painting are – not needing UV; every pixel on texture corresponds to only one vertex on the patch, which results in much better painting quality.
– Ptex is good for subdivision surfaces but bad for objects with irregular surfaces that become wrong after subdivision. Currently, only quads are supported in 3DC; maybe I will support triangles later.
– Ptex can be set in correspondence with the UV-mapping approach because all small textures will be placed on several big textures, so 3DC can export objects and textures to be used in any other game/render package. Seamlessness is provided because every patch/small texture is placed on a big texture with a 1-pixel wide border composed in a special way to imitate filtering.
– Objects exported using Ptex can be used in games, but it is not too efficient now because every face will produce four vertices (instead of 1-2) that will be brought to the render engine. This is not too critical an issue, but anyway it will give some small speed penalty. Of course, the game engine can be optimized to avoid this problem using a geometry shader, but it needs some improvements in the engine itself. It will work in game engines; it is just a performance warning. If proper optimization is made in game engines, this technique can show displaced objects close look very well. For example, suppose the game engine will get on input three streams (vertex position + quad indices + patch parameters) instead of 2(vertex coordinates and UV + triangles indices). In that case, rendering can be performed even in a more efficient way.
– Objects can be used in any usual render engines/3D packages without seams due to the reason that was mentioned before (specially filtered border).
– If the near future native Ptex export/import will be done too, but it is not too critical because of seams problem is almost not existing there.
– Ptex is ideal for baking from voxels to painting approach because there will not exist any UV-overlap issues that are just impossible in this approach.
When your model does not require extreme displacement (by means of texture maps) – and you want to work without the considerations of UV Map seams (very fast) try the Ptex mode.
With the “Texture Editor” Panel open, as well as the Ptex “Tool Options Panel”, you can adjust Ptex resolution locally and at any time during the texture painting process – instantly seeing the UV Map changes in real-time.
After clicking the “Ptex Icon” at the bottom of the “Painting Tools Panel”, you can designate areas of increased resolution by painting the desired polygons in the Viewport and pressing “Increase Resolution” in the “Tool Options Panel”.
Whatever features you add in the Painting Room, it can be automatically converted to standard texture maps which can be read by many 3rd party applications. Ptex provides optimized distribution of texture space and allows you to work very quickly.
Be aware that texture maps converted from the Ptex Mode are not suitable for modification in external painting apps like Photoshop. At this time, Ptex is still considered an experimental process for texturing.
Ptex advantage
The big advantage of Ptex was the ability to increase the resolution of the texture in specific areas. If you didn’t have enough resolution for a set of polygons (such as an area with text), you could just select the area and bump up the resolution.
There is a button in the tool palette that says Ptex local resolution when you hover over it. It’s an image of a square with four smaller squares in the upper left corner of it. Clicking on it will bring up a bunch of options, at which point you can select which polygons you want to affect by left-clicking on them (hold the control key and left-click to deselect).
Tutorials
Baking Ptex textures onto a mesh with existing UVs:
How to bake textures after using the Ptex UV/Texturing method to a mesh with an existing UV map.
Quite handy if you want to use the Ptex format in 3DCoat as a “storage” format with your high res details and bake to lower-resolution textures as needed.