Thread: [WIP] Lighthouses mod
View Single Post
Old 07-13-17, 10:41 AM   #206
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Kendras View Post
A terrain object is a .dat file that is placed in data\Terrain\Locations, as the harbours. It has a .tga file with the same name which represents the aspect of the harbour on the navigation map.
Yes indeed I know that, but I am pretty sure that any object can be used as a terrain object, no matter whether it is located in the Terrain folder or not.

Quote:
Originally Posted by Kendras View Post
I first tested with your controller, and the rock was "ghost".

Then, I realised that something was missing :



I tried with 30 and 200, but still the rock remains "ghost".
Doh, I copied/pasted the controller from one of the Maunsell forts by Jeff without actually looking into its content. Knowing him, he probably hex-edited the file, and possibly something in the StaticObject properties went lost during the process. Thank you for tracking down this mistake!

I still see an unfixed possible error though: while digging into stock files, I have noticed that the container used for the StaticObject controller, is usually of the type 10 / 1000, not the more common 10 / -1
Here is my fix:



I hope you get my point

Quote:
Originally Posted by Kendras View Post
I have reworked a bit the 3D model of the rock, so now the origin point of the rock and the lighthouse are exactly on the same vertical axis.
You once told me that terrain objects' vertical position is always relative to the sea level, whereas land units get linked to the terrain/seabed. Is that correct?

If yes, no matter how good you match the two parts in wings 3D, you will still need to measure their relative (vertical) distance in game, and make the appropriate changes in Wings3D based on that measure.

With this idea in mind, I have created a ruler tool that you can use for measuring heigths in game. You can see a detail of it below:


It is 30 m long (but if need be I can do it even longer), and it is marked every 10 m, 5 m, 1 m, 50 cm and 10 cm. For ease of reading, the 5 m marks are coupled with a yellow/white banding. If you think it can ease your work, you can download it from the following link:

http://www.mediafire.com/file/9lit7l...hz/Ruler30m.7z

Quote:
Originally Posted by Kendras View Post
The problem is that land units and terrain objects are not using the same unit to measure the coordinates. While the land units' coordinates are measured with meters, the objects' coordinates are measured with degrees. In mission editor, coordinates of your cursor are shown in both units, but if you write them in the mission's file (in meters) and in the Locations.cfg (in degrees), both model are separated by at least 10 meters ....

So, I can place manually the land unit just on the point showing the terrain object's location in mission editor, but still it remains imprecision.
We are talking about horizontal position, right?

I knew that choosing to set the rock as a terrain object, though more logical, would have caused this sort of problems. That's why I asked you how you wanted me to set it. No problem is insurmontable though.

There is a linear relation in the SHIII world between lat/long degrees and metric offsets so no big problem here: despite the different system of coordinates adopted, we can place the two parts exactly at the same spot.
I once had a converter by TheDarkWraith. I cannot find it anymore, but I can create something similar for you

Quote:
Originally Posted by MLF View Post
What I did do is include the rock as a node in the LLH_LaPlate.dat file, and I could easily and accurately put the lighthouse on the rock using the translation co-ordinates in S3Editor.

Not sure I follow the use of seperate models in the library directory.

Please excuse my input if completely wrong as you two are way ahead of me on this.
Quote:
Originally Posted by Kendras View Post
Yes, I'm thinking about this too. Why separate rock and lighthouse ?
Your suggestion is not pointless at all MLF, and initially I thought to set the rock that way. At the and I opted for two separate objects, mainly for the following reasons:

- If the lighthouse is destroyed during the campaign, or if at some point it must be removed from game (according to historical data on its destruction), the rock would diasappear too, and I didn't want that: the submerged danger should keep there.

- Kendras told me that he wanted to couple each lighthouse with a colored icon. This is only possible by placing a dummy terrain object at the same position as the lighthouse land unit. Since we are at it, I thought, why not to attach the rock to it?

Quote:
Originally Posted by MLF View Post
Looking at the LLH_LaPlate.dat file, there are 2 textures:-

One called LH_LaPlate.tga with label "LaPlate_Concrete"
the other called LH_LaPlate.tga with label "LaPlate_Metal".

Am I wrong in thinking the one labelled "LaPlate_Metal" should have texture
LLH_LaPlate.tga which shows as a little white square. Haven't got access to SH3 at the moment, so can't test - just an observation.
Quote:
Originally Posted by Kendras View Post
The texture is external (in TNormal folder).
Kendras is right in saying that the texture is external, and the same material/texture works perfectly for the lanter; I don't see why it shouldn't work for the mark unless there are restrictions on the usage of the same material on multiple objects, but I don't think so.
By the way, this is how the illfamed top mark should look like:



Dark grey. Very dark, but if in game it looks pitch black it means that the texture is not rendered. On a side note: the render above is taken from S3d, just to say that everything seems okay in the file.

Stay tuned for a new beta release within the next 30 minutes
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote