Wings 3D Development Forum
POV-Ray - Tips - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Off Topic (https://www.wings3d.com/forum/forumdisplay.php?fid=11)
+---- Forum: Renders tips (https://www.wings3d.com/forum/forumdisplay.php?fid=17)
+---- Thread: POV-Ray - Tips (/showthread.php?tid=101)



POV-Ray - Tips - micheus - 12-10-2012

I'll share some items I have "discovered" by playing with POV-Ray tha can be useful for someone else:
  • the object Ambient light used by Wings is not exported to POV-Ray (see next item); (it's available nowadays)
  • the value of parameter global_settings->ambient_light in the .pov file comes from POV-Ray exporter dialog -> Emissive Filter;
  • in case you has noticed that the value of the property ambient (from material) has no effect in the final result, take a look at .pov file and check if its value is 0 (wings default value is 1). If we want that value be exported is necessary to uncheck the field Use material Emit for POV-Ray Ambient in Edit -> Plug-in Preferences -> POV-Ray;
  • wings and POV lights equivalence: spot = spotlight or cylinder; area = area_light; infinite = parallel; pointer = "generic";
  • there is the possibility to set a light for not produce shadows by using shadowless property; (but, we need to hack the .pov file. This option is not present in the light object in Wings - I want add some new features not implemented yet)



Image Plane without light influence - micheus - 12-10-2012

An example about how to use an image plane without get any light influence. (download)
Basically we need to set these properties below in the Material dialog:
  • Ambient = 1.0
  • Diffuse = 0.0
  • Specular = 0.0
and using the information in the 2nd and 3rd item above (global_settings->ambient_light = <1,1,1> //white)

I did some tests with some varying of values. For all of them the values for Image Plane (with UV-map) was as follow:
Code:
texture {
...
     finish {
         ambient rgb <1.000000, 1.000000, 1.000000>
         diffuse 0.000000
         brilliance 0.000000
         metallic 0.000000
         specular 0.000000
         roughness 0.000000
     }
}

Light test 1
global_settings: ambient_light <1, 1, 1>

Pink sphere
Code:
texture {
...
      finish {
        ambient rgb <0.000000, 0.000000, 0.000000>
        diffuse 1.000000
        brilliance 1.000000
        metallic 0.000000
        specular 0.8
        roughness 0.000000
      }
}

Metalic sphere
Code:
texture {
...
      finish {
        ambient 0
        diffuse 0.5
        phong 1
        phong_size 100
        reflection 0.25
      }
}

Floor
Code:
texture {
...
      finish {
        ambient 0
        diffuse 0.4
        phong 1
        phong_size 100
        reflection 0.25
      }
}
[Image: Teste%20Luz%201.png]


Light test 2
All parameters preserved, but Ambient became to contribute with 10% in the objects colors.

Pink sphere
Code:
ambient rgb <0.100000, 0.100000, 0.100000>

Metallic sphere
Code:
ambient 0.1

Floor
Code:
ambient 0.1
[Image: Teste%20Luz%202.png]


Image Plane without light influence - micheus - 12-10-2012

Light test 3
global_settings: ambient_light <0, 0, 0>

Pink sphere
Code:
ambient rgb <0.000000, 0.000000, 0.000000>

Metalic sphere
Code:
ambient 0

Floor
Code:
ambient 0
[Image: Teste%20Luz%205.png]


Image Plane without light influence - micheus - 12-11-2012

Now all mixed and using global_settings - ambient_light set to white:
[Image: ambientbranco.jpg]
The material settings of the left image Ambient was set to 1 and for the right one it was set to 0. (the spheres and floor has its Ambient set to 0.2 and 0.4, respectively)


Extending power of the plugin - 1 - maker - 12-26-2012

Pov-ray has a huge amount of free objects as "include files" (= instances / reference objects). This is an easy way to add objects at render time, without adding to the modelling load.

[I'm assuming you know the basics of editing with Pov-ray Smile]

Here's an example.



Initial rendering in Pov-ray of a simple house with "placeholder" objects (red circles.) These are simple objects only used to get the "centers" to place trees in Pov-ray. The "trees" are renamed tree_1, tree_2 etc.



Fire up Pov-ray editor and search for "tree_1" (exported as w0_4_tree_1)... Copy the "position" of <x, y, z>

Here I've "inserted" a palm from Lohmueller's Ready-made Object Collection. Then I pasted the previous position to the "translate <>" field. Repeated 4 more times for the other "trees"...

A few more tweaks to the size, rotation etc...
.


And there you are. Pov-ray has a lot more to offer than my limited talent can show. Try it Biggrin


Enabling Caustics... - micheus - 04-22-2015

To get caustics in POV-Ray, besides to enable Photons for lights and the desired material, you may need to increase the Photons Count in the export dialog as shown bellow:
[Image: POV-Ray-Caustics.jpg]

An other thing you may need to change is the material shine. Very polished material can't be set in Wings3d. Even you set Shiness to 1.0 the exporter will set the roughness parameter to 1.010000. In order to get a very polished material you need to change this value to something like roughness 0.010000 and the result you see in the image bellow - the light shine in the glass is smallest compared with the previous one that are looking like plastic:
[Image: POV-Ray-Shine.jpg]


Spectral Rendering with POV-Ray - micheus - 02-03-2018

There is a pack of macro called Automatic Light System for POV-Ray to automate the task of creating a light source, specifically the aspects about color, intensity and fading. (see the link for details and download). I used the test scenes and the light becomes awesome.

It includes the files that are part of another macro Spectral Rendering with POV-Ray (use the link to see more details and download latest files - the other pack includes the old ones)

They help to produce excellent lighting:
[Image: demo_indoor1-skylight.png]
Incandescent, Fluorescent and Skylight

[Image: test_lightsys.png]
Incandescent 60w, Warm White Fluor, Cool White Fluor, Halogen and Standard Illumination

To use them in a scene it will be needed to edit the exported file to include the call to the macros.


RE: POV-Ray - Tips - micheus - 09-30-2020

I'm going to let here some information about the Lights and Render dialogs which can be a start point for someone creates their settings.

It's not a technical information. For that, please, take a look at the POV-Ray 3.7's Reference Table of Content. It explanes in details how the light works in POV-Ray.


Render dialog

[Image: W3-D-POV-Ray-Render-dialog-01.png]

The most common elements to be changed are in General option, Lighting and Camera tabs:
  • General option
    • Subdivision - allows to smooth the object before send to the render, instead of do that in the Wings3D project if we are working with a low poly object;
    • Export UVs - should be checked if any material has UV map assigned;
    • Export Normals - checked by default, but if omitted POV-Ray will compute it by it self. It can reduce the file size, but you have no 100% guarantee it will be using the same values as Wings3D;
    • Transparent Background - the background colour will be replaced by a transparency. This allow us o create images that can be composed in other graphic editors. We must to choose a file format that uses the alpha channel (like: png and tga);
    • Background - defines the background of the scene - it's the colour that fills the environment;
    • Anti-Aliasing - used to refine the final image by smoothing jagged edges on curved lines and diagonals;
  • Lighting
    • Photons - we can enable it and set our own Count value when our scene have materials like metal, glass or we enable the Atmosphere settings. Very higher values give us better results in caustics and reflections, but it also increases the render time - it's a good idea increase values like this for the final render only;
    • Subsurface Light Transport (or Subsurface scattering) - must be enabled when we enable this property in a material;
    • Radiosity - it will give the image a better look by using the environment settings and increasing the illumination of the scene. Usually the Normal preset option give us a good result. We also need to enable it if we want the caustic effect to appear;
  • Dimension - we can choose a predefined dimension from the preset list or enter with a customised one;
    • Camera


The lights properties can be accessed in the Outliner window, expand the Lights node, select the light and in the context menu select Property.

Area light dialog

The area light is one of the lights that will allow us to add soft shadows to the scene. The appearance of the shadows produced by this light will depend on a set of factors like its dimension, number of the light matrix (default is 2x2), and others.

[Image: W3-D-POV-Ray-Area-Light-dialog.png]
  • Power - will be an influence for any kind of light. If a scene has a couple of lights, we may need to decrease power in order to balance the scene lighting;
  • Photos - if our scene will requires we to enable photos on Render dialog we probably will enable it here too;
  • Size - defines the light matrix. The panel size is defined by the object on the geometry window and it's manipulated just like a regular mesh object;
  • Adaptive mode - it will enable the checkbox following it. For a better shadow result we usually will enable it and Jitter at least. The different mode usual don't change as much the result - so, I use to select Adaptive 1.

Here is a sample scene with differents parameters of an Area light added progressively (see yellow note on each frame):
[Image: W3-D-POV-Ray-Area-Light-settings-01.png]

and here, the same scene - using the settings on the 4th frame, but now with an array of 10x10 - plus the basic Render parameters we can set to improve the result. It was rendered without and with Radiosity enabled. Notice the background colour has also influence on the scene lighting:
[Image: W3-D-POV-Ray-Area-Light-settings-02.png]

* More to come when I have some free time. Smile