PoseRay Manual

Import 3D models and scenes into POV-Ray

v.3.13.31 - March 2, 2021

Web: https://sites.google.com/view/poseray

Email: flyerx_2000@yahoo.com

Contents

Introduction

PoseRay is an utility to convert 3D model meshes into POV-Ray scenes and Moray UDO files. PoseRay can also edit the materials and act as a simple transformation tool for the geometry. PoseRay can also export the modified model to wavefront (OBJ) format for use in other 3D programs. A list of main features is shown below. (Check the history for changes with the latest version)

Geometry:

Materials:

Lights + Camera:

Requirements

Install / Uninstall

Install:

Uninstall:

PoseRay Main Tabs

PoseRay is broken into main tabs and a separate preview window. Each tab is used for a different section in the conversion process. The bottom of PoseRay's main window shows the status messages and any warnings. Click on the [+] on the bottom left to expand it. The status bar also shows the progress indicator.

Input Tab:

Load...

Reset options on close

Enable this to clear all the options when PoseRay closes. This does not clear saved cameras, lights, material filters, custom materials, or render presets.

Previously loaded models.

PoseRay remembers the past 20 files loaded. Select it from the drop down list and and click either Load selected or Merge selected.

Import Options

Run options

Misc

mm/unit controls how many millimeters are in a unit. If the scene is in meters then this value is 1000. If it is in inches then this value would be 25.4. Use this for SSLT and light fade scaling.

Preview Tab:

This tab has a toolbar and 4 sections that control preview options, camera and lights.

Tools:

Display Options:

Camera: (Applicable to POV-Ray renders only)

Lights: (Applicable to POV-Ray renders only)

Materials Tab:

This tab controls the materials properties for the loaded geometry. Each material is divided into pigment, finish, bump map and transparency. Also for each material you can enter POV-Ray code and view/edit UV coordinates. All the material settings will be saved to any exported POV or OBJ files.

Material List

Tools...

Options...

Before loading any maps keep these points in mind:

Basic Material

Finishes available
map1

Reflection

map1

Simple specular

map1

Fake fresnel

Map transformations available
map1

Un-transformed map on box

map1

Scaled (U=0.5, V=0.1)

map1

Offset (U=0.5, V=0.2)

map1

Rotated (45°, around U=0.5 V=0.5)

map1

Combination of transformations

map1

POV-Ray render showing independent
transformation of pigment and transparency maps

POV-Ray Custom Material: (Applicable to POV-Ray renders only)

If the basic properties are not enough to describe the material you can use the POV-Ray code directly to create a material block. Basically a POV-Ray material is structured as follows:

material{
         texture{
                 pigment{}
                 normal{}
                 finish{}
                }
         interior{}          
}

Texture is what is on the surface and interior controls how the light passes through the material. Interior has no effect if the material does not have some transparency or reflectivity. You can type in the material using standard POV-Ray code syntax including declarations and macros. You can also put the declarations and macros on the command code text box below the POV-Ray material text box. This will be included at the top of the material POV-Ray file and will also be saved with the scene OBJ file.

Comparison of POV-Ray 3D and UV mapping
3D mapped box

POV-Ray texture - 3D mapping

Texture applied continuously throughout the mesh

uv mapped box

POV-Ray texture - UV mapping

Texture applied only to the surface UV coordinates.
The box had the same UV mapping for all faces.

UV

PoseRay will display the UV coordinates for each material zone. You can also do simple manipulation of them in this tab. U is from left to right and V is from bottom to top.

UV mapping options
map for uv demo

Map

undeformed box

Untextured sample box

planar mapping

Planar mapping perpendicular to vertical axis.

Edges of map stretch along the other faces.

cylindrical mapping

Cylindrical mapping around vertical axis.

No vertical distortion.

spherical mapping

Spherical mapping around vertical axis.

Vertical distortion is visible.

cubic mapping

Cubic mapping

POV-Ray settings

Groups Tab:

Faces, Vertices and normals:

Subdivision:

PoseRay can subdivide a model and smooth its appearance using the modified Loop algorithm or a flat subdivision. Subdivision will result in each triangle broken into 4 sub-triangles and 3 additional vertices. Not all models are suitable for subdivision and results will vary. Press the Subdivide button to execute the command.

You can repeatedly subdivide a model. For example 3 subdivisions on a 5000 face model will result in 43=64 triangles per original triangle. This would produce a model with a total of 64*5000=320000 faces after 3 subdivisions. It can be easily seen that the model could get very large with just a few subdivisions. Usually one subdivision should be enough for most cases.

If after a subdivision the model shows numerous gaps you may want to reload the model and weld the vertices before subdivision to prevent faces from rounding away from edges.

There are two subdividing methods (flat and smooth):

Below are a few examples of the smooth subdivision options used on the same mesh.

Subdivision Options

original

Original mesh

subdivision with creases kept only

2 Subdivisions

Options:

  • Keep mesh creases ON
  • Smooth mesh edges OFF

subdivision

2 Subdivisions

Options:

  • Keep mesh creases OFF
  • Smooth mesh edges OFF

subdivision keeping creases only

2 Subdivisions

Options:

  • Keep mesh creases ON
  • Smooth mesh edges ON

Mesh Displacement

This deforms the grid by moving each vertex along its normal according to the intensity of a map at the UV coordinate of the vertex. The model must have texture (UV) coordinates for displacement to work. For the deformation you can choose to move a vertex along the normal at that vertex or just some of its components. If the model does not have UV mapping you can create it in the UV sub tab.

Displacement images have usually denser resolutions than the mesh to which they are applied. Typically the denser the mesh the better the displacement results. You can use subdivision to increase the resolution of the mesh before it is displaced. But PoseRay can also do an adaptive subdivision of the mesh where the displacement gradients are the largest. This prevents redundant subdivision and improves performance. To do an adaptive subdivision and displacement just follow these steps after loading a model:

