Getting custom 3D objects into the APCD
Posted: March 21st, 2024, 2:11 am
I started to explore this idea to see if there was a faster way to get 3D into the game than the usually build out of terrain in the APCD. This topic was a good starting point: viewtopic.php?p=3035#p3035. I originally wanted to get 3D from other courses into the APCD, but while that conversion looks to be not possible I did manage to fill in some gaps in the conversion process.
I almost forgot that I had Milkshape3D on my computer for converting models into another old game I had. Milkshape3D is not free but I think you will find it very affordable relative to other 3D modelling software! This program is geared towards low-poly models and has an APCD feel to it when creating models in it. In the very least it would be a program that can convert newer model formats into the desired direct.x file format Links Extender needs.
To explain how the process works I'll walk through a circular file conversion of taking a 3D object from the APCD library, being able to edit it, then converting back to the native APCD format. Links Extender 2.5 and Milkshape3D are the programs necessary, plus an image editor or maybe even a modern 3D program.
A 3D object in the APCD library consists of a *.xyz file (basically the mesh) and the *.map file (basically the textures). The *.prv file is actually just a .tga image with the file extension changed and this shows what the object looks like in the properties window. The *.cmf file is generated by the APCD when an object is imported.
1) *.xyz to *.obj - Links Extender performs this from the drop down menu bar and the option "Convert XYZ MAP File". The *.mtl file is a sidecar file for the .obj model file. Note that the .map file is not converted here.
2) *.map to *.tga - To do this, open the file location of the Links Extender program and drag the .map file onto the MAP2TGA.exe program. This will write out the .tga textures to the original directory of the .map file. A .map file can contain multiple .tga files.
3) [ *.obj + *.tga ] - Wavefront .obj models look to be a common file format with lots of websites offering free models. .tga's are not a common texture format but most image programs can convert textures to this format.
4) [ *.obj + *.tga ] to [ *.x + *.tga ] - Milkshape 3D can import .obj models and export to the old direct x model format. If the export option 'DirectX 8.0 file" is not in the list, the plugin is found on their website.
5) [ *.x + *.tga ] to [ *.xyz + *.map ] - Links Extender does this from the drop down menu and the option "Convert X File".
Importing a 3D object into the APCD works the same as importing a 2D object but instead of selecting the .tga file, start typing the file name and select the .xyz file. The 3D object properties window will come up. Select an object type that starts with "3D" or create the name of a new object type but it has to start with "3D". If the object type does not start with "3D" the APCD will think it is a 2D object.
Here are a few objects I have started with:
The cottage file came from a free 3D model website and I converted into the APCD format.
Advantages of 3D objects vs 3D from APCD terrain:
1) No shadows being generated from the course terrain.
2) Easily reproducible by simply planting more.
3) Easily scaled and rotated.
4) Can be viewed / not viewed by using the "tournament object" flag.
5) Can be shared for use on other courses.
Disadvantages of 3D objects vs 3D from APCD Terrain:
TEXTURE QUALITY! Once again we find out that the APCD can handle larger texture files. The Links game can only handle a 128x128 texture size. Now, unlike the usual program crash when a terrain texture is larger than 1024x1024, the Links game will internally downsample the 3D textures to 128x128. But it gets worse. The Links game renders the textures at about 256 colours depth. I thought I did something wrong when I looked at some 3D objects in game versus the APCD but I think it is just the rendering limitations. There are ways around the texture size limits (map more textures) but the colour depth is not ideal for smooth colour transitions.
Hopefully some others will have a look at getting 3D objects into the APCD and game and duplicate what I have found out. For now I would still recommend to do large, closeup objects from the APCD terrain (clubhouses), but for small, repeated objects (tees, fences) have a serious look at if a 3D planted object is good enough.
I almost forgot that I had Milkshape3D on my computer for converting models into another old game I had. Milkshape3D is not free but I think you will find it very affordable relative to other 3D modelling software! This program is geared towards low-poly models and has an APCD feel to it when creating models in it. In the very least it would be a program that can convert newer model formats into the desired direct.x file format Links Extender needs.
To explain how the process works I'll walk through a circular file conversion of taking a 3D object from the APCD library, being able to edit it, then converting back to the native APCD format. Links Extender 2.5 and Milkshape3D are the programs necessary, plus an image editor or maybe even a modern 3D program.
A 3D object in the APCD library consists of a *.xyz file (basically the mesh) and the *.map file (basically the textures). The *.prv file is actually just a .tga image with the file extension changed and this shows what the object looks like in the properties window. The *.cmf file is generated by the APCD when an object is imported.
1) *.xyz to *.obj - Links Extender performs this from the drop down menu bar and the option "Convert XYZ MAP File". The *.mtl file is a sidecar file for the .obj model file. Note that the .map file is not converted here.
2) *.map to *.tga - To do this, open the file location of the Links Extender program and drag the .map file onto the MAP2TGA.exe program. This will write out the .tga textures to the original directory of the .map file. A .map file can contain multiple .tga files.
3) [ *.obj + *.tga ] - Wavefront .obj models look to be a common file format with lots of websites offering free models. .tga's are not a common texture format but most image programs can convert textures to this format.
4) [ *.obj + *.tga ] to [ *.x + *.tga ] - Milkshape 3D can import .obj models and export to the old direct x model format. If the export option 'DirectX 8.0 file" is not in the list, the plugin is found on their website.
5) [ *.x + *.tga ] to [ *.xyz + *.map ] - Links Extender does this from the drop down menu and the option "Convert X File".
Importing a 3D object into the APCD works the same as importing a 2D object but instead of selecting the .tga file, start typing the file name and select the .xyz file. The 3D object properties window will come up. Select an object type that starts with "3D" or create the name of a new object type but it has to start with "3D". If the object type does not start with "3D" the APCD will think it is a 2D object.
Here are a few objects I have started with:
The cottage file came from a free 3D model website and I converted into the APCD format.
Advantages of 3D objects vs 3D from APCD terrain:
1) No shadows being generated from the course terrain.
2) Easily reproducible by simply planting more.
3) Easily scaled and rotated.
4) Can be viewed / not viewed by using the "tournament object" flag.
5) Can be shared for use on other courses.
Disadvantages of 3D objects vs 3D from APCD Terrain:
TEXTURE QUALITY! Once again we find out that the APCD can handle larger texture files. The Links game can only handle a 128x128 texture size. Now, unlike the usual program crash when a terrain texture is larger than 1024x1024, the Links game will internally downsample the 3D textures to 128x128. But it gets worse. The Links game renders the textures at about 256 colours depth. I thought I did something wrong when I looked at some 3D objects in game versus the APCD but I think it is just the rendering limitations. There are ways around the texture size limits (map more textures) but the colour depth is not ideal for smooth colour transitions.
Hopefully some others will have a look at getting 3D objects into the APCD and game and duplicate what I have found out. For now I would still recommend to do large, closeup objects from the APCD terrain (clubhouses), but for small, repeated objects (tees, fences) have a serious look at if a 3D planted object is good enough.