Rendered Surface Views of Ship Geometry

Part Maker SURFACE and RENDER commands produce a rendered image of the geometry either as an interactive visualization or as a JPEG file. The Visualize command in Section Editor and Display produces an interactive visualization of a particular part.

Additionally, the wizard RENDER.WIZGF is provided, which presents options for part/component selection, opacity, and colors. It also provides for multi-body visualizations where the models from two or more geometry files are rotated and positioned as desired. These rotations and positions may be driven by files produced during a Multi-Body project.

GHS is not dedicated to a particular rendering engine. If none is provided by the user, it installs a selected third-party rendering software program when PM, PMX, or RENDER.WIZGF is exercised for the first time. It automatically downloads this software from the internet.

The connection to the rendering software goes through RENDER.BAT, which must reside in the GHS program folder. If RENDER.BAT exists, GHS takes it as the sign that suitable rendering software has been installed, and it executes RENDER.BAT, feeding it the name of the file that contains the surface information for the model to be visualized.

Three parameters are passed to RENDER .BAT:
1. The path to the file that contains the function calls representing the geometry surfaces;
2. The name of the file to receive the final script to be passed to the rendering software;
3. The character C, which can be used as a switch.

If the computer happens to have the same rendering software installed for another purpose, it is recommended that the version provided for GHS be installed also because there may be differences that impact the performance. For example, a Python-bound version of VTK may be provided by GHS. In that case, if Python VTK already exists on the computer, it is recommended that the user allow GHS to install its own version (in a different folder). If the user wants to try using the existing version, the path to it can be substituted during the installation process.

The surface data that GHS produces is in the form of a text file and consists of a series of function calls. In order for this file to be processed, the functions have to be written such that they feed the data to the rendering host. A simple arrangement is to append the surface data file to a header file containing these function definitions. Various formats for different languages are supported through the STYLE file.

Note regarding the VTK-Python/OpenGL rendering engine:

By default, depth peeling is activated. On some computers this may not work properly. In order to turn it off, make the following GHS run:
me (report) ^^VTKHEAD.ADD
me "depthsort=False
me "depthpeel=False
me (report) OFF

Function Specifications

Since these functions are processed by software that is not part of GHS, it is the policy of Creative Systems to avoid making changes in the function specifications. In the event that a function specification must be revised, the user need do nothing if the rendering software was installed by GHS; but if the user has provided the rendering software and written the functions, the user must make the necessary adjustment to meet revisions in the function specifications. Any change in function specifications will be noted.
GQPart("partname", class, "color", spgr, load)
Introduces data for a part
class - 0: Hull, 1: Appendage, 2: Superstructure, 3: Sail, 4: Rigging, 5: Tank, 6: Compartment
color - name or number
spgr - specific gravity of tank contents
load - tank load fraction

GQComp("componentname", effect, opacity, red, green, blue) Introduces data for a component within the preceding part effect - effectiveness factor (permeability factor for tanks and compartments), negative for deductions red, green, blue - colors on a 0.0-2.0 scale

GQPt(quad index, point number, x, y, z ) Provides the coordinates of one point within a quad of four points quad index: 0 - 3 point number: zero-based sequence number within the component

GQComp("", 0., 0., 0,0,0) Finalizes the component

GQWpl(heel,trim,depth) Specifies a waterplane (optional)

GQFinal(winx, winy, "capture filename", mag, azimuth, elevation, zoom) Finalizes the file winx, winy - visualization window size in pixels capture filename - name of JPEG file (screen-only if absent) mag - magnification factor pertaining to capture file azimuth, elevation - initial azimuth and elevation angles in degrees zoom - initial zoom factor

The STYLE file

Both the SURFACE and RENDER commands support the parameter,
This optional file specifies certain syntax elements of the functions as they are written on data files as well as parameters pertaining to the rendering process.
Line 1: character preceding function name (example: blank line)
Line 2: character preceding parameter list (example: left paren)
Line 3: character after parameter list (example: right paren)
Line 4: extension of header file (example: .PY)
Line 5: batch file name (example: RENDER.BAT)
Line 6: install file name (example: RENINST.LIB)

Copyright (C) 2016 Creative Systems, Inc.