Steps for displacement:

  1. Select the groups that you want to displace. If you want to work on some materials instead just click on Tools... Materials -> Groups and select the materials you want to displace.
  2. Load the displacement image. The amount of displacement can be controlled by setting the values at pure black and at pure white in the image. Usually gray scale images are best for displacement.
  3. If the mesh is too coarse for the detail in the displacement map you can use adaptive subdivision as described below:
  4. click on Displace geometry. PoseRay will subdivide and displace the mesh.

Tip: to get an idea of how much to displace click on the status messages and in the expanded status message box click on geometry stats. This will give you the size of the geometry loaded. Start with small increments. If you make a mistake just go to Tools->Undo.

Displacement example
undeformed box

Texture map

undeformed mesh

Displacement map

Black = 0.0 displacement

White = +0.2 displacement

undeformed box

Undeformed and textured box mesh

10 x 10 x 10 units

undeformed mesh

Deformed box mesh

Adaptive subdivision, 0.07 threshold, 5 subdivisions

Converting Lines to tubes (Lines sub-tab)

Light Dome (Applicable to POV-Ray renders only) (DEPRECATED)

warning symbolNote: This feature is deprecated because of the radiosity improvements in POV-Ray 3.7. No new features or updates will be added to the Light Dome functionality. This feature will be removed in future versions of PoseRay. See this section for recomendations.

PoseRay can use a high dynamic range image to simulate environmental illumination by using a set of lights (light dome) with the intensity and color of the surroundings.

Light dome example using the Eucalyptus Grove probe from Paul Debevec's page

Probe

Original light probe (angular mapping)

Lat-Lon

Probe converted to latitude-longitude mapping with HDR Shop

HDRI scene

Render using light dome extracted from probe.
The hdr probe was also used in a sky_sphere for reflections. Dome had 64 infinite lights with soft shadows.

Extraction procedure:

  1. Get the utilities below and set them up as described on the installation section.
  2. If the HDR probe needs remapping and conversion (see images above) then start HDRShop. Load the high dynamic range image you want to use and if it is not using Latitude-Longitude mapping (see above for example) go to Image -> Panorama -> Panoramic Transformations... and in the source image format select Light Probe (angular map) and the destination image format select Latitude-Longitude and click OK. A new remapped image will be created.
  3. The image width must be twice its height so if the file is not you can resize it in HDR Shop by clicking on Image -> Size -> Arbitrary Resize... and enter the corrected size.
  4. Then save the image as a High Dynamic Range Floating Point TIFF file (.TIF). Also save the image as a jpeg for preview purposes.
  5. Back in PoseRay click on Extract lights using LightMapGen... to get the lights out of the TIFF file saved above. This will create a file named filename.lm containing a list of lights.
  6. Click on Read LightMapGen output... and select the file created above. This puts all the lights on the scene. The light distribution will be shown on the image box over the jpeg preview of the light probe if it is available.
  7. If you want to change the light export just change the Light Extract Options and reload the file from the previous step
  8. If you want to change the orientation of the lights just press the left or right arrows in the Rotate all lights control in the preview tab.

There are two example light files included with PoseRay. They are called lightdome01.lm and lightdome02.lm. They have 64 lights each. To use in PoseRay just start from step 6 above.

Options:

Keep in mind that not all probes give good results. It depends on how they were processed and created. Some may not have strong illumination, produce unnatural colored lights or have the high range areas badly spread over the image.

POV-Ray Output Tab:

Examples of a DAZ Studio scene rendered with different settings.

graphic28

No radiosity and one point light.

graphic31

Radiosity, one point light and illumination from background dome.

graphic29

Radiosity, focal blur, one point light and illumination from background dome.

graphic32

Radiosity and illumination from background dome only. No lights.

Export menu

POV-Ray scene files

Scene

Output Image

Custom

If you are a POV-Ray power user you can set up extra initialization settings. The left text box text will be saved into filename_POV_main.ini file. If you want to use your settings only then check Use only these and skip the settings above. Check the POV-Ray documentation for available ini options. The right text box is for custom POV-Ray commands at top of the main POV file where special includes, declarations, etc can be entered.

Export options (after pressing save / save & render / save & edit):

Moray Output Tab:

Files

Export options (after pressing save):

Important notes using Moray:

OBJ Output Tab:

PoseRay can save a Wavefront OBJ file and its materials containing all the modifications done in PoseRay. Saving the scene as an OBJ file from PoseRay will save all the scene information such as lights and camera as well as materials. Reloading the OBJ file will restore the entire scene.

Files

Options:

Export options (after pressing save):

Kerkythea Output Tab:

PoseRay can save a Kerkythea file containing geometry and materials. Camera and lights will not be saved into this file.

Misc. options:

Export options (after pressing save):

Command line options

This section assumes that you are already familiar with the basic operation of PoseRay. Filenames need to have the full path so that PoseRay can find them. Also if they have any spaces enclose the path and filename with double quotes.

Available commands:

-load filename.ext. Loads the model in filename.ext into the scene. The file could be a single model file or a text file containing a set of files.

-convert format_number. Converts the loaded files into another format as follows:
FORMATValue of format_number
POV-Ray separate files1
POV-Ray single file2
Wavefront OBJ3

-material filename.mtl. Uses the materials in filename.mtl instead of the materials in each of the files to be converted.

-camera "name". Sets the camera to a preset before doing the conversion. The value of name corresponds to the name used by the camera preset selector on PoseRay's interface. If this command is not used then the default camera will be used. Enclose name in double quotes.

-light "name". Sets the lights to a preset before doing the conversion. The value of name corresponds to the name used by the light preset selector on PoseRay's interface. If this command is not used then the default single light aligned with the camera will be used. Enclose name in double quotes.

-exportprefix "name". Sets the prefix name for all the exported files. Enclose in double quotes. If not specified PoseRay will use the input filename.

-close forces PoseRay to close once it is done with the commands.

Examples

Just load a single model into PoseRay

poseray.exe -load "e:\3d models\car.lwo" 

Convert a single model to a POV-Ray scene and then close PoseRay

poseray.exe -load "e:\3d models\car.lwo" -convert 1 -close

Convert a single model to OBJ using the name newcar as the export name. Close PoseRay after done. The exported file will be called newcar.obj and newcar.mtl.

poseray.exe -load "e:\3d models\car.lwo" -exportprefix "newcar" -convert 3 -close

Convert into a POV-Ray format a small 9-frame set of files from a Poser animation using a single material file. Also use camera anim 1 and light set dome 4 and then close PoseRay when done.

poseray.exe -load "e:\3d models\animation.txt" -convert 2 -material "e:\3d models\mats.mtl" -camera "anim 1" -light "dome 4" -close

Where the file animation.txt would contain the following lines:

J:\scenes\animation_test_0.obj
J:\scenes\animation_test_1.obj
J:\scenes\animation_test_2.obj
J:\scenes\animation_test_3.obj
J:\scenes\animation_test_4.obj
J:\scenes\animation_test_5.obj
J:\scenes\animation_test_6.obj
J:\scenes\animation_test_7.obj
J:\scenes\animation_test_8.obj	

Tips &Tutorials

These tutorials assume that you already installed all the needed programs.

Rendering a 3D model in POV-Ray:

  1. Start PoseRay and on the Input tab click on Load... and select the desired model (or models).
  2. After the model loads you can see the model in the preview window. Set the camera and lights as desired. You can also modify the materials and geometry.
  3. If there are warnings that maps are missing you can use the search tool in the materials tab to find them.
  4. Once the options have been set the model can be rendered by selecting the POV-Ray Output tab and clicking on the Export -> Save & Render menu. Default options should work for most cases

Rendering a Poser scene in POV-Ray:

  1. Create the scene in poser and save it. (PZZ or PZ3 format). If you want to read the camera make sure the camera at frame 1 is the one you want. PoseRay only reads the camera at frame 1.
  2. I do not recommend Poser dynamic hair. It is too CPU expensive and, with the current specular controls in POV-Ray, will not render as well as transmapped hair.
  3. Do not spend too much time adjusting Poser materials. PoseRay will strip everything and use image maps and its POV-Ray's commands. Just make sure the image maps, colors and transparencies are set right.
  4. In Poser go to File -> Export -> Wavefront Object and save the scene as a Wavefront OBJ file. Use the default options.
  5. Start PoseRay and in the input tab click on Load... and then Poser scene... and select the Wavefront OBJ and, optionally, the Poser file saved above. If you do not load the Poser scene then you can manually set the camera and lights within PoseRay.
  6. Sometimes Poser mangles the normals and does not join vertices when exporting OBJ files. To prevent this check cleanup geometry in this dialog.
  7. If you want to read the camera and lights that were present in the Poser scene then check read camera and read lights.
  8. Poser 5 and later sometimes includes the same diffuse map on the highlight as a default. This can lead to unnecessary extra render times with no visible change on the rendered image. To prevent this check Skip redundant highlights. This option removes any highlight map that is the same as the diffuse map.
  9. Scale scene scales the typically small size of Poser scenes to a more usable size for POV-Ray. According to its manual, Poser always exports in Poser units. One Poser unit is 103.2in (262.128cm). So if you want to keep your scene in inches (as the default in Poser) then the scale is 103.2. If you work in centimeters then the scale would be 262.128. Using a scale less than 10 may lead to render artifacts.
  10. Click on Texture map search paths... to select the directories where you want to start searching for Poser textures. Typically this will be the ..\poser\runtime\textures folder. You can add several directories to the list in case you have several runtimes. PoseRay will save the directory list for future use.
  11. Apply material script Loads a script to clean up the materials and try to assign the material properties to give better POV-Ray renders. PoseRay includes a script (material-script.txt) that covers several Poser models.
  12. Apply material filter (deprecated, use apply material script above instead) will apply several rules to materials based on their root name. For more details go to this section. The included default filters should work for most Poser models. They give reflective eye surfaces, slight specular and SSLT to the skin and removes all ambient color.
  13. After the scene loads go to the preview tab and make sure the camera and lights are the way you want it. Also check that there are no missing or incompatible textures by looking at the warning text on the status tab. Click on the [+] button at the bottom of PoseRay to get more details.
  14. Tip: Select all the hair materials and go to Tools->Selected Materials are Hair to clean up the hair so that it will render better in POV-Ray.
  15. Make sure there are not materials that should not have SSLT active. This may happen if the filters pick up a material that matches the names in the filter.
  16. Go to the POV-Ray export options tab, select the render preset you want at the top, and press Save & Render... (defaults should work for most cases).
  17. Note: Materials may not match perfectly between Poser and POV-Ray. This is due to the use of shader nodes in Poser. PoseRay can read limited information from these nodes and may miss configure some of the more complicated shaders. Do some test renders and adjust the materials as needed. Many times is just better to use the basic materials from Poser (color, image map, etc), skip the Poser node import, use the material filters, and adjust the final material in PoseRay.
  18. More POV-Ray export details in this section.
  19. For details on what limitations PoseRay has with Poser scenes see the limitations section

Rendering a DAZ Studio scene in POV-Ray:

  1. Export the scene from DAZ Studio using File -> Export... type in the OBJ filename and select Maya preset.
  2. Start PoseRay and click on Load... -> DAZ Studio scene... and select the file saved in the step above.
  3. Scale scene scales the geometry to a more usable size for POV-Ray. The Maya export setting uses cm. So if you want to keep your scene in inches (as the default in Poser) then the scale is 0.3937. If you work in centimeters then the scale would be 1.0. Using a scale less than 0.1 may lead to render artifacts.
  4. Apply material script Loads a script to clean up the materials and try to assign the material properties to give better POV-Ray renders. PoseRay includes a script (material-script.txt) that covers several Poser and DAZ Studio models.
  5. Apply material filter (deprecated, use apply material script above instead) will apply several rules to materials based on their root name. For more details go to this section. The included default filters should work for most Poser models. They give reflective eye surfaces, slight specular and SSLT to the skin and removes all ambient color.
  6. After PoseRay loads the scene check that there are no missing or incompatible textures by looking at the status messages at the bottom. Click on the [+] to get more details.
  7. Tip: Select all the hair materials and go to Tools->Selected Materials are Hair to clean up the hair so that it will render better in POV-Ray.
  8. Make sure there are not materials that should not have SSLT active. This may happen if the filters pick up a material that matches the names in the filter.
  9. Add lights and set the camera the way you want it.
  10. Go to the POV-Ray output tab, select the render preset you want at the top and press Export -> Save & Render... (defaults should work for most cases).
  11. More POV-Ray export details in this section.

