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)

MLF 07-17-17 12:18 PM

1 Attachment(s)
Quote:

Originally Posted by gap (Post 2500695)
.



I thought shadows didn't work in SHIII, and the model I sent you has no shadow models/controllers. Where are shadows coming from lol :)

I don't think I meant shadows, but more light and shade.



Quote:

Originally Posted by gap (Post 2500695)
.Okay, I don't know if they can make reflections more obvious, but there are some properties in the water reflection controller that we can play with. I see your lighthouse has some nice reflections, how did you se them?

I added water reflection to all nodes with the following settings:-

ClipHeight = 0
Reflection = 1
Refraction = 1
FrustumTest = False (What IS that???)
MaxVisDistance = 0.0
MinVisDim = 0.02
MaxVisDim = 0.2

Basically I think they were the settings Kendras used on his lighthouse at the beginning of the thread so I used them as they worked.



Quote:

Originally Posted by gap (Post 2500695)
Nice! What lighthouse is that? :D

It's actually a 3DsMax model at the following link:-
https://free3d.com/3d-model/light-ho...ble-96732.html


Not sure what light house it is, but it looked so decrepit I thought it would be a good one to start with. It still needs work, especially with scaling. really need to get my head around Blender as my 3Ds Student license has expired. I've attached another screenshot with La Plate in the distance (same positions as La Veille and La Plate) and it's obvious the scale is out. Any observations and suggestions would be appreciated. Also the texture, although I tried to include OA seems a bit flat - all trial and error.

Quote:

Originally Posted by gap (Post 2500695)
I know a tower raising directly from the waves is a bit weird, if this is what you mean, but that's exactly how the Petite Vielle looks like. Other lighthouse will be more conventional :up:

http://www.dirm.nord-atlantique-manc...58-1-3714e.jpg

You are right, of course. Also the smooth sea in my screenshots doesn't help.

regards,
MLF

Kendras 07-17-17 12:33 PM

I think the easiest way is to set all 3D models as land units, or all 3D models as terrain objects. :yep:

Kendras 07-17-17 12:59 PM

Even with values without decimal digits in .mis file, and corresponding values without more than 6 decimal digits in locations.cfg, both models are not aligned.

Long=-571143 ----> -4.759525
Lat=5764737 ----> 48.039475

:k_confused:

gap 07-17-17 01:31 PM

Quote:

Originally Posted by Kendras (Post 2500871)
Even with values without decimal digits in .mis file, and corresponding values without more than 6 decimal digits in locations.cfg, both models are not aligned.

Long=-571143 ----> -4.759525
Lat=5764737 ----> 48.039475

:k_confused:

During your tests, was the heading for both rock and lighthouse set to 0?

gap 07-17-17 03:39 PM

Quote:

Originally Posted by Kendras (Post 2500844)
could you change your excel sheet in order we can calculate what are the new coordinates in degrees ? Sorry, I can't see the formula ("read only"). I guess I have to divide by 120000 ?

So the new coordinates are :

Long=-4.75953125
Lat=48.039475

instead of :

Long=-4.759531
Lat=48.039481

Your calculations are right: in SH games, each degree of latitude/longitude is always equal to 120 km, so for converting from lat/long coordinates expressed as decimal degrees to offsets from the equator/Greenwich meridian in meters, you have to multiply by 120,000.

I won't update the spreadsheet until we discover where the slight error is coming from (hoping that we do). In the meanwhile you can see the formula of my spreadsheet by unprotecting it (Menu 'Review' => 'Unprotect Sheet'). No password is set :up:

Quote:

Originally Posted by Kendras (Post 2500864)
I think the easiest way is to set all 3D models as land units, or all 3D models as terrain objects. :yep:

Sure it is until we discover what is the issue with the different coordinate formats used in SHIII. If we do,
If we don't, we will set the rock as a land unit rather than as a location, or as a library equipment, similar to the lantern and other subobjects. :03:

Quote:

Originally Posted by Kendras (Post 2500871)
Even with values without decimal digits in .mis file, and corresponding values without more than 6 decimal digits in locations.cfg, both models are not aligned.

Long=-571143 ----> -4.759525
Lat=5764737 ----> 48.039475

:k_confused:

Something I would be interested to know is: did your many failed tests change at least a bit the relative position of the two parts (making the alignment a bit worse or a bit better, moving the rock from one side of the lighthouse to the other, etc.), or not? :hmm2:

gap 07-17-17 04:13 PM

Quote:

Originally Posted by MLF (Post 2500857)
I don't think I meant shadows, but more light and shade.

:up:

Quote:

Originally Posted by MLF (Post 2500857)
I added water reflection to all nodes with the following settings:-

ClipHeight = 0
Reflection = 1
Refraction = 1
FrustumTest = False (What IS that???)
MaxVisDistance = 0.0
MinVisDim = 0.02
MaxVisDim = 0.2

Basically I think they were the settings Kendras used on his lighthouse at the beginning of the thread so I used them as they worked.

Thank you. I have Reflection/Refraction parameters set as in your model. I doubt other parameters have any impact on the quality of the reflections, but on their appearance/disappearance based on distance from the model, on its rendered size on screen etc (BTW: in short, FrustumTest makes reflections to fade out when their parent object is out of camera).
Curiously, the version of WaterReflection I am using has not MaxVisDistance parameter. Are there two versions of the controller? Might the version you are using lead to a better visual quality of the effect? Other than that, I can only think that I have checked the DX2/3 compression flag of the texture used for reflection. This, indeed, might have an impact on their quality :hmm2:

Quote:

Originally Posted by MLF (Post 2500857)
It's actually a 3DsMax model at the following link:-...

Not sure what light house it is, but it looked so decrepit I thought it would be a good one to start with.

Sure, I had seen that model long ago, and I think I already have in on my HD. It is very nice indeed, though I don't think it represents any real lighthouse in particular and, if memory serves me well, its poly count is a bit too high for our needs :)

Quote:

Originally Posted by MLF (Post 2500857)
It still needs work, especially with scaling. really need to get my head around Blender as my 3Ds Student license has expired. I've attached another screenshot with La Plate in the distance (same positions as La Veille and La Plate) and it's obvious the scale is out. Any observations and suggestions would be appreciated.

Learning Blender is a good idea; despite its counter-intuitive UI, I think it is a good and poweful program. I am also slowly learning it, especially for model post-processing. For modelling, my tool of election is still Wings-3d. Should you decide to switch to it, while you learn the more complicated Blender, I am sure you will find many valid tutors on the forum, me included :03:

Quote:

Originally Posted by MLF (Post 2500857)
Also the texture, although I tried to include OA seems a bit flat - all trial and error.

That's true. Texture map settting is much more complicated, unreliable and restrictive in SHIII than in it is in SHIV and 5. The good thing is that the more we make mistake, the more we learn. With this mantra in mind, I also plan adding specular and bump maps to the La Plate model (as you might have noticed, the AO map is overlapped to the diffuse map), but I am leaving those as the last task :D

Kendras 07-18-17 02:26 AM

Quote:

Originally Posted by gap (Post 2500921)
I won't update the spreadsheet until we discover where the slight error is coming from (hoping that we do).

Sure it is until we discover what is the issue with the different coordinate formats used in SHIII.

:rotfl2:

Problem solved !

MLF 07-18-17 02:57 AM

Hi Gap,

Quote:

Originally Posted by gap (Post 2500931)
:up:

Sure, I had seen that model long ago, and I think I already have in on my HD. It is very nice indeed, though I don't think it represents any real lighthouse in particular and, if memory serves me well, its poly count is a bit too high for our needs :)

I did a little research last night and I believe the model I converted is the Aniva Rock Lighthouse:-

http://www.michaeljohngrist.com/2011....JT0vfXZD.dpbs

Nice to know it "exists" :)

Regards,

MLF

MLF 07-18-17 03:54 AM

Quote:

Originally Posted by gap (Post 2500931)
:up:

Curiously, the version of WaterReflection I am using has not MaxVisDistance parameter. Are there two versions of the controller? Might the version you are using lead to a better visual quality of the effect? Other than that, I can only think that I have checked the DX2/3 compression flag of the texture used for reflection. This, indeed, might have an impact on their quality :hmm2:

i am using Skwas' S3Ditor Version 0.9.9.0. MaxVisDistance is a parameter when editing the Water Reflection controller/property.

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.

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?????

Regards,

MLF

Kendras 07-18-17 04:17 AM

How to properly choose and calculate coordinates
 
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



Kendras 07-18-17 04:25 AM

If you want to test yourself new coordinates, here is a little tool :

http://www.mediafire.com/file/54akqo..._-_mast_ref.7z

The land unit is a red mast (stored in environmental folder)
The terrain object is a blue mast

:up:

MLF 07-18-17 05:51 AM

1 Attachment(s)
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?

regards,

MLF

Kendras 07-18-17 06:04 AM

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?

regards,

MLF

Nice. :up:

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

MLF 07-18-17 06:28 AM

1 Attachment(s)
Quote:

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

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

Thanks.

I added the reflections to all nodes in the lighthouse_Parts.dat - 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. I'll see if I can improve on them but need to go out now for a couple of hours.

regards,

MLF

Kendras 07-18-17 07:42 AM

Quote:

Originally Posted by MLF (Post 2501052)
Thanks.

I added the reflections to all nodes in the lighthouse_Parts.dat - 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. I'll see if I can improve on them but need to go out now for a couple of hours.

regards,

MLF

Perfect ! :yeah:

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


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