PoseRay

Poser4 to POV/Moray converter

VERSION: 1.2 build 59, Nov. 20, 2001


What is PoseRay?

PoseRay is an utility to convert a set of OBJ and PZ3 files exported by Poser4 into POV-Ray code and Moray UDO files. It handles the geometry, cameras and lighting with the least intervention from the user and it was done with ease of operation in mind. 

A simple list of features includes (with version number)

Note that this program was designed for Poser4 OBJ files only. It was not tested with OBJ files generated by other programs and may or may not work in those cases. 

I refer to POV-Ray and MegaPOV interchangeably here. MegaPOV is POV-Ray with some extra features (but it uses the same base source). As far as PoseRay is concerned MegaPOV and POV Ray provide the same functionality since UV mapping is now supported in POV-Ray 3.5beta.



What is needed?


Where do I find PoseRay in the future? 

I will try to keep the latest version posted on povray.binaries.utilities group from the news.povray.org news server. It is an open server so you can easily set up your news reader for it. Right now I also have a tentative web site at http://user.txcyber.com/~sgalls/ . Also check on the comp.graphics.rendering.raytracing newsgroup for the latest information on the file location. Just search for flyerx or poseray. Google is a good source for reading newsgroups.


How do I install PoseRay?

Just place the decompressed files anywhere in your system. No installation program needed and no Windows registry entries are used. To uninstall just delete the files. PoseRay was created with Delphi5 and it does not require any external libraries to run. The only files needed are poseray.exe and poserayhelp.htm (this file which is included in the downloadable PoseRay zip file).


How do I use PoseRay?

  1. Create the scene in Poser4 and save it into a *.PZ3 file. Make sure that the camera and lights are set the way you like them so you can import them into PoseRay.


  2. Use the export command in Poser4 to save the geometry to Wavefront OBJ format. Remember to select the parts that you really want to export.  You can use any export options, all will work with PoseRay. This will create an *.OBJ and an *.MTL file. You will need both to do a proper conversion to POV-Ray code. 


  3. Once the export process is finished start PoseRay by executing the poseray.exe file. Click on Load and select the OBJ file just created.  If you do not have an *.MTL file, PoseRay will assume generic properties for each material. The materials will still be separate but with the same generic properties.


  4. PoseRay will load the file and pre-process it. It may take a few seconds as it loads it and will display the process on the text window.


  5. Once it finishes pre-processing it new tabs appear at the top of PoseRay where you can change the options such as output files, material properties and scaling. The description of each tab is shown below.
  1. Output: You can change all the output file names in the output tab. PoseRay defaults to the root of the input file and uses the corresponding extensions for each file type.  The last option here is to have a MegaPOV header if you are using MegaPOV instead of POV-Ray.

  2. Materials: The materials tab will allow to change the material properties. An brief explanation of each follows:
    Diffuse color is just the surface color of the material. Ambient color is the color the material would have if there were no lights. Ambient is usually black unless it is a glowing surface or similar.

    Highlight intensity is the amount of light that highlight will have at its brightest. In a shiny surface the highlight would be 100%. On a rubbery surface or clothing it would be close to 0%. Highlight intensity should be set to 0% for materials using textures with alpha transparency. If highlights are used there will be shiny spots on the surface even if the

    Roughness simulates the surface roughness of the material. For example eyeballs would have 0% roughness while an asphalt road would have 100% roughness. Best values for most materials should be below 10%. Very high roughness with strong highlight will make the surface appear white and with no features.

    Transparency is how much light is let through the material. Transparent textures are covered in the tips section of this file. Make sure that if a material is going to have a texture with transparency the material transparency in PoseRay should be 0% unlike what Poser needs. When Poser exports to the Wavefront format transparency and bump map information is not transferred to the OBJ file and you should select them in this tab. 

    Reflectivity is how much of the surroundings the material reflects. Chrome would reflect 100% and rubber would reflect 0%. If the material is simulating a metallic surface then check metallic.

    Textures can also be assigned to the material in this tab. POV-Ray 3.5 supports gif, tga, iff, ppm, pgm, png, jpg, tif and bmp. Textures can be used without conversion in most cases. Select to blend with material's color so that the texture inherits the color of the material. This is done using layered textures in POV-Ray. High filtering should be good for most cases. As the filtering is lowered less color is blended into the texture. If no blending is done the material will use the texure colors only. If you are using a texture with an alpha channel so that it will have transparency make sure blending is off for that material. If not the material color could be seen through in the transparent areas of the texture. Also highlight intensity should be set to 0% for materials using textures with alpha transparency.

    Bump maps can be selected for every material. The default bump size of 1.0 should be enough for most purposes. Enlarge this value if you find that the resulting bump is not strong enough. When Poser4 exports to the Wavefront format transparency and bump map information is not transferred to the OBJ file. 

  3. Geometry: The geometry tab allows you to change the scaling and position of the entire geometry in POV-Ray. PoseRay by default scales all geometry by 1.0. You can also include a small XYZ axis of size 1.0 at the origin. It may be handy in positioning items in POV-Ray. You can also add a white floor and a sky.
    The geometry tab also allows the resulting POV-Ray geometry to have the surface made up of smooth triangles or flat triangles. This may be useful on models where sharp edges are needed such as a sword. With smooth normals the blade will look dull and the flat sides will have a rounded look. Using flat triangles will give it a very defined and sharp edge and surface. UV mapping will be applied properly for smooth or flat triangles.  

  4. Camera: This is a new feature of PoseRay. The camera settings stored in the Poser file (*.PZ3) can be imported into PoseRay so that it can include the appropriate camera settings in the POV code. PoseRay will pick up the current camera that was saved into the *.PZ3 file. The camera types recognized by PoseRay are MAIN, AUX, TOP, BOTTOM, LEFT, RIGHT, FRONT and BACK. If the current camera saved in the *.PZ3 file is not one of these PoseRay will default to the MAIN camera.  If the camera read is one of TOP, BOTTOM, LEFT, RIGHT, RIGHT or FRONT then it will marked as orthographic (it has no perspective).
    If you want to use different settings you can edit them in in this tab but usually it is much easier to set up the camera in Poser, save it to a *.PZ3 file and then read it with PoseRay. Manual editing of the camera settings is better suited for fine tuning the scene. This tab also allows you to import camera settings from other *.PZ3 files if desired. So if you have two scenes with the same geometry you will have to read the same *.OBJ file and different *.PZ3 files.

  5. Lights: Another new feature. The lights in the *.PZ3 file can be imported into PoseRay and transferred to the POV code. PoseRay will read parallel and spot lights with variable intensity and with or without shadows. You can also manually edit the light properties for each light and create new lights and add them to the scene. As for the camera settings it is much easier to set up the lights in Poser and import them into PoseRay than to edit them manually unless it is for fine tuning. PoseRay will read up to 50 lights in the *.PZ3 file.

  6. Moray: The Moray tab is used to determine if you want a simple bounding box to represent the model in the UDO Moray file or to use all the polygons instead. To read the model in Moray just load the UDO file created. Make sure that the *.inc files are in the same directory.

  1. Once the options have been set then press finish in the MAIN tab to complete the conversion. PoseRay will display the progress on the text window and will let you know what textures are needed. PoseRay will create 3 files that are described below . Put all the textures in the same directory where the resulting files are located.


  2. To display the just created files start POV-Ray or MegaPOV and open the *.POV file that PoseRay created. Make sure that the *.inc files and any needed textures are also in the same directory.  Click on run and the scene should start rendering.


  3. Before you use Moray with MegaPOV make sure that the POV-Ray executable in Moray render options points to the MegaPOV executable. Also the path where the inc files are located should be in the POVRAY.INI file. Start up MegaPOV and in the tools menu click on edit master povray.ini and add this entry to the end of the file: "Library_Path=xxx" without quotes and xxx should be the location where the inc files are. For example I have this entry at the end of my povray.ini file: "Library_Path=C:\Work\Poser\povgeometry" (without quotes) since I place the files that PoseRay exports there. So this way when Moray calls MegaPOV to do a render using a PoseRay-created UDO file it will find all the needed include files.


  4. I noticed that Moray 3.3 limits the number of edges and vertices that are loaded. You can increase these to about 300000 or more so that complex UDO models can be seen. This setting can be changed in the View|configuration menu under the advanced tab. Also the UDO detail level in the scene settings may be decreased so that you do not have to change the allocated memory. Usually 10% works.

How about some Tips?

My model is huge. PoseRay takes too long to convert it!

PoseRay allocates and deallocates memory on the fly so it will use what it needs. For every polygon the vertex, normal and UV indices are stored. To that add the actual vertex, normal and UV list of floats and the memory requirements grow quickly. To use PoseRay effectively with very large models (hundreds of thousands of polygons) it is best to export the model from Poser in parts. For example if you have two characters in Poser export them separately. Once they are converted they can be merged in POV-Ray just by including one of the mesh files into the main *.pov file of the other and have a statement at the end to call the extra mesh. The same could be done with Moray. The UDO files could be produced separately and then imported separately into Moray. When exporting separate models of the same scene make sure that they have the same scale and translation options in PoseRay.


How do I use textures with no transparency (or images with bump maps) in POV-Ray/MegaPOV?

POV-Ray 3.5 has JPG, TIFF and BMP support so that most of the Poser textures can be used unchanged.  Note: For some reason POV-Ray has problems with some texture files. Try to resave them or convert them to another format. This is a known issue.   There are many free converters that should work. Also PaintShop Pro 7.0 does this. To save on load time and file size you may want to reduce the color depth. Simple textures do not have any transparency information and can have a lower color bit depth. With bump maps just convert them to grayscale. If you are using MegaPOV then convert your textures and bump maps to PNG format.


How do I use textures with transparency in POV-Ray/MegaPOV?

Using Paint Shop Pro 7.0 (PSP) is rather easy if you have the Poser4 texture and transparency map files. Here are the steps:

  1. Start PSP and load the texture and transparency map files. 
  2. Select the window with the texture in it and go to masks | new | from image.
  3. In the dialog box that comes up select the image with the transparency. Select by source luminance and uncheck invert mask data. Click OK.
  4. The texture window should change and have a checkered background indicating the transparent areas.
  5. This new info needs to be saved into the alpha channel. Select the window with the modified texture and go to masks | save to alpha channel. Use the default values and press OK.
  6. Now save the new texture to disk. Select the window with the modified texture and go to to file and select save as... As the output format select Portable Network Graphics or PNG. Then click on the options button on the save dialog box. The file should be non-interlaced and with an optimized palette. Then click on the optimizer button. In the PNG optimizer make sure that under the transparency tab Alpha channel transparency and Existing image or layer transparency are selected. Also the colors tab should indicate 16.7 million colors (24 bit). Click OK and the save dialog box will show up again. Type the name of the file and save it. You will notice that the resulting file is very large compared to the JPG version that was loaded. This is one drawback of this procedure. POV-Ray (or MegaPOV) does not support transparency maps directly. Transparency is achieved through the alpha channel of PNG files. Files must be 24bit and cannot be reduced in depth or the alpha channel will not saved.
  7. If you want to use some other program then make sure it can create masks from the transparency map and save them into the texture's alpha channel.
  8. Important Note: Paint Shop Pro 7.04 will tell you that it will save the PNG without any alpha channels. Disregard this warning while saving the PNG file. It will work in POV-Ray.


What do I do when I only have a transmap and no texture?

Again using PSP7 it would be very similar to the previous procedure:

  1. Start PSP and load the transparency file.
  2. Create a new image with the same dimension as the trans map image. This will be the texture. So now you can colorize this image as desired. 
  3. Select the texture and continue in step 2 of the above procedure (How do I use textures with transparency in POV-Ray/MegaPOV?)



How does PoseRay organize the POV files?

PoseRay creates a scene *.pov file that optionally can have a simple floor, light sources, a camera and a sky to show the geometry. The actual meshes are in the *.inc file. And the materials are stored in the *_mat.inc file. For example if the Poser4 file raptor.pz3 and raptor.obj are converted then the files created will be raptor.pov, raptor.inc and raptor_mat.inc. The *.inc file has the meshes defined with the names of groups and materials that were in the OBJ file.

Each group in the obj file is subdivided into materials so PoseRay breaks the group into subgroups. For example: if group "head" is read and material "ear" is found then the subgroup name is "head_ear_23" where 23 would be the global number of the current subgroup starting from 1. The number is needed in the case where the group could use the same material more than once thus preventing ambiguous names. If there are no group names then they will be labeled "group". Because of POV-Ray's naming convetion any characters in the group or material names that are not alphanumeric or "_" are replaced by the character "_".  

The meshes are placed at the bottom of the *.inc file to create many objects each using a different material. A union is used to assemble them all into a single large object. The materials stored in the *_mat.inc file can be easily edited to change surface properties. Check the POV-Ray documentation for the many options available.


Help!

If you have problems with this program or have suggestions send me a message to flyer_2000@excite.com

Here are a few troubleshooting items:


Legal information and License.


EOF