Tips for better rendering results

Splitting models along normal breaks using PoseRay:

Some 3D programs automatically smooth the meshes and disregard any normal information. PoseRay can break a model so that sharp edges are kept even after full auto smoothing. This is important if you want to import a model into an older version of Poser or DAZ Studio and keep the proper appearance of any sharp edges.

  1. Start PoseRay and load the model or scene that you want to import.
  2. Check the preview and confirm that the model is loaded right. If you want to fix the sharp edges continue to step 3 else skip to step 11.
  3. Go to the geometry tab after the model loads.
  4. If the file is DXF, RAW or POV-Ray mesh (POV, INC) then press Weld vertices
  5. In the preview check that the face orientation is right. Check show normals in the preview options section. If normals are shown pointing out of the surface the geometry is oriented right.
  6. Go to geometry tab and if the normals are not pointing out of the surface then click on Flip face orientation
  7. In the geometry tab select a normal crease angle. Usually 35 to 60 degrees works best. A crease angle of 0 will make the model have flat faces and 180 will make the model appear fully smooth. Then press Recalculate normals
  8. Increase the crease angle and repeat the step above if you want the surface to be smoother.
  9. Once you have settled on a crease angle click on Split faces by crease angle Since splitting faces creates extra vertices the modified model will have a larger file size than the original.
  10. Change material properties if desired.
  11. Go to the OBJ Output tab. Make sure that Fix materials and group names is checked. Then click on Save.
  12. In the export options either save to the same directory where the original model is or check Copy all maps to the same directory if you are saving it to another directory. Poser (at least version 4) needs the textures either in the same directory were the model is or in the Runtime/Textures directory.

Rendering a Poser Animation

  1. Create the animation in poser and save the scene. (PZZ or PZ3 format)
  2. In Poser go to File -> Export -> Wavefront Object and save the animation as multiple OBJ files. This may take a long time for dense meshes and numerous frames.
  3. For this tutorial I will assume that the OBJ files are called walk_0.obj, walk_1.obj, walk_2.obj, ... walk_60.obj with a common material file walk.mtl and a scene file walk.pz3
  4. Start PoseRay and load the Poser scene made up of walk_0.obj and walk.pz3.
  5. Check that there are no missing or incompatible textures by looking at the warning flag on the status text at the bottom. This step will ensure that the materials are properly set and that there are no orphan image maps. Poser sometimes uses TIFF images that may not be compatible with POV-Ray. You can convert them in the materials tab.
  6. Go to the preview and set the camera and lights to what you want. Camera and lights are not animated so they will be fixed during the animation. Then save the camera and lights as a preset by pressing [+] buttons by the preset lists. Make sure that the preset lists have selected the camera and lights that you saved.
  7. Go to the material tab and press Tools... -> Save material file... to save the materials as an MTL file. This will contain the updated material file for the animation. It has the right paths for all the image maps. In this tutorial it will be called walk_materials.mtl.
  8. Set the size of the render in the POV-Ray tab and any other options like Radiosity, etc.
  9. Now from the input tab click on Load... and then Batch... and add ALL the OBJ files from the animation (walk_0.obj to walk_60.obj). You can select several files at once in the dialog
  10. Select Export to POV-Ray (single file - animation)
  11. Check Use common material file and select the material file you saved in the steps above.
  12. Uncheck Use default camera and lights so that PoseRay uses the camera and lights you saved on the preset lists.
  13. Click on Convert... and select the output directory, export name prefix and map export options.
  14. PoseRay will load the files in sequence and once it is finished you can render the animation by loading the ini file in POV-Ray. The name of the ini will be the one that was in the export name prefix. For this case it would by default called batch_process.ini since it uses the first name on the file list.
  15. Once POV-Ray is done rendering the images you can use your favorite program to put all the frames into a movie. You can use VirtualDub for this purpose.

Changing the materials in POV-Ray:

PoseRay can edit some of the material properties but POV-Ray allows you much more flexibility and power. If you want to use some of the nicer materials available in POV-Ray you can modify the *_mat.inc file created by PoseRay. For example the following is a definition from a typical material include file for a material called SkinBody_1:

#declare SkinBody_1= 
material{
texture {pigment {color rgb <1,1,1> transmit 0}} //underlying color
texture {pigment{p_map4} //image map
         normal{p_map5} //bump map
         finish {phong 0 phong_size 30 ambient rgb <0,0,0> reflection{0}}}
}

If you want to use one of the built in POV-Ray glass materials you can change the definition to look like

#include "glass.inc" //M_Glass1 is in glass.inc
#declare SkinBody_1= material {M_Glass1} //use M_Glass1 for the SkinBody_1 material

Creating a morph target for Poser using mesh displacement in PoseRay:

  1. In Poser load the model that you want to apply the morph to. Zero the joints and make sure that the hip, body position and rotation are zero.
  2. Export the body part that you want to apply the morph to as a Wavefront OBJ file. Leave the options in their default state.
  3. Load the body part into PoseRay as an OBJ file and go to the geometry tab and then the displacement sub-tab. Then load the displacement map that you want to use. The map will use the UV coordinates so it will use the same template as a texture.
  4. Enter the displacement values and click on Displace geometry. These values use the same scale as the model.
  5. Save the modified geometry into a OBJ file.
  6. Go back to Poser and select the body part you want to morph. Load the file saved in PoseRay as the morph target and name the morph. Change the dial in Poser to get the morphed geometry.

How do I merge an exported model from PoseRay into an existing POV-Ray scene?

PoseRay can create complete POV-Ray scenes but if you have an existing scene where you want to place a converted mesh then check Only export geometry and material files in the files section of the POV-Ray tab. This option will export POV files with the geometry and the materials only. In your existing POV-Ray scene you can add an include statement at the top of the scene file and call it in the code as shown below. Once the model is loaded as an object{} you can manipulate it inside POV-Ray as any other object.

The example below assumes the geometry was saved into poseraymodel_POV_geom.inc and the materials were saved into poseraymodel_POV_mat.inc. Make sure that POV-Ray can find them when it runs so best place to put it is in the same directory as the main scene file. The materials are called from poseraymodel_POV_geom.inc so there is no need to include an additional call for poseraymodel_POV_mat.inc.

//top of pov file with the existing scene
#include "poseraymodel_POV_geom.inc" //geometry file that PoseRay exported
.
.
//POV-Ray commands here.....
.
.
//call the model that is inside poseraymodel_POV_geom.inc. 
//In this example it is called PoseRayModel (Capitalization matters)
object{ PoseRayModel } //modifiers are accepted
.
.
//end of pov file

How to create a height field from an image map

  1. Load the model poseray_plane.obj. It is in the directory where poseray.exe is located. This plane is centered at the origin, 1 unit by 1 unit and has UV coordinates from 0 to 1 along each edge.
  2. Go to geometry tab and flat subdivide the model several times. This will create a high resolution mesh from the plane.
  3. Go to the subdivision subtab and select the image map you want to use. Enter a min and max displacements.
  4. Press update to deform the mesh.
  5. Do a single smooth subdivision using the default settings. This will smooth out sharp edges.
  6. To smooth out the appearance go to the Faces, vertices & Normals subtab and make the crease angle 180 deg and press update.
  7. The plane is smoothed and deformed. Now it can be textured and used in a render. You can save it as a OBJ file and used in other scenes.
  8. This is a very similar procedure to what POV-Ray does internally with the height_field object. The main difference is that with PoseRay you can control how dense the mesh is and that you can save the deformed mesh.

Tips on reducing amount of memory needed by PoseRay.

PoseRay can take quite a large amount of memory for very complex models. It saves triangles, normals, vertices, UV coordinates and materials among others. The use of the OpenGL ® API also requires memory for maps and display lists.

The settings that will allow you use less memory are listed below:

Tips on POV-Ray render times

Sometimes POV-Ray parse/render may take a very long time. The following items will lengthen the time to get a rendered image:

What types of files can PoseRay handle?

PoseRay will extract polygon meshes from ASCII or binary files. ASCII files can be line terminated by CR, LF or a combination of them. Besides mesh PoseRay will extract the material properties and load any image maps that the model uses if they are present. Although I do not have an extensive list of 3D applications PoseRay has been tested successfully with exported models from 3DExploration, Poser, DAZ Studio, Cinema 4D, AutoCAD, Rhino3D, Wings3D, Anim8or, Xfrog, Blender, Milkshape, MetasequoiaLE, ppModeler, MeshLab and UVmapper. It is difficult to say from which 3D programs PoseRay will recognize the 3D model files but below is a description of how it handles each format to give you and idea.

Wavefront (OBJ) (ASCII)

Geometry: Only groups identified with the g 'groupname' entry will be recognized. Each group in the OBJ file is preserved in the conversion. If the group is reused many times in the file it will be combined into a single group. PoseRay reads the vertex data in vertices (v), normals (vn) and texture coordinates (vt). Weights in these entries will be ignored. The polygon faces recognized are defined by f or fo statements and can have positive or negative vertex indices. If a face has more than 3 sides PoseRay will break it up into triangles but the vertices will be left unchanged. The line entities (l) will be also read and if it has more than 2 vertices it will be broken into line segments. The least minimum that a OBJ file must contain so that PoseRay can load it is a vertex list (v statements) and a face list (f or fo statements) or a line list (l statements). Normals and texture coordinates are optional.
Materials: PoseRay reads the material names from the OBJ file. Then it opens the linked material file (.MTL) and reads the material properties. Materials not used will not be loaded. If a material is not listed on the mtl file PoseRay will use a default white material. If there are polygons with no material calls in the OBJ file then PoseRay will assign a generic material to them called 'poseray_material' and it will be set to default white. PoseRay will recognize the following material commands: Ns, Ka, Kd, Ks, d, tr, map_Kd, and map_Bump. If the material file is not present then all materials will have a default white color but will still be separated by name. The specular exponent (Ns) is taken to be glossiness from 0 to 1 if the file was exported from DAZ Studio or if the materials were read from a Poser file. Ns will be assumed to be an exponent for any other OBJ file. If the model was exported from DAZ Studio transparency mapping will not be visible in PoseRay but it will work in POV-Ray.

AutoDesk 3D Studio (3DS)

Geometry: PoseRay will read 3D studio version 3 or later 3DS binary files although it will try to load any 3DS file. Meshes will be read as a set of triangles linked to a set of vertices and uv mapping coordinates. Each mesh entry in the file will be assigned as a group. Normals are automatically calculated for all the meshes. If the file is truncated PoseRay will try to close the mesh properly. Parenting information is not read. The geometry will be rescaled by the master scale in the file.
Materials: PoseRay will read diffuse, bump and transparency map names (including paths). Surface properties include color, ambient, highlight, glossiness, transparency, reflectivity and bump strength. It can read percent or integer values and 24bit or floating values for colors. If no material definitions are found in the file then PoseRay will create a new material and all the polygons will be linked to this new material. Some 3DS files may have unusually high ambient colors.

LightWave 5 and 6+ (LWO)

Geometry: PoseRay will recognize binary LightWave 5 object (LWOB), LightWave 5 Layered object (LWLO) and LightWave 6 object (LWO2) or later files. The faces will be grouped with the surfaces if there are no layers present. If the file is layered then it will group the geometry by layers. If the layers do not have a name PoseRay will name them "Layer_1, Layer_2,...". Layer offsets are kept after loading the file. If the model uses subdividing patches it can be subdivided in the geometry tab. You can check if the model uses subdivision surfaces by looking at the status text window
Materials: For LightWave 5 files the properties recognized are color, diffuse multiplier, ambient, specular level, reflectivity, transparency, glossiness, color map, bump map, transparency map, projection axis, projection mode, map size, map center and bump amplitude. In case the model is LightWave 6+the same material properties from a LightWave 5 model are also recognized plus map wrapping and map rotation. For LW 6+ files the material is read by blocks and only the first block of each material property will be read. VMAP, VMAD, Planar, cylindrical, spherical and cubic UV mapping are supported. After reading a LWO model you may need to search for the maps using the search tool in the materials tab.

POV-Ray mesh or mesh2 objects (POV, INC)

Geometry: PoseRay can read triangle meshes defined as mesh{} or mesh2{}. UV and normal information is also read. Each mesh is saved as a group. PoseRay can handle comments and other POV-Ray code. Mesh types can be mixed in the same file. Note: This format replaces the UDO import. Models created by Moray can still be imported through the INC files that Moray saves. PoseRay cannot parse any transformations in the mesh
Materials: Because of the complexity of the shading language PoseRay only reads the material entry in the mesh and saves it as a POV-Ray material in the material tab. PoseRay assumes that the materials are defined separately and identifiers are used in the mesh. PoseRay reads the identifiers only. Unspecified materials will default to white.

Virtual Reality Modeling Language - VRML (WRL, GZ)

Geometry: PoseRay has a very limited VRML import function that can read indexed face and line sets from ASCII VRML 1.0 or 2.0 files. Transformation nodes are recognized and modify the vertices as they are read. Each mesh node is saved as a group. All polygons must be closed with -1. PoseRay can also load gzip-compressed VRML files with the extension *.gz.. Predefined shapes such as cylinders, spheres, boxes etc will not be recognized.
Materials: Basic material properties are recognized. Materials saved as DEF statements can also be read. Shape nodes with repeated material nodes will be merge into a common material. Unspecified materials will default to light gray.

AutoDesk Drawing Interchange Format (DXF)

Geometry: PoseRay can recognize ASCII AutoCAD R10 DXF files or later although it will try to read any DXF file. PoseRay can read 3DFACE and polygon mesh entities encapsulated by the POLYLINE entity. Faces with 4 vertices will be broken into 2 triangles. Normals are automatically calculated for both polygon descriptions. Geometry will be separated into layers or blocks where each will be a group.
Materials: DXF files only store the surface color. PoseRay will read the colors by block, by layer or the local color. Materials will be named ACAD_color_# where # is the AutoCAD color used. Default AutoCAD colors from 1 to 255 are recognized. Unspecified/out of range colors will default to white (ACAD color 7).

Polygon File Format (PLY):

Geometry: ASCII format only. If a face has more than 3 sides PoseRay will break it up into triangles but the vertices will be left unchanged.

Raw Triangle file (RAW)

Geometry: PoseRay can read multiple objects in raw format. The file must be in ASCII format and contain a triangle definition per line. A new object will be delimited by having a name at the start of the group of triangles that corresponds to that object. For example a RAW file can be defines as shown below. The x,y,z are the 3D coordinates of the triangles. The RAW file can be space, comma or tab delimited. Blank lines will be ignored.
Wheels
x1 y1 z1 x2 y2 z2 z3 y3 z3
x1 y1 z1 x2 y2 z2 z3 y3 z3
x1 y1 z1 x2 y2 z2 z3 y3 z3
.
.
Doors
x1 y1 z1 x2 y2 z2 z3 y3 z3
x1 y1 z1 x2 y2 z2 z3 y3 z3
x1 y1 z1 x2 y2 z2 z3 y3 z3
.
.
Hood
x1 y1 z1 x2 y2 z2 z3 y3 z3
x1 y1 z1 x2 y2 z2 z3 y3 z3
x1 y1 z1 x2 y2 z2 z3 y3 z3
.
.
Materials: Raw files do not contain material information. All geometry will be linked to a default material. PoseRay can create materials from the groups in the materials tab.

All Formats:

Geometry: If there are polygons without a group name then PoseRay will create a generic group. Any degenerate faces will not be read and any degenerate normals will be set to (1,0,0).

Image Maps:

PoseRay is able to load the following map types:

For formats where vector and raster elements are present the raster part is the only one recognized. If an image has several layers only the bottom layer will be loaded. Any image type not listed above will not be displayed but will be kept in the translation.

Limitations/Known Issues

Help

Warning Messages:

Troubleshooting:

Read the limitations first.

Most crash problems can be traced to outdated video drivers so make sure that you have the latest video drivers for your hardware.

Problem: PoseRay does not work or crashes.
Suggestions:

Problem: I closed the Preview window. How do I get it back?.
Suggestion: Go to the Preview tab and check Enable Preview under the Display options section.

Problem: I loaded DAZ's Victoria and/or Michael model (or derived model) from Poser into PoseRay. The eyes have a frosted appearance.
Suggestion: Go to the materials tab and load a Poser scene file with the proper materials or select eyeball and press Make this material invisible. See this tutorial on how to properly import a Poser scene.

Problem: PoseRay loaded a Poser scene with the wrong texture.
Suggestion: PoseRay automatically searches for the textures using their names only. Paths are discarded. If there are two different textures with the same name PoseRay will load the first it finds. If it loads the wrong one then go to the materials tab and for the wrong map click search. PoseRay will display all the maps in the search paths that it found. Pick the right one from the list. All the other links to the same map will be updated for all materials if you have Auto-update activated.

Problem: Texture has a grainy appearance in the POV-Ray render although the texture is smooth.
Suggestion: Use the recursive high quality (+A0.1) anti-alias setting or decrease the resolution of the texture.

Problem: I used a glass material from the POV-Ray library on a car windshield and the car looks like it is filled with water.
Suggestion: Glass materials work best for objects where there is a front and back surface with some gap in-between. Use a glass texture instead (no interior) such as material{texture{Glass3}} instead of material{M_Glass3}.

Problem: Transparency effects do not look good in PoseRay.
Suggestion: This usually happens with overlapping transparent surfaces. Click on use cutoff on the Preview tab under options. This only changes the preview and does not modify the maps.

Problem: PoseRay gives an error or does nothing with a DAZ Studio script with camera or lighting
Suggestion: The file may be created with a beta version of DAZ Studio. Upgrade to the official release and also make sure that the file was saved as a plain text DAZ script (*.ds).

Problem: Sometimes the POV-Ray render model shows random dark blocky spots on a surface.
Suggestion: POV-Ray has problems with coincident geometry. Two or more triangles taking up the same room in 3D space. Some models may have this problem and you can use the geometry tab and deselect the offending material or group before rendering in POV-Ray.

Problem: Sometimes the model shows artifacts around the edges of shadows.
Suggestion: This is a known problem with mesh geometry in POV-Ray. See section 2.4.8 of the POV-Ray manual for details. I have found that decreasing the light intensity and using some filler lights alleviate this problem. Also if the model is low resolution you may want to subdivide it to make it smoother.

Problem: The POV-Ray render does not match the resolution I typed in PoseRay.
Suggestion: Make sure that the command line box in POV-Ray's toolbar is empty before you render.

Problem: After subdivision the model shows numerous gaps.
Suggestion: Weld the vertices before subdivision to prevent gaps.

Problem: The sky is not blue behind the clouds
Suggestion: Some of the skies have transparent areas and will let through the background color. Set the background color to what you want first and then set the sky.

Problem: The sky is not visible
Suggestion: Make sure the camera is in perspective mode. If you are using a floor check that the camera is not covered by it.

Problem: PoseRay shows black or transparent areas on the model where I know it is not.
Suggestion: The model has normals or winding order in the opposite direction. By default PoseRay displays surfaces with the color in the direction of the normal and applies black to the back. Check on Apply mats to both sides and Draw double sided on the preview tab.

Problem: The textures in the POV-Ray render have a washed out appearance.
Suggestion: This usually occurs with TIFF textures from Poser. You can convert them in PoseRay to JPEG.

Problem: The POV-Ray render has a dark band/shadow over the model and sky
Suggestion: Make sure that a light originating below the ground is not casting shadows. The headlight always casts shadows.

Problem: I apply a map on a model but it does not show or the model just changes color.
Suggestion: The material where the map is being applied does not have UV coordinates. Create some UV coordinates in the Materials tab for that material.

Problem: A model is shown with inverted transparency mapping
Suggestion: Go to the materials tab and check Invert mapping by the transparency map name.

Problem: PoseRay is not displaying reflections
Suggestion: PoseRay uses spherical reflection mapping to give the illusion of a reflective surface. For this to work PoseRay checks for the extension ARBMultiTexture which is available in later versions of the OpenGL ® API. Also there must be an background map loaded (see preview tab).

Problem: I try to re-render a scene in POV-Ray but it renders it very fast and does not update the image.
Suggestion: The Render can be paused option may be enabled in the POV-Ray Render options tab in PoseRay. Disable it and re-render from PoseRay.

Problem: Poser 5 dynamic hair does not show right.
Suggestion: Poser 5 exports hair as line elements. PoseRay can read those lines with no problem but unfortunately it seems that Poser 5 does not export all the dynamic hairs. It only exports the guide hairs. You can go into Poser and enable more hairs before exporting.

Problem: POV-Ray started a render but nothing happens and it seems locked.
Suggestion: POV-Ray takes some time to parse the files before it renders them so it may look like it has stopped responding. Look at POV-Ray's bottom status bar while it processes the file.

Problem: The line mode preview is too slow.
Suggestion: With some OpenGL ® API implementations line preview is very slow. Disable Apply mats to both sides in the preview options to speed this up. Also upgrading to the latest video drivers should help.

Problem: I lost the INI file and want to render the scene with the proper settings. I still have the POV and INC files.
Suggestion: Start POV-Ray, load the pov file. There should be a line in the comments that looks similar to "//+W1016 +H544 +FT +AM2 +A0.3 +UA". This contains the render settings that were saved in the ini file. Right click on that line and select copy "..." to Command Line to transfer them to the command line box in the toolbar. Then press Run and the scene will render with the settings that you wanted.

Problem: I saved the POV-Ray files. How do I render the scene without PoseRay?
Suggestion: Make sure that all the exported files are in the same directory. Start POV-Ray, load the ini file that PoseRay created, clear the command line box in POV-Ray's toolbar and click on render.

Problem: Where is PoseRay's source code?
Suggestion: At this time I will not release the source code. If you need to run PoseRay in Linux or Mac OS you can try an emulator. There are instructions now for setting up PoseRay in Linux using Wine or VMware.

Problem: I see some texture seams on the preview tab. I know my texture is perfect. What is wrong?
Suggestion: By default PoseRay internally resizes the textures before using them in the preview tab. This resizing will degrade their appearance in PoseRay. This will not affect the final rendered image in POV-Ray. If you want to see the textures closer to their actual size change the preview map size option in the Preview tab under options. Then press reload maps to update the preview.

Problem: The POV-Ray render is too dark.
Suggestion: Use more lights, increase the light intensity or enable radiosity.

Problem: Cannot get Moray 3.5 to work with POV-Ray.
Suggestion: Read this section for tips on getting Moray to work.

Problem: The geometry is too small/big or aligned wrong.
Suggestion: Use the scaling, translation and rotation tools in the geometry tab.

Problem: I exported a OBJ file from Poser 3 but it does not have any materials no matter what options I select.
Suggestion: Unlike Poser 4, Poser 3 does not export MTL files but it will include the material calls in the OBJ file. Make sure that the version of Poser that you are using has been updated to the latest revision. Go to Smith Micro for free revision updates available for Poser 3 and later.

Problem: How do I make the POV-Ray files portable?
Suggestion: If you want to render the scene in another system when you export the files select Copy all maps to the same directory. This will place all maps in the same directory and will not include any path information in the POV files. Copy the .ini, .inc and .pov files and all the maps into the same directory into the other system.

Problem: I loaded a set of materials from a Poser file but it does not set all the materials right.
Suggestion: See the limitations.

Problem: I just loaded a model and it looks too bright (or just white).
Suggestion: This usually happens with 3DS models. Sometimes they have a very high ambient color. Go to the materials tab and increase the glossiness and make the ambient color darker. To do it for all materials right click over the material property and select apply to all materials.

Problem: The POV-Ray render is just a solid color or just black
Suggestion: If you are using a floor check that the geometry is not below it. If the scene is inside a closed room do not use parallel lights. The enclosing room will not let any light in. Use point, spot or area lights and make sure that they originate inside the room or make the room not cast shadows in the materials tab.

Problem: I created a scene in Poser with the built-in props (cone, box, ball, etc) and when I export them I only get one material: 'preview'. I had every object with different material properties now all of them use the same material.
Suggestion: This is a limitation of how Poser exports .OBJ files. In poser the material name for each built in prop is 'preview'. When the file gets exported all the materials get merged into the same because they use the same name. This only occurs with props, figures are immune to this. You can import the scene into DAZ Studio and export it again in OBJ format. DAZ Studio keeps the names separate.

Problem: PoseRay seems to hang while reading camera, material or light information from a Poser file.
Suggestion: PoseRay may take a long time while searching for the camera and light information contained in large .PZ3 files. It may take longer if the file is a compressed file (.PZZ). This may give the impression that PoseRay has stopped working but it is still searching just give it a minute or so to search. In a 23MB file PoseRay can take about 20 seconds to search for the camera. The speed also depends on your system.

Problem: I used a sky but the POV-Ray render shows it repeating below the horizon.
Suggestion: POV-Ray skies work best with the ground visible. Activate the ground (in the Preview tab under options) before exporting the POV-Ray scene.

Problem: How can I get the cool effects with environmental maps using PoseRay?
Suggestion: POV-Ray does not support environmental maps but you can get the real thing using reflectivity. Turn the reflectivity of the material to more than 30% and set the glossiness to about 50%. Add a sky so that the material reflects it. If you enable metallic make sure that the pigment color is not too dark or it will barely reflect.

Problem: Reflective surfaces look too bright in POV-Ray.
Suggestion: Background color will reflect. For example if you have a reflective ball and a white background the ball will look almost solid white. Try using a darker background if possible. A sky will reflect nicely also and it can be added in the preview tab.

Problem: I can't get a texture to line up properly in POV-Ray.
Suggestion: In some models if two coincident surfaces are textured POV-Ray may select the wrong one to display. Removing the texture that is a problem may help. If the texture is the same for both meshes then try to remap the UV coordinates of the model. UVmapper is a good program for that.

Problem: I get the following message in POV-Ray: I/O restriction prohibits read access to 'texture name...'.
Suggestion: Just click OK and POV-Ray will have access to the texture. If you want this to be permanent disable restrictions in POV-Ray using the POV-Ray Options menu and selecting Script I/O Restrictions -> No restrictions.

Problem: I get this error in POV-Ray: Expected 'object', keyword found instead.
Suggestion: This is because of the name of the .POV file and/or the mesh object is using a POV-Ray reserved keyword. For example if your object is called 'sphere' it will give you an error in POV-Ray since 'sphere' is a reserved word. Section 3.1.1.1 of the POV-Ray manual lists the reserved words.

Problem: The camera in PoseRay does not match my Poser settings.
Suggestion: Use another camera in Poser. PoseRay only recognizes the MAIN, AUX, TOP, BOTTOM, LEFT, RIGHT, FRONT and BACK cameras at frame 1. Any others will default to the MAIN camera.

Problem: POV-Ray gives me an error saying that it cannot read an image map.
Suggestion: POV-Ray will not read interlaced GIF maps. You can convert them to another format in the PoseRay materials tab. Also POV-Ray will not load the map if its filename contains any non alphanumeric ASCII characters used in languages other than English. You can resave the map with a different name in the materials tab. The image may also be corrupt or using a variant of the image type not supported.

Problem: Lights with no shadows look strange in POV-Ray.
Suggestion: POV-Ray handles shadowless lights as fill lights and enhance the lighting in the scene but do not render highlights.

Problem: Moray does not display the UDO model.
Suggestion: Decrease the UDO detail level in the scene settings. Usually 10% works.

Problem: Some of the materials in the mtl file are not listed in PoseRay.
Suggestion: If the OBJ file does not require the material PoseRay will not load it from the mtl file.

Problem: Some of the groups listed in the OBJ file are not listed in the PoseRay output.
Suggestion: If the group does not contain any polygons it is not included in the output.

Problem: PoseRay does not do anything with the OBJ or DXF file and sometimes it hangs or gives me an error.
Suggestion: The file may not be an ASCII OBJ or DXF file or the file may be locked by another application.

Problem: PoseRay loads a DXF, RAW or UDO file but it is faceted (not smooth)
Suggestion: Go to the Faces, vertices & normals subtab of the geometry tab and check on weld vertices and calculate normals. Then press update. That should smooth the model. If it still has too many hard edges increase the crease angle and update again.

Problem: I have a very large model with a million triangles and I keep running out of memory.
Suggestion: See the tips on reducing memory requirements.

Problem: I made a mess of the options and cant get PoseRay to its default state.
Suggestion: Select Reset Options on Close in the input tab and close and restart PoseRay

Problem: I can't find the solution to my problem here! / I want to submit a bug report
Suggestion: If you have problems with PoseRay or have suggestions send me a message to flyerx_2000@yahoo.com Check the PoseRay site https://sites.google.com/site/poseray/ to see if there is a new version available.

Acknowledgments

I would like to thank all the people that have reported bugs and tested PoseRay.

PoseRay uses the following:

Legal information and License