This site hosted by Free.ProHosting.com
Google
Taelon's gmax Resources
News Import/Export Tutorials Links


gmax Rendering

Introduction Scene Scaling gmax to YafRay v1.2 Renders & Links


YafRay-Export v1.2

The gmax to YafRay Exporter v1.2 contains a number of new features to make it more user-friendly. The scene is scanned prior to exporting and any errors are caught and reported before the export process will begin. There are still a few limitations to be aware of, since it is possible to export scenes that will not show up, or show up wrong in the final render.

    Your scene needs 3 things to be exportable and renderable:

  • An object with a valid material assigned to it. I recommend using the new YafRay Material, it can be exported as a YafRay compatible shader and gives far more control over the rendered result than Standard Materials do. Objects with multi-materials or no material assignments will halt the export process, a list is created and shown in the listener window.
  • A camera. The exporter will switch the current viewport to a camera port as long as one exists. If no camera is found the export is halted and an error message displayed.
  • A Light. If no lights are found the export is halted and an error message displayed.

    Limitations

  • Multi-Materials are not supported (yet). You'll need to detach or break apart your model according to your material assignments and apply the materials to the new objects, or simply assign a single material to the whole model temporarily for rendering.
  • Only .JPG and .TGA Material Maps are supported by YafRay. The exporter currently only checks for a valid material assignment, it doesn't yet check for non-renderable textures. You'll need to replace any .BMP or .PSD materials with an equivalent .JPG or .TGA material for them to show up in the render.
  • Only real UVW Mapping is supported. UV mapping that is assigned through the material editor isn't seen by the exporter. You'll need to ensure that your maps have real UV coordinates assigned and mapped using modifiers to render properly.
  • YafRay uses a much smaller scale than gmax. Most scenes will need to be scaled 10% to 1000% and/or have light multiplication of 10 to 10000 applied to render correctly. This can be quickly set with the Scale All Units and Light Multiplication spinners for trial renders. The new "Get Extents" function can also be used to set the proper gmax System Units prior to exporting, and is explained below and in greater detail here.

New YafRay Export Utility Panel

Main Rollout


ye12main


mini_listener
The new main panel is shown in the default state with 2 open rollouts.
The other segments start rolled up to conserve space, their open states are shown later.

    The first open rollout is for adjusting the main Rendering parameters.

  • Scale all Units: Adjusts the scale of the objects as they are exported.
  • Light Multiplier: The lighting multiplier is applied to all scene lights at export.
  • AA passes: Sets the number of AntiAlias passes YafRay performs when rendering.
  • Raydepth: Sets the number of bounces YafRay will calculate during rendering.
  • bias-Value: Sets an offset for the starting point of shadows relative to the objects.
  • - Rendering Size -
    Specifies the size of the image YafRay will create during the rendering process. Larger images take significantly longer to render, remember that a 640x480 image has 4 times as many pixels as a 320x240 image. Pick from common 4:3 aspect ratio sizes, or specify a custom size from 100x100 up to 4000x4000.

    The Export rollout contains options for customizing the exporting process.

  • Notify: When enabled, a message box will pop-up to indicate when data export is complete and ready to be grabbed.
  • Win98: Causes the listener window to open at the start of the export, also removes the Background image filename that the gmax file select dialog passes to the listener window which occurs in win98/ME systems.
  • File Output Path: Specifies the destination file path for the grabber to use when it creates the .xml file. (Defaults to \GMAX\Meshes\ folder). The text box displays the path & filename and can also be edited directly.
  • Image Out Path: Specifies the destination file path for YafRay to use when it creates the rendered image. (Defaults to be the same as the File Output Path.) The text box displays the path & filename and can also be edited directly.
  • Get Extents: When highlighted, pressing the "Export Scene" button will search for the min & max dimensions of all the non-hidden objects in the scene (not including lights, cameras). It then calculates the gMax System Unit Scale that should be used prior to exporting the scene to YafRay, & displays the recommendation in the listener window.
  • Draw Box: A box representing the scene extents will be created during "Get Extents" if checked, useful in test renders for verifying lighting setups.
  • Export Scene: Begins the process of converting the scene data into a YafRay compatible .xml file. The button remains "pushed in" while data is being sent to the listener window. It is also used to initiate the "Get Extents" function.
Note: When data is being exported All gmax controls are disabled and viewports are not refreshed, you can verify the exporter is working by checking the mini-listener window in the lower left corner of the gmax interface.



About Paths & Filenames Once you've set the Data and Image paths you normally won't need to reset them unless the export utility is closed. The data and image filenames default to the scene name, and always use the same name. This allows you to quickly export a series of data files and the embedded image names will stay in-sync. i.e. You might have an animation that you want to render so you would export \Box01, then advance to the next frame, change the file name to Box02, export & grab it, rename it to Box03, export & grab, etc. Then you could run YafRay to render the files Box01.xml, Box02.xml, etc. and the rendered image names will be Box01.tga, Box02.tga, etc.

Topmost Rollout

ye12_GIroll


This rollout contains all the options for setting the Global Illumination properties.
GI is one of the key features in the YafRay renderer, it allows you to create renders with soft shadows rather than the hard edged shadows common with basic ray tracing.

These options are explained at xzzy's web site.

Remaining Rollouts

ye12_Filters&BG


These rollouts contain the options for the 2D Filters and Background properties.

These options are explained at xzzy's web site.

The default parameters for the script can be changed using notepad to customize your installation of the exporter. Near the top of the file is a list of the default values, here is the beginning of the parameter block...

    -- Edit the parameters below to customize the startup settings

  • -- render parameters
    local unit_scale = 0.10
    local light_pow = 50.0
    local aa_passes = 1
    local ray_depth = 5
    local bias_val = 0.3
    local auto_smooth = 45
    local cust_width = 1024
    local cust_height = 768
  • -- export parameters
    local notify = true
    local win98 = false
    local extents = false
    local drawbox = false
    local exp_scene = "Data Sent to Listener\n Grab it!"
    local file_path
    local img_path

If you want to change the utility to start with Scale All Units: 1.0, change the line;
local unit_scale = 0.10      to    local unit_scale = 1.0

To change the default Light Multiplier value to 250, change the line;
local light_pow = 50.0      to    local light_pow = 250.0

If you want to set the default data export path, change the line;
local file_path      to    local file_path = "G:\Yafray\Exported"
or whatever directory you desire, note there is NO trailing slash in the filepath.



Sample gmax/yafray renders & links to tutorials

top of page



 



All content is Copyright © Taelon 2004, unless otherwise noted.
Updated on 13-Apr-2004