SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   [WIP] Lighthouses mod (https://www.subsim.com/radioroom/showthread.php?t=228731)

Kendras 07-12-17 09:17 AM

Quote:

Originally Posted by gap (Post 2499572)
that's weird. There are two materials using the same texture, the first one being a semi-transparent glass material. If you linked the second material, the one labelled 'LaPlate_Metal', it is the same used for the metal frame of the lantern. Does it look okay?

Yes, I linked to the one labelled 'LaPlate_Metal'. So S3D was right this time.

Quote:

Originally Posted by gap (Post 2499572)
Did you edit the screenshot manually?

No, I edited the texture directly.

Else, could you create a rock that is visible also a bit above water as on this image ? :

http://www.haka-spirit.net/IMG/jpg/p...800x600_-2.jpg

gap 07-12-17 10:00 AM

Quote:

Originally Posted by Kendras (Post 2499580)
Yes, I linked to the one labelled 'LaPlate_Metal'. So S3D was right this time.

Okay, maybe the issue is caused by the fact that the same texture is used for a transparent material. I will try and put the glass texture on a separate, embedded file, as more usual for SH.

Quote:

Originally Posted by Kendras (Post 2499580)
No, I edited the texture directly.

Okay, don't forget to embed your edited texture the next time you send me your updates :up:

Quote:

Originally Posted by Kendras (Post 2499580)
Else, could you create a rock that is visible also a bit above water as on this image ? :

Do you mean the dark "crusty" area barely visible above the surface, at the bottom of the concrete base? If yes, I think that's not real rock, but a mix of fouling and biogenic carbonated sediments surrounding the cylindrical base, which I can try to mimic before final release. If we must trust The Lighthouse Directory website, the concrete tower is 26 m high, and the focal plane is 19 m above the main sea level. This would entail that the topmost portion of the underlying rock should start about 7 m below the sea level, maybe even more considering that the lantern is mounted on a metal platform raising from the top of the tower. This is confirmed by the same source where it states that the lighthouse is "located on a submerged rock" :yep:

gap 07-12-17 12:24 PM

Version #4 of our lighthouse

http://www.mediafire.com/file/rnjrcu...La_Plate_v4.7z

This version will hopefully fix the top mark texture problem. At least in S3d, the texture looks okay now. Fingers crossed.

I have stored the roche de la Plate in a 'Rocks_skerries_shoals' library file. You should place it at the very same coordinates and orientation as the lighthouse for the two parts to match exactly. Even so, their relative vertical placement will be a matter of trial and error. Ideally, the rock should start exactly where the lighthouse base ends (the pre-rendered 'shadow' on the rock base should guide you), and it should extend all the way to the sea bed. Let me know which adjustements will be needed. If you want, I can provide you with a ruler which will help you in estimating by how many meters I need to move the rock up/dow.

Just for eye candy, I have edited the properties of all the materials used. Glass and metal should be more reflective than concrete now. Let me know if you can see any difference in game :salute:

P.S: I forgot to mention that the rock should be collisionable. Only the rock, not the lighthouse (yet). Let me know if collision is detected correctly :)

Kendras 07-12-17 03:43 PM

Quote:

Originally Posted by gap (Post 2499633)
I have stored the roche de la Plate in a 'Rocks_skerries_shoals' library file. You should place it at the very same coordinates and orientation as the lighthouse for the two parts to match exactly. Even so, their relative vertical placement will be a matter of trial and error. Ideally, the rock should start exactly where the lighthouse base ends (the pre-rendered 'shadow' on the rock base should guide you), and it should extend all the way to the sea bed. Let me know which adjustements will be needed. If you want, I can provide you with a ruler which will help you in estimating by how many meters I need to move the rock up/dow.

I will convert it into a terrain object. No need to adjust manually vertical placement. I'm going to try this right now. :up:

Quote:

Originally Posted by gap (Post 2499633)
Just for eye candy, I have edited the properties of all the materials used. Glass and metal should be more reflective than concrete now. Let me know if you can see any difference in game :salute:

I had already fixed that too by improving the specular strength for the metal texture (25 for concrete and 125 for metal, and difference is visible in game).

Quote:

Originally Posted by gap (Post 2499633)
P.S: I forgot to mention that the rock should be collisionable. Only the rock, not the lighthouse (yet). Let me know if collision is detected correctly :)

No problem.

gap 07-12-17 04:52 PM

Quote:

Originally Posted by Kendras (Post 2499700)
I will convert it into a terrain object. No need to adjust manually vertical placement. I'm going to try this right now. :up:

I don't understand what you mean. I think you can already place the library object as a terrain object, or you can move it to the terrain folder of you prefer, but I think the result won't change :hmm2:

Quote:

Originally Posted by Kendras (Post 2499700)
I had already fixed that too by improving the specular strength for the metal texture (25 for concrete and 125 for metal, and difference is visible in game).

The next time you edit send me an update by you, you should try and give me a comprehensive list of your changes, otherwise I risk to step into your feet. :D

Anyway, unless you think your settings are better, I suggest not to chenge my ones: I copied them from similar stock materials. Among other changes, I raised a bit the specular strength of the concrete material. You will see the benefits of it when I will set those materials to use the specular mask that we have temporarily removed :03:

I am now woarking on adding shadows and water reflections to the model :salute:

Kendras 07-12-17 05:46 PM

bad news :

- i didn't manage to make the rock collisionable, although I have the same controller as on my previous test (and rock was collisionable)

- the top mark is still plain black

- it's impossible to place the rock precisely in relation to the lighthouse

:damn:

gap 07-12-17 06:32 PM

Quote:

Originally Posted by Kendras (Post 2499746)
bad news :

- i didn't manage to make the rock collisionable, although I have the same controller as on my previous test (and rock was collisionable)

We will sort it out. :03:

The controller used for making this kind of objects collisionable, is the StaticObject controller. I had placed one in the rock object, but you should explain first how you used it, and if/how you 'converted' it. I still what you meant in your previous post :doh:

Quote:

Originally Posted by Kendras (Post 2499746)
- the top mark is still plain black

This top mark issue is driving me crazy: I still don't get why the same material/texture looks okay on the lantern, but not on the mark :hmmm:

Quote:

Originally Posted by Kendras (Post 2499746)
- it's impossible to place the rock precisely in relation to the lighthouse

Sure it is possible but if I got you correctly when we fisrt discussed the topic a few month ago, the position of terrain objects is always dictated by the coordinates of their 3D meshes. You must estimate by how many meters the rock needs to be raised/lowered, export its meshes using S3d, move the object in Wings, and re-import them in the dat file. As I told you, a ruler object will help greatly; let me know if you still want it :salute:

Kendras 07-13-17 01:46 AM

Quote:

Originally Posted by gap (Post 2499755)
The controller used for making this kind of objects collisionable, is the StaticObject controller. I had placed one in the rock object, but you should explain first how you used it, and if/how you 'converted' it.

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.

I first tested with your controller, and the rock was "ghost".

Then, I realised that something was missing :

http://i.imgur.com/pz7KtW9.png

I tried with 30 and 200, but still the rock remains "ghost".

Quote:

Originally Posted by gap (Post 2499755)
Sure it is possible but if I got you correctly when we fisrt discussed the topic a few month ago, the position of terrain objects is always dictated by the coordinates of their 3D meshes. You must estimate by how many meters the rock needs to be raised/lowered, export its meshes using S3d, move the object in Wings, and re-import them in the dat file. As I told you, a ruler object will help greatly; let me know if you still want it :salute:

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. 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 .... :nope:

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.

MLF 07-13-17 08:19 AM

Quote:

Originally Posted by gap (Post 2499755)

This top mark issue is driving me crazy: I still don't get why the same material/texture looks okay on the lantern, but not on the mark :hmmm:

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.

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.

regards,

MLF

Kendras 07-13-17 10:12 AM

Quote:

Originally Posted by MLF (Post 2499885)
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.

The texture is external (in TNormal folder).

Quote:

Originally Posted by MLF (Post 2499885)
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.

Yes, I'm thinking about this too. Why separate rock and lighthouse ?

gap 07-13-17 10:41 AM

Quote:

Originally Posted by Kendras (Post 2499820)
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 (Post 2499820)
I first tested with your controller, and the rock was "ghost".

Then, I realised that something was missing :

http://i.imgur.com/pz7KtW9.png

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 :yep:
Here is my fix:

http://i.imgur.com/Xj7Dfwf.jpg

I hope you get my point :)

Quote:

Originally Posted by Kendras (Post 2499820)
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 (Post 2499820)
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 .... :nope:

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. :up:
I once had a converter by TheDarkWraith. I cannot find it anymore, but I can create something similar for you :03:

Quote:

Originally Posted by MLF (Post 2499885)
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 (Post 2499914)
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 (Post 2499885)
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 (Post 2499914)
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:

http://i.imgur.com/9A1NoBM.jpg

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. :doh:

Stay tuned for a new beta release within the next 30 minutes :salute:

MLF 07-13-17 11:04 AM

Quote:

Originally Posted by Kendras (Post 2499914)
The texture is external (in TNormal folder).

What is the LLH_LaPlate.tga file for in the Library folder for? Doesn't seem to be referenced either in LLH_LaPlate.dat, Lighthouse_Parts.dat or Lighthouse_FX.dat?

I'm trying to understand (perhaps I shouldn't :o) how this all hangs together. I've bee importing a couple of models from sketchup, but each part has individual texture files (quite laborious) rather than one big one.

urfisch 07-13-17 11:10 AM

interesting work! :Kaleun_Thumbs_Up:

gap 07-13-17 11:28 AM

Tourelle de la Plate alpha v5
 
http://www.mediafire.com/file/lf45bu...La_Plate_v5.7z

A few changes here. Nothing drastical:

- I have set the rock as a proper terrain object, and I have fixed its StaticObject controller as described in my previous post. Hopefully, this will make the rock collisionable as it should.

- I have created a tga mask for the lighthouse, which is linked to the rock object. The icon is inspired by modern nautical charts, no idea how beacons were marked in German charts of the 30s-40s. I hope you like it: :D

http://i.imgur.com/Pfh4gZR.png

- I have thought that in future we might need some generic day beacons similar to the Petite Vielle, so i decided to remove the light platform from the main model, and to make it into a configurable equipment, same as the lantern and top mark. You shouldn't notice any visual change in game. If you do, I messed up something :O:

- While separating the tower and the platform, I have noticed a small misalignment of a mesh in one of the beams holding the platform. The error is fixed, but I had to do some slight changes in the texture.

- I have added water reflections to the lighthouse and to all of its library subparts. The reflections models I have used, are low-poly versions of the corresponding main models. I made an automatic, quick and dirty poly reduction, and the resulting models have many distortions. Water reflections are distorted anyway, so you probably wont notice how messy are those models, but I plan for one of the next releases to reference the main models as reflection models. Supposing that this is going to be possible, that would result in excellent reflections with no extra file size :03:

For the moment, I think that's all.
My next contribution to this project, will be a lat/long converter based on an excel spreadsheet. Creating it shouldn't take too long :salute:

gap 07-13-17 12:09 PM

Quote:

Originally Posted by MLF (Post 2499926)
What is the LLH_LaPlate.tga file for in the Library folder for? Doesn't seem to be referenced either in LLH_LaPlate.dat, Lighthouse_Parts.dat or Lighthouse_FX.dat?

I'm trying to understand (perhaps I shouldn't :o) how this all hangs together.

The name of the texture file is 'LH_LaPlate.tga', with one 'L'. If you look at any of the materials using it, it is referenced: the 'Enable explicit texture' checkbox is checked, and 'Texture name' field is set to 'LH_LaPlate.tga'. This is all it takes for the game to look for the correct texture in the unit's/object folder, or in one of the 'Textures' subfolders.

Either I didn't get your point, or you are confusing texture linking with texture embedding. When the latter method is used, textures are stored directly in the dat file, and no external texture is required. I din't want embedded textures though, because in my model multiple materials share the same texture; if I embedded it multiple times, one for each material using it, I would have unnecessarily increased the disc and RAM memory usage. The way I have it, in theory the texture is loaded in memory only once (if devs made a clean job).
Moreover, using texture linking over texture embedding enables an higher degree of flexibility. SHIV and SH5 modders are familiar with linked textures which are set as configurable (similar to sensors and equipments). Unfortunately, this feature is reportedly supported by SHIII (ask Jeff Grooves on that) but unknown to most modders, and not used at all in stock game.

Quote:

Originally Posted by MLF (Post 2499926)
I've bee importing a couple of models from sketchup, but each part has individual texture files (quite laborious) rather than one big one.

I know. Those sketchup guys must be crazy :doh: :D

Quote:

Originally Posted by urfisch (Post 2499929)
interesting work! :Kaleun_Thumbs_Up:

Thank you for the encouragement Captain! :salute:


All times are GMT -5. The time now is 11:05 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.