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)

gap 07-18-17 08:27 AM

Quote:

Originally Posted by Kendras (Post 2500991)
:rotfl2:

Problem solved !

:yeah:

Quote:

Originally Posted by Kendras (Post 2501016)
So, I've finished to test all possibilities, and here are my conclusions :

- In locations.cfg, coordinates D (in degrees) must have no more than 6 decimal digits.

- In .mis file, coordinates M (in meters) mustn't have any decimal digits. Even if the converted number in degrees (D) has exactly 6 decimal digits.

As D should be equal to M/120000, the minimal move for a land unit is 3 meters (0.000025 or 25.10^-6 degrees), in other words M must be a multiple of 3.


But there is more !

When you convert the coordinate M (in meters) to D (in degrees), you must apply this formula :

for longitude : D = M/120000 - 6.10^-6
for latitude: D = M/120000 + 6.10^-6



:Kaleun_Applaud:

gap 07-18-17 08:47 AM

Quote:

Originally Posted by MLF (Post 2500994)
I did a little research last night and I believe the model I converted is the Aniva Rock Lighthouse:-

Good finding, it must be that! :up:
Pity that its geographical position puts it out of U-boat reach :D

Quote:

Originally Posted by MLF (Post 2501005)
You are using controller 10/-1 as am I, with a child node of 6/0 WaterReflection property yet the one I use has this added parameter.....very strange.

Obviously ther are two different types of parameter chunks for the WaterReflection controller. I wonder if the one with the additional MaxVisDistance parameter, has any impact on the quality of reflections though I don't think so...

Quote:

Originally Posted by MLF (Post 2501005)
None of my textures have the DX2/3 compression checked - I seem to recall a post somewhere where this was stated as causing a problem?????

I am pretty sure that that flag being checked was the main cause of reflections looking so faint :yep:

Quote:

Originally Posted by MLF (Post 2501047)
I have amended the reflection propertie's parameters, and also removed the DX2/3 compression checks on all nodes in LLH_LaPlate.dat and Lighthouse_Parts.dat. In my view the reflection now looks stronger bringing the light house into the sea rather than on it?

Amazing :up:

Maybe reflections now are even a bit too strong lol, what do you guys think? :D

Quote:

Originally Posted by Kendras (Post 2501049)
Nice. :up:

Could you also add some reflections nodes for the sub parts ?

Quote:

Originally Posted by MLF (Post 2501052)
I added the reflections to all nodes in the lighthouse_Parts.dat

Am I missing something? I thought I had already added those nodes to all the library subparts :hmm2:

Quote:

Originally Posted by MLF (Post 2501052)
when I zoom in on the reflection they are there, but fainter, possibly because they are further away from the sea which is possibly more realistic than having the reflections all the same strength.

That sounds reasonable :yep:

MLF 07-18-17 08:50 AM

I can upload the 2 dat files to mediafire if you want to use them, or inspect them?

Regards,

MLF

gap 07-18-17 08:58 AM

Quote:

Originally Posted by MLF (Post 2501070)
I can upload the 2 dat files to mediafire if you want to use them, or inspect them?

Regards,

MLF

Sure please: I plan to upload a major update today, and I would like it to feature your tweaks too :up:

MLF 07-18-17 09:08 AM

:)

Here's the link:-

https://www.mediafire.com/?2i07drl516bqapx


The rar file contains the 2 dat files I modified - it is not JSGME ready.


Regards,


MLF

gap 07-18-17 09:16 AM

Quote:

Originally Posted by MLF (Post 2501075)

Thank you very much :up:

Please check back at your earliest convenience for my update. It should be ready in no more than a couple of hours from now :salute:

P.S: I finally see why the library models had no reflections: their WaterReflection controller must be placed directly under the model node; no dedicated reflection model is used :up:

MLF 07-18-17 09:18 AM

:Kaleun_Thumbs_Up:

One thing - I couldn't identify the node for the flashing light, so there isn't a reflection of the light in the water when the light flashes. Which node and file has the flashing light?

regards,

MLF

gap 07-18-17 09:38 AM

Quote:

Originally Posted by MLF (Post 2501080)
:Kaleun_Thumbs_Up:

One thing - I couldn't identify the node for the flashing light, so there isn't a reflection of the light in the water when the light flashes. Which node and file has the flashing light?

Lighthouse_FX.dat. I have already added a WaterReflection controller to the version I am going to release today. :up:

I am also wondering whether to add a RayTracedHalo controller to the platform (with its 'Halo' property set to 'False') so to provent the halo for glowing under the platform. Maybe you can quickly test this option while I am adding a sound source to the lighthouse with a lapping waves SFX? :03:

Kendras 07-18-17 11:37 AM

What is the RayTracedHalo controller useful for ?

MLF 07-18-17 11:38 AM

1 Attachment(s)
Quote:

Originally Posted by gap (Post 2501083)
I am also wondering whether to add a RayTracedHalo controller to the platform (with its 'Halo' property set to 'False') so to provent the halo for glowing under the platform. Maybe you can quickly test this option while I am adding a sound source to the lighthouse with a lapping waves SFX? :03:

I added the controller to node 12 LaPlate_Platform in the lighthouse_Parts.dat - didn't see any noticble difference but I think possibly I am misunderstanding the term "platform" again. I cannot see the light through the structure of the lighthouse before or after so presumably it's what shows in my screenshot below (the white area under the platform) that you want rid of? The screen shot was taken after I added the controller as above. Should I be adding it somewhere else - I've never used this controller so.......:doh:

regards,

MLF

MLF 07-18-17 11:49 AM

Lapping waves? Hope I never get that close:Kaleun_Sick:

Fog Horn?:O:

Regards,

MLF

Kendras 07-18-17 12:10 PM

About the icon, here how it looks with your .tga resized at 20 % :

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

and in game (the other icon on the right is La Vieille lighthouse (with correct coordinates), and the small bar on the left is my submarine) :

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

:-?

gap 07-18-17 12:46 PM

Tourelle de la Plate alpha v7
 
New version ready for download:

http://www.mediafire.com/file/lh8517...La_Plate_v7.7z

The list of changes is quite long today:
  • I have split the tower base from the main lighthouse model: it is part of the rock now. This seemed more logical to me, since both rock and base lay at least partly underwater and they both need a StaticObject controller for collision detection and wave interaction.

  • Folllowing Kendras' suggestion, the two sub-models composing the rock object (the unpainted concrete base and the rock itself) are now stored in the same library file as the lantern, the platform, etc, and and they are linked to Rock_LaPlate.dat through placement nodes (likewise stock harbors). I thought that storing those models in a library file is more rational, as we might use them for other lighthouses.

  • Following the example provided by stock files, I have moved the StaticObject controller of Rock_LaPlate.dat to a dummy node which is also parent to the two placement nodes I mentioned above. This should fix the problem of collision with other units not being detected. Moreover, waves should "crash" against the base now, and spawn foam in the process.

  • Also attached to the rock/base 'location', there is a SoundSource and AmbientVolume controller. Provided that I didn't make any mistake, you should hear a wave lapping sound when close to the lighthouse.

  • Following MLF's suggestion, I have scaled down LaPlate's icon by an 8 factor, and the relative text by a 4 factor. I have created two versions of the tga. The 'default' version has texture size also scaled down to 128x128 pixels. Should this version look weird (i.e. icon having equal size as before, text double the size as before, both with heavily jagged edges) or crash the game (hopefully not), please replace the tga in the Terrain/Locations folder with the one provided in the 'spare icon' folder. The spare texture is stock sized (1,024 square pixels), and only the visible icon and text were resized.

  • Since it did seem to do nothing, I have removed the Caustics controller from the lighthouse unit. I couldn't find any example in stock/GWX files of a land unit/terrain object using such a controller, and I doubt we will ever get it to work on our lighthouse.

  • I have added a WaterReflection controller to the light/halo effect. It should cast reflection now.

  • Submodel reflections should work now (thanks to MLF): I had placed their WaterReflection controller under reflect_* nodes with reflections model attached; this obviously works for units' reflections, but not for the reflection of equipments. Now I have correctly placed the reflection controllers of loghthouse 'equipments' under the same nodes as their visible models, and I have deleted the redundant reflect_* nodes with the attached reflection models.

  • I have deleted the materials I had set for reflections from the main lighthouse file and from the lighthouse parts library file. These materials had their DX2/3 compression flag set to true. Now all the reflections use the same material as the visible models, with no in-memory texture compression. Higher memory usage but much better results. Thanks again to MLF for confirming my suspect!

  • I have deleted the messy reflection model used for the main lighthouse unit. The reflect_LLH_LaPlate node was linked to the main model instead, and reflections are calculated based on it now. This tweak should make reflections to look better without increasing RAM memory usage, though it might require more work by the GPU, due to the higher complexity of the model used for reflections.

  • All the MinVisDim and MaxVisDim reflection properties used by the lighthouse, by the library items and by the light effect, were set to 0.1 and 0.5 respectively. These settings were taken from the reflections of similar stock objects. Should you guys think that the settings proposed by MLF give better results than the ones above, feel free to tweaks those parameters and to inform me about your changes: I will update the files on my HD accordingly, and you wont have to redo the changes again and again after each update :03:

Well, I think that's all from my part. I am looking forward to your feedback and I am ready to work on any still unfixed, or possibly newly introduced, bug. I thank you for your big efforts into the development of our first full-fledged lighthouse, and I hope you are enjoying the process as much as I do. As you know I am a SH5 guy lent to SHIII, but I am getting to love it as much as the other games of the series :salute:

gap 07-18-17 01:25 PM

Quote:

Originally Posted by MLF (Post 2501095)
I added the controller to node 12 LaPlate_Platform in the lighthouse_Parts.dat - didn't see any noticble difference but I think possibly I am misunderstanding the term "platform" again.

The yellow three-legged turret with stairs on a side, the big gas bottle under it, and lantern and topmark on top :03:

Quote:

Originally Posted by MLF (Post 2501095)
I cannot see the light through the structure of the lighthouse before or after so presumably it's what shows in my screenshot below (the white area under the platform) that you want rid of?

Exactly: the whitish halo covering the back half of pltform's bottom side. That's just a detail, but I am a perfectionist: I we can fix this glitch, why not? If we can't, well, we will live with it :D

Quote:

Originally Posted by Kendras (Post 2501094)
The screen shot was taken after I added the controller as above. Should I be adding it somewhere else - I've never used this controller so.......:doh:

Quote:

Originally Posted by Kendras (Post 2501094)
What is the RayTracedHalo controller useful for ?

I don't know much abot this controller: I was looking at Kendras' light effect, and I noticed that the controller had two states: one for glowing light (True) and one for obstacle (False). I was curious and I made a quick search. The sparse information I got from it, induced me to think that we could use the controller to iron out the glitch described above, but unfortunately I don't know much more of what you can read from the link above. Maybe Anvart, Jeff Grooves or some other old timer might... cast some light on the topic :O:

Quote:

Originally Posted by MLF (Post 2501097)
Lapping waves? Hope I never get that close:Kaleun_Sick:

:rotfl2:

Quote:

Originally Posted by MLF (Post 2501097)

Fog Horn?:O:


Sure, this is an idea I had before. Where there must be fog horns, there will fog horns. That's not the case of the Petite Vieille though :03:

Talking about your idea, a while ago I looked for a way to link the playing of a certain sound to a particular weather state. Unfortunately I couldn't find any clue. Ideas?

Quote:

Originally Posted by Kendras (Post 2501101)
About the icon, here how it looks with your .tga resized at 20 % :

and in game (the other icon on the right is La Vieille lighthouse (with correct coordinates), and the small bar on the left is my submarine) :

:-?

I see what you mean Kendras: they still look super big, but they already look awfully jagged. I think I might have a solution for that, but before I can say more I need you to test both icons included in my new release, and to report back with the results and with your impressions :yep:

MLF 07-18-17 02:36 PM

Hi Gap,

Have just had a quick test. CTD when the GPU picked up the first light flash I'm afraid. Took out the RayTracedHalo controller from Lighthouse_FX.dat and all now OK. What does this controller do (apart from CTD)?

Light tower offset from rock (see screenshot). What Lat and Long did you use in Locations.cfg and the corresponding co-ordinates in the .mis file? Sorry - I've not had time to look at Kendras' findings yet.

I don't like the lack of hard reflections - personal taste or possibly environment mod in use? Here is a real life example of another tower on a perfect day.
.https://s-media-cache-ak0.pinimg.com...ighthouses.jpg

The chart icon is better, prefer the "spare" one I think. I'll try and search for an example of an old imperial unit (Feet and fathoms with the Lateral system of buoyage) admiralty chart showing light symbols - I'm sure they were more discrete.

Sorry if a bit negative. Presumably when this one is perfect all the others will be easy:)l:Kaleun_Thumbs_Up:

regards,

MLF

http://www.subsim.com/radioroom/data...gAxQAYoAMUAf/Z


All times are GMT -5. The time now is 03:55 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.