Houdini and Photoshop CS 3 Extended
From Odwiki
The extended version of 'Adobe Photoshop CS3' handles 3d-objects. 'Photoshop CS3 Extended' reads various 3d-formats including Wavefront-objects (.obj). The following steps explain how to prepare data in 'Houdini' (Version 8.x) for 'Photoshop CS3 Extended'.
Basic workflow
- Create your geometry in Houdini.
- Unfold the model with 'UVunwrap' or 'UVpelt' - add a node to the network. Check the result in the UV-view - use the key-combination Space+5 to switch to the UV-viewport.
- Save the geometry to disk: Click with the right mouse-button at the node with the unfold-operation (UVunmap, UVpelt) in the network-view. Use the option 'Save geometry ...'. Use the format for Wavefront Object (obj). Refine the settings for the unfolded geometry if necessary.
- The unfolded uv-layout will be the base and reference for the texture-file. Click right on the node with the unfold-operation and export with the option 'Save texture UV to image ...' from the menu (material.jpg).
Open the object-file in 'Photoshop CS3 Extended' with Ctrl+O. The program will load the geometry correctly without the textures. The texture-information is not associated in the obj-file. An additional file is necessary to load the geometry into 'Photoshop CS3 Extended' with the texture. Here a workaround: Create an empty file 'material.mtl' and open it the file in a text editor. Add following lines:
#mtl-file for Adobe Photoshop CS3 Extended newmtl defaultMat map_Kd material.jpg
The first line is a comment and the next line sets the material-definition to default. The third line points to the file with the texture (the rendered UV-layout). Now open your obj-file with the geometry. The file should start with a 'g' followed by data lines. Add the following lines after the 'g':
mtllib material.mtl usemtl defaultMat
The header looks like this:
g mtllib material.mtl usemtl defaultMat v-0.428375-0.496625-0.38675 v-0.38675-0.5-0.38675
The line after the 'g' points to the external reference-file for the texture. The other line defines the used material. Now search in the ob-file for all other lines with a 'g' and delete them. Save the obj-file and open the geometry in 'Photoshop CS3 Extended'. Click on the texture-layer (smart-object) and paint the texture. Save and close the smart object and check the 3d-object in 'Photoshop CS3 Extended'. Click again on the smart-object for the texture and export the image with 'Save as'. Add a shader in 'Houdini' (SHOPs) and load the texture. Switch to SOPs and add a shader-node to apply the material to the object.
Groups in obj-files
If you work with groups in 'Houdini', you will find several lines with 'g' (define groups in .obj-files). To delete groups in 'Houdini', add a group-SOP to the network and switch to the edit-tab. Enter a '*' in the input for 'Delete' to remove all groups. Export the geometry as an object-file (see above).
Links
Photoshop by Adobe Systems
Technical background: Wavefront Object
Wavefront obj Wikipedia



