Getting custom 3D objects into the APCD

Share your designing tips with other Designer's. Find answers to your problems using the APCD.
linkster
Posts: 106
Joined: June 13th, 2022, 1:12 am

Getting custom 3D objects into the APCD

Post by linkster »

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:

3D_WoodTee.zip
(170.22 KiB) Downloaded 31 times
3D_Leaderboard.zip
(213.13 KiB) Downloaded 23 times
3D_Cottage.zip
(681 KiB) Downloaded 26 times

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.
Big Sexy JC
Posts: 221
Joined: November 15th, 2022, 8:10 am
Location: Indiana

Re: Getting custom 3D objects into the APCD

Post by Big Sexy JC »

Nice. Looks like somebody has been making some progress. Great work.
Ian Wells
Posts: 574
Joined: August 27th, 2019, 3:02 am

Re: Getting custom 3D objects into the APCD

Post by Ian Wells »

Well done, this is a big improvement. (I thought the quality of the cottage was very good. :thumbup: )
I think I will have to take some time to try and understand the process before I give it a go.
Perhaps after I finish Gozzer Ranch, I will spend some time on trying to modify an existing 3D object .
:cheers1:
Ian
User avatar
Adelade
Posts: 1359
Joined: August 27th, 2019, 10:24 am

Re: Getting custom 3D objects into the APCD

Post by Adelade »

Ooo nice tee marker (at least it looks good in APCD, havent checked it out in Links). Im trying to figure out how to make colour variations of it. I got the TGA file and can change it on my own, but how do I put it back together into a .map file... Do I understand correctly about needing Milkshape for that? Is the following the required process?
1) *.xyz to *.obj
4) [ *.obj + *.tga ] to [ *.x + *.tga ]
5) [ *.x + *.tga ] to [ *.xyz + *.map ]
Finished Courses - Main: Amedal (fictional), Nine Bridges (real)
Other: Austin, Sheshan, Kauri Cliffs, Le Golf Nat. Updates: Whirlpool, Royal Lytham, Royal St George's, Chicago, Chambers Bay, Munchen Nord E
Working on: 2 fictional courses + a couple things...
linkster
Posts: 106
Joined: June 13th, 2022, 1:12 am

Re: Getting custom 3D objects into the APCD

Post by linkster »

You need the .x model file to accompany the .tga file so yes you would need Milkshape3D. I'll save you the conversion:

WoodTee.x.zip
(1.62 KiB) Downloaded 16 times

The .x model file references the .tga texture so you need to keep the files names the same. Once the Links Extender conversion is done you should be able to rename the .xyz and .map file pair to whatever you like, as long as they are the same. You'll find the conversion output in the Links Extender output folder (Documents/3dobjects for me).

I used a 512x256 texture for the wood tee but I think it renders in game at about 128x64. A tee marker is small enough that texture size does not matter much. Can anyone confirm the max texture size for 3D objects rendered in the game? The cottage looks great in the APCD because of the 1024x1024 texture but in game it is very pixelated.
User avatar
Adelade
Posts: 1359
Joined: August 27th, 2019, 10:24 am

Re: Getting custom 3D objects into the APCD

Post by Adelade »

Thanks, I cant get it to work though, APCD crashes after clicking Ok in the popup of importing the object and choosing Object Type etc (it didnt crash when importing your object).

My only guess is that Im not saving the TGA file in the correct format in some way. When I do the Map2TGA thing, the resulting TGA file is 129 KB size, but when I resave it as TGA (with Paint.Net) I can only get it come out as either:
513 KB (32bit no compression)
393 KB (32bit compression RLE)
385 KB (24bit no compression)
298 KB (24bit compression RLE)

I tried the ones without RLE and get the same problem, I didnt try the RLE compression because I highly doubt it has something to do with that.

Which program do you use to save the TGA files? I havent used Photoshop for ages and dont have it anymore, but I remember there being a bunch of colour settings in it, do you think it has something to do with that? It sounded like you didnt convert any colour formats though and that it is merely Links itself that does it. Or what else might I be missing?
Finished Courses - Main: Amedal (fictional), Nine Bridges (real)
Other: Austin, Sheshan, Kauri Cliffs, Le Golf Nat. Updates: Whirlpool, Royal Lytham, Royal St George's, Chicago, Chambers Bay, Munchen Nord E
Working on: 2 fictional courses + a couple things...
braden1308
Posts: 556
Joined: August 29th, 2019, 2:02 pm

Re: Getting custom 3D objects into the APCD

Post by braden1308 »

Adelade,

I had the same problem years ago when AJ was trying to teach me how to import 3D objects. It was when I was working on Liberty National and he extracted a number of 3D objects from, I think it was EA's version of Liberty, Anyway I was able to put the object (bleachers) in 3D Max but could not get them to import into the extender. We never could figure out why though. I believe the bleachers on AJ's Augusta are from the same process, I could just never to get it to work properly.

Maybe if I get around to it I will play around with milkshape and see if my luck changes :dunno:
User avatar
Adelade
Posts: 1359
Joined: August 27th, 2019, 10:24 am

Re: Getting custom 3D objects into the APCD

Post by Adelade »

Oh I dont know too much about Andrew Jones, but my impression is that he could figure out pretty much anything! So that sounds troublesome indeed lol. Linkster must have gotten it to work though, so he's likely about to solve it for us(?) :smile:
Finished Courses - Main: Amedal (fictional), Nine Bridges (real)
Other: Austin, Sheshan, Kauri Cliffs, Le Golf Nat. Updates: Whirlpool, Royal Lytham, Royal St George's, Chicago, Chambers Bay, Munchen Nord E
Working on: 2 fictional courses + a couple things...
braden1308
Posts: 556
Joined: August 29th, 2019, 2:02 pm

Re: Getting custom 3D objects into the APCD

Post by braden1308 »

:fcrossed:
linkster
Posts: 106
Joined: June 13th, 2022, 1:12 am

Re: Getting custom 3D objects into the APCD

Post by linkster »

The .tga filename needs to be woodtee.tga, same as woodtee.x, not the woodteetex00.tga that Links Extender spits out. Try that and see if it works. I have not had any issues converting model types yet as long as the file names match what the model calls for internally.

I use GIMP for most image editing. I have noticed that .tga textures in 3D are 8 bit indexed images, hence the file size is 1/3 that of 24 bit images. Saving to 24 bit .tga images (no alpha, no compresion) should work fine for Links Extender.

I would love to convert and use the incredible 3D work in the 2012 Augusta course file but it looks like that cannot be done.
Post Reply