Olaf Corten's Tips & Tricks for Pro/ENGINEER: Image Creation

Pro/ENGINEER Tips & Tricks: Image Creation

- Last modified: Jun 23 2003 -

This page is a compilation of tips & tricks related to Pro/ENGINEER. They are not necessarily my own ideas. Use them at your own risk.

Image Creation


Creating an image of your Pro/E model

There are several ways to create an image of your Pro/E model:

The above described methods are fast but deliver images of a low resolution.

You can create HIGH resolution images of your Pro/E model by creating a Postscript file and converting it. Create a 400 DPI Postscript file through:
#view #cosmetic #shade #display #PostScript #Phaser II PX #Resolution #400 DPI #Output to PS
I am using the following three programs to convert shaded Postscript files to an SGI .rgb image.

  • Since R17 (Postscript level has changed from level 1 to 2) I use the Netpbm utilities founded by Jef Poskanzer. They are a 'net cooperative effort of many individuals'
    These are available from the freeware CD of SGI. The package is intended to be portable to many platforms.
  • psrender
    Converts Postscript files to SGI rgb images only.
    An executable for SGI is available at:
    ftp://ftp.sgi.com/pub/graphics/psrender.Z
    In order to use psrender install the following sub-systems
    x_eoe.sw.xdps
    dps_eoe.sw.dps
    dps_eoe.sw.dpsfonts
    In OCUS you will find pstorgb which does this for you.
  • Ghostscript v 3.33
    Very powerfull Postscript viewer, printer and converter to many other formats available for many platforms.
    For more info check the URL
    ftp://ftp.cs.wisc.edu/pub/ghost/
    An inst installable version for SGI is available at:
    ftp://ftp.sgi.com/pub/sgi/ghost/ghost.tar
    NOTE: I am still looking into this, but I get erronous sgi images if I use the sgirgb device. I am currently using the ppmraw device and convert that to sgi images using fromppm.
    In OCUS you will find ps2rgb which does this for you.
    NOTE: Ghostscript version 3.3.3 offers a utility called ps2epsi, whichtakes an input postscript file and generates a new output file which conforms to Adobe's 'Encapsulated Postscript Interchange' or EPSI format. This is a special form of encapsulated postscript (EPS) which adds a bitmap version of the final displayed page (in the form of postscript comments) to the beginning of the file. This bitmap can be used by programs which understand EPSI (usually word processors or DTP programs) to give a preview version of the postscript on screen. The displayed quality is often not very good (eg. low resolution, no colours), but the final printed version uses the 'real' postscript, and thus has the normal full postscript quality.
    By default Pro/ENGINEER exports Encapsulated Postscript. This means that a bounding box has been added to the original Postscript file so the DTP program knows which size the image is, but not what it looks like.

Finally you can use Rendering programs to create even better quality images. I am using the freeware program POV-Ray. Another option off course is using the PTC module Pro/PHOTORENDER (but that's not freeware).

First you need to create render files from your Pro/E model:
#interface #export #render
Now convert these files to POV-Ray files with the OCUS script pro2pov
And now comes the difficult part. Create a POV-Ray scene.
This is freeware so don't expect a neat user interface. Study the documentation and examples of POV-Ray. For more info check out the POV-Ray Home Page and check out my GALLERY for example images.


Creating Pro/E models with 'see-through' covers

This image has been created by combining snapshot images of Pro/ENGINEER. It shows one module of the AMS-M machine of Fico Molding, Zevenaar, The Netherlands. The machine was chosen as the 1997 Dutch Pro/AWARD Winner at the Dutch Pro/ENGINEER Users Conference on nov. 27th 1997 in Delft.

The complete machine consists of approximately 2500 Pro/E models (750Mb) which is too large to display on our best workstation. So I made seperate images of each module and combined them using imaging software. Unfortunately this total image shows too much details too put on the Internet ;-).

The above image is a result of a method I used to create an image of one module with a "see-through" cover. This can be difficult to accomplish with Pro/E since you have to redefine the transparancy of each color which the cover is using and these colors should not be used by other models inside the machine otherwise they will become transparant as well.

Our software department wanted images which they could use in the Man-Machine-Interface and in the on-line manuals. The idea was to create images where you could see the entire machine and highlight a few components to let the machine operator know where, for example, an error has occured.

The next section describes how to make such images for an example master assembly. The commands used are specific for Silicon Graphics workstations (you will have to install eoe(2).sw.imagetools in order to use some of the imaging tools), but perhaps you can use other imaging tools if you are running on different hardware.

What I do is the following:

Retrieve the master assembly and create six offset datum planes (for each direction two) which lie way beyond the outer limits of the entire assembly. Zoom Reset will now make your assembly a tiny model in the middle of you main screen. Now zoom in on the assembly so that it fills the main screen. Save this view with #view #names #save. Name it "3D". This view will now always stay as it is regardless of how many parts are shown of the assembly.

Make the Pro/E background white by toggling the system colors (#misc #system colors #alternate). Shade the assembly and make a snapshot of the complete assembly. You can do that with the snapshot utility. Make sure to draw the rubberband box only this once and don't change it from here. Draw it around the assembly. Save the image to main.rgb.

Now create an image of all models which are inside the machine. Create a Simplified Rep which has all the cover models excluded. Shade the assembly and retrieve the view name "3D". Make another snapshot and name it inside.rgb.

These two images will be used to create the master image.

Now you can create images for every model you wish to highlight. For instance all models with "air" in the name. Create an Exclude Simplified Rep and only include all models with "air" in the name. You can do this by selecting these models #By Rule; #Model Name; *air*. Again shade the assembly, retrieve the view name "3D", create a snapshot image and name it air.rgb.

You can create countless other examples of yourself.

Here is where the trick starts:

The master image is created by combining the cover image and the image of everything that's inside. First I'm scaling the colors in half to make sure I get 100% again when I add the two images.

	% cscale cover.rgb tmpfile1.rgb 128 128 128
	% cscale inside.rgb tmpfile2.rgb 128 128 128
Now overlay the images:
	% add tmpfile1.rgb tmpfile2.rgb all.rgb

So this is the master image for this module. I created one like this for each module of the machine and combined those images into one image.

Now we create the image where all *air* models are highlithed by overlaying the master image with the "air" image. Use different scaling factors to let the air image pop up a little more.

	% cscale all.rgb tmpfile1.rgb 100 100 100
	% cscale air.rgb tmpfile2.rgb 156 156 156
Overlay the images again:
	% add tmpfile1.rgb tmpfile2.rgb all_air.rgb


Changing the background color of a Postscript image

As from R17 Pro/E puts the Pro/ENGINEER background color in the shaded Postscript file. You only need to add the folowing line to your config.pro:

SHADED_POSTSCRIPT_BACKGROUND YES

Prior to R17 you need to edit the Postscript file to change the background color of a Postscript file. There is a small but important difference between R15 and R16.

In the postscript file there is a section like below.

You need to edit the following line ----+
					|
	DisplayImage			|
	90.000000			|
	28.080000 -555.840000		|
	735.840000 555.840000		|
	1022 772			|
	182				|
	FFFF00				|
	FF0000				|
	FFFFFF	<--------- R15 ---------+
	0000AA	<--------- R16 ---------+
	etc.

This line indicates the Red, Green and Blue hex color values for the background:

	FFFFFF is white
	000000 is black
	808080 is 50% gray
	0000AA is 66% blue (Pro/E default)
In OCUS you will find the script
ps_change_background which does this for you.

HOME | Links | Tips & Tricks | OCUS | Who am I? | Gallery | Search | Miscellaneous | Dutch Pro/E Users Group

Olaf Corten © 1995-2003



Click to receive email
when this page changes
Powered by NetMind