Creating Your Own Props 2
Remove Geometry Information From the pp2 File


 

In this tutorial you will learn how to remove the geometry information from the Poser prop file (pp2) and add a reference to the original obj file. This tutorial will use the same "Star Trek Communicator" prop that we used in the previous step.

Before we begin, though, you're probably wondering why you would want to remove the geometry information from a pp2 file. There are two main reasons:
1) Using an externally-referenced obj file saves memory resources. Whenever you load an object into the scene, Poser has to read the geometry information for the object. If you use the same object more than once in the scene, it is much more efficient for Poser to read one obj file than to re-read the same geometry information for each copy of the object.
Second, if you save the scene, the geometry information for the prop will be saved within the scene file... again, it is much more efficient to have a one-line reference to the obj file rather than hundreds of lines of geometry data.
2) Using an externally-referenced obj file prevents accidental redistribution. For example, if someone wants to make a Poser 4 (or Poser 6) version of your prop, they would release the pp2 file. If your pp2 file contains geometry data, then the person has now given away your prop. However, if your pp2 file references an obj file, then the end-users would need your obj file to use the new version of the prop.
3) An obj file can be loaded into a UV-mapping program and the map can be adjusted or exported as a template... Poser's pp2 files can not be opened in a mapping program.
• Note: this tutorial assumes you still have the original obj file from which the prop was created.


Applications used:

 Poser (any version)
 NotePad, WordPad, or any text editor

Steps:

1. Find the pp2 file and open it in a text editor.
• Using Windows Explorer, find the folder that contains the prop file you want to change. Look under the Runtime\Libraries\Props\(your folder).
• For this example, we saved the "communicator.obj" file under Runtime\Geometries\JHoagland.
• Open the pp2 file in a text editor. Note: you may have to right-click and select "Open With" and select NotePad or WordPad.

2. Edit the pp2 file.
• When you first open the pp2 file, it will look something like this:

{

version
	{
	number 4.01
	}
prop communicator:1
	{
	geomCustom 
		{ 
		numbVerts    200
		numbTVerts    237
		numbTSets     1092
		numbElems   364
		numbSets    1092
		...

The "version number" should be set to 4 (or 4.01) for use in Poser 4.
The "geomCustom" lines are the geometry for this object and need to be removed.
• Scroll down to below the geometry information... the easiest way is to do a "Find" for the word "name". The section of code should look something like this:
		...
		f 65/227 60/226 198/225
		f 198/225 199/223 200/235
		f 200/235 110/217 65/227
		f 65/227 198/225 200/235
		} 

	}

prop communicator:1
	{
	name    communicator
	on
	bend 1
	dynamicsLock		1
	hidden		0
	addToMenu	1
	castsShadow		1
	includeInDepthCue
	...

The "f" lines are "facet" information and mark the end of the geometry information.
We will need to delete all of the lines above the line "prop communicator:1"

3. Delete geometry information.
• Put your cursor just above the "prop communicator:1" line.
• Hold down the Shift and Control keys and press the Home key- this will highlight all of the text from your cursor to the beginning of the file.
• Hit the Delete key to remove this information.

4. Copy the following information and paste to your pp2 file:

{

version
	{
	number 4.01
	}
prop dummyObj
	{
	storageOffset 0 0.3487 0
	objFileGeom 0 0 :Runtime:Geometries:props:dummyObj.obj
	}

This information should be pasted at the current cursor location, which should still be above the "prop communicator:1" line.

5. Edit information to match your prop.
• The first thing we need to change is the name of the prop: the line "prop dummy" needs to match our prop. So, replace the words "prop dummyObj" with the name of our prop: "prop communicator:1". To make things easy, simply copy the entire line and paste it over the incorrect line... copying and pasting will also reduce the chances of making a typo.
• Next, change the reference to the obj file. In our example, we put the "communicator.obj" file in the Runtime\Geometries\JHoagland folder. So, change the line from ":Runtime:Geometries:props:" to ":Runtime:Geometries:JHoagland:".
Note 1: Be sure to use colons (:) instead of slashes (\) between folder names.
Note 2: Be sure to use the correct folder name for your obj files... you probably won't save your files in the "Geometries\JHoagland" folder.
 Next, change the name of the obj file. In our example, the obj file is called "communicator.obj". Remove the "dummyObj.obj" from the code, above, and replace it with "communicator.obj".

Before
{

version
	{
	number 4.01
	}
prop dummyObj
	{
	storageOffset 0 0.3487 0
	objFileGeom 0 0 :Runtime:Geometries:props:dummyObj.obj
	}
After
{

version
	{
	number 4.01
	}
prop communicator:1
	{
	storageOffset 0 0.3487 0
	objFileGeom 0 0 :Runtime:Geometries:JHoagland:communicator.obj
	}

As a side note: the "storageOffset" line is the same for every prop, so there's no need to change the value.

6. Save and test.
• Save the obj file.
• Switch over to Poser, go to your Props Library and load the prop into the scene. If everything worked fine, the prop should load into the scene.
Note 1: The prop may load into the scene at a different size than expected. If this is the case, simply use the "Scale" dial to adjust the size.
Note 2: Always make sure that you correct the prop name (from the pasted code) so that it exactly matches the existing prop name, including the underscore character "_" or colon-number, such as ":1". If the name is different, Poser may not load the prop correctly.
Note 3: Be very careful of typos, especially when replacing the name of the obj file. If the name of the file in the pp2 does not match the actual file name, Poser may give you an error.


Although this may seem like a lot of work at first, once you do it a few times, you'll become used to the process and it will become almost second-nature.