RetroDevil opened this issue on Oct 19, 2011 · 46 posts
lesbentley posted Fri, 21 October 2011 at 6:21 PM
I have said it before on a number of occasions but it does not seem to sink in. I think it is very important that this misinformation is stamped out before it starts to cause problems, so I will say it again.
You can not convert a pp2 file into a valid obj file by changing its file extension. Attempting to use the corrupt obj files resulting from such a renaming operation, as if they were valid obj files, is dangerous and can trash your scene.
I already know that you can't can't turn a pp2 file into a valid obj by changing the extension. That would be logically impossible as a normal fully functioning pp2 could never be a member of the class "Wavefront Object file", as to be a functional pp2 it would by necessity have to break compliance with the Wavefront Object file specification.
So in light of the logical impossibility of the claim, it irks me considerably that I have had to do the legwork to prove it in an operational sense.
Never the less, when someone obviously intelligent, and well regarded as bagginsbill, makes the suggestion that it may be "technically accurate to say that any file that contains geometry in OBJ style is an OBJ file" (and to be fair, note that bagginsbill stated this as a hypothesis not a fact). Then I feel obliged to take the suggestion seriously and put it to the test.
I have done that, and can now state categorically that pp2 files renamed as obj, even if they contain embedded obj geometry, do not function as valid obj files in P6 (and probably not in any other Poser version). I have proved this. And if you like you can follow the proof, and prove it for yourself.
Attached above is the text of a pp2 "CUBE.pp2". This is a perfectly normal pp2 file, produced by importing a cube geometry into Poser, then saving it to the Props palette, but if you prefer you can use one of your own pp2 files for the experiment.
Save the CUBE.pp2 under the libraries/Props folder. Make a copy of the CUBE.pp2 and save it to the Geometries folder, then rename the file extension so it becomes "CUBE.obj".
Open the original CUBE.pp2 (the one under the props folder) in a text editor and delete the entire geomCustom code block. Replace it with an objFileGeom call to the "CUBE.obj":
prop cube
{
storageOffset 0 0.3487 0
objFileGeom 0 0 :Runtime:Geometries:CUBE.obj
}
We now have a valid pp2 file that calls an corrupt obj file. We can load the pp2 in poser and see if the corrupt obj file will function as if it were a valid obj file. Before we do that let's be absolutely clear on what we are testing here. It is this assertion:
"If you change the file extension of a pp2 file that contains embedded geometry to "obj", it will function in Poser as if it were a valid obj file."
Now load the pp2 file from the Props palette. What happened? Did the cube load as a functioning Poser item? Do you even see the cube in the scene?
I performed the experiment five times, closing and restarting P6 on each occasion. The cube did not load as a visible item in any test. On each iteration, loading the pp2 that referenced the corrupt obj file trashed the Poser scene, causing all other loaded items to disappear from the scene, and it was no longer possible to load any visible items into the scene.
I really do hope I don't have to say this again. Changing the file extension of a pp2 file to obj does not convert it into a valid obj file, or a file that will function in Poser as if it were a valid obj file. The resulting corrupt file does not function in the same way as a valid obj file, and in many cases won't function at all, and causes the scent to be trashed.
We knew from the start that a pp2 could not logically be a valid obj file, but now we have proof that it does not function as if it were a valid obj file in praxis. Not only are such corrupt obj files invalid, calling then from a pp2 is dangerous and can trash your scene.
**
**