Log in

View Full Version : Lighthouses in SH5


Seaowl
01-07-19, 03:24 PM
This thread is in some way a spin-off from the SH3 lighthouse thread. I cannot see much sense in it, to have two threads for discussing the creation of new 3D models, historical and technical issues or localization of lighthouses. If you want to do that, do it in the SH3 lighthouse thread. Doing it this way will confirm that all this information will stay bundled at one place.

The one and only goal of his thread shall be to achieve something for SH5, that was present right from the beginning in SH3: a working lighthouse model; one, whose flare you are able to see from far away and one you are able to place where ever you want.

How cool would it be to return at port at night by following the flare of a lighthouse or to regain orientation by it during a storm after one week of dead reckoning.

With the help of Gap or better: only throught the help of Gap, I was able to import Flakmonkeys beautiful lighthouse model to SH5.
Jeff-Groves helped me to make the fresnel shine, which where shut down, because I complicated the controller stuff.

Nothing more at the moment.
A raw imported SH3 lighthouse in SH5.

In the near future, I will try to do some basics: Creating ambient occlusion- and normalmaps, tweak the controllers (the range of the light is way too short), maybe importing it into some GR2 object, who knows.
None of this I have ever done before. So expect a lot of questions.

It would be nice, if someone could tell me, how to contact Flakmonkey for permission to use his lighthouse.

Although no screenshotmaster, here some pics (1,2,5 taken in Ecomod-ambiance):

https://i.postimg.cc/W46hJGY1/1.png (https://postimages.org/)

https://i.postimg.cc/J09kQ1Nr/2-1.png (https://postimages.org/)

https://i.postimg.cc/KYMvnn9M/2-2.png (https://postimages.org/)

https://i.postimg.cc/cJMPyCCz/2-3.png (https://postimages.org/)

https://i.postimg.cc/zGZVxzQM/2-4.png (https://postimages.org/)

Seaowl
01-07-19, 04:18 PM
Like announced the first question:
Is there a difference in scale you have to consider when importing units from SH3 to SH5?
Having stared too long at this lighthouse, I couldn´t tell, if its definitley too small.

Seaowl
01-09-19, 08:13 AM
In the meantime, I´ve found an answer on that question myself.
In TWoS there is a handy tool, called LXX-ruler, included.
So I was able to find out, that the heigth of the lighthouse in SH3 respectively in S3D, matches the height in SH5. Both are around 26,5 meters.
https://i.postimg.cc/5yKp3G39/4.png (https://postimages.org/)

In addition I managed to create a second map channel into the lighthouse .dat following this threat http://www.subsim.com/radioroom/showthread.php?t=135177

But now there is no way to apply the lightmap on the model: It works not the SH3 way to attach the lightmap directly at the main texture and not the SH4 way using unified render controller.
The latter gave me a lot of troubles, so it seems to me that it doesn´t work with land objects at all.
Probably herein lies the root of the short visibility of the lighthouse flare?
Whatever...
Does somebody knows something about the TDW_FXU_lighthouse_flare inside the library?
I tried to make it work instead of my SH3 flare, but didn´t succeed.

gap
01-13-19, 08:19 PM
Very nice! :up:

All the SH models from SHIII to SH5 use the same scale. I am sorry that you had to waste your time on checking that, before I could solve your doubts.

In the EcoMod as well as in TWoS there are rulers for measuring objects in game (from the style of the TWoS ruler, I think it is my work, but as I had completely forgotten about it, I created a similar one for the EcoMod). Nonetheless, the quickest way to measure game's 3D objects, is by exporting their meshes and measuring them in a 3D modelling software. One unit measured in any of the commonly used 3D program is equal to ten in-game meters.

If you specify what kind of lightmap you want to add to the model, maybe I can help you with it.

Finally, IIRC TDW's particle effects are done in a way that they can only be edited using an hex editor. You can use his flare effect as it is, but its particle generator(s) might be pointing to textures and materials contained in FXUpdates, so you need to have that mod (or TWoS) installed for the effect to work...

Jeff-Groves
01-15-19, 02:56 PM
It would be nice, if someone could tell me, how to contact Flakmonkey for permission to use his lighthouse.


FlakMonkey has not logged in since 06-20-2017

Just follow the Guidelines posted here...
http://www.subsim.com/radioroom/showthread.php?t=115983


You will need to add the Normals to the 3D model as it does not have them.
Until that is done you will never get normal textures to work.
Same with the AO

Jeff-Groves
01-15-19, 05:50 PM
Now here's an interesting thought.
SH4 has no listing of the Unified render controller in it's core files.
(The act files and such.)
SH5 has one but seems to be only an error message thing possibly for devs?

I wonder what would happen if a new shader was placed in the Shaders folder? Say a modified Unifiedrender controller shader with the caustics stuff removed?
Then edit the controller in the dats to remove the caustics stuff.
Would need to be done by hand in Hex of course.

IF it works with no issues? Could be a door to add things to SH4 style dats.

gap
01-15-19, 05:55 PM
IF it works with no issues? Could be a door to add things to SH4 style dats.

What do you have in mind exactly? :D

Jeff-Groves
01-15-19, 05:58 PM
What do you have in mind exactly? :D

If we can edit the Unfiedrender as I stated and it works?
I'm thinking we may be able to ADD to it.
Maybe even create new shaders.

gap
01-15-19, 06:02 PM
If we can edit the Unfiedrender as I stated and it works?
I'm thinking we may be able to ADD to it.
Maybe even create new shaders.

ADD dynamic shadows maybe? :hmmm:

Jeff-Groves
01-15-19, 06:10 PM
ADD dynamic shadows maybe? :hmmm:

I have not found anything that calls the shaders in the core files other then the pointer to the shaders folder.
Kind of a read this folder pointer.
So what stops adding a new folder with a new shader?
Now I don't know the limits of what could be added but maybe our friend could give us a clue?
:03:

gap
01-15-19, 06:19 PM
I have not found anything that calls the shaders in the core files other then the pointer to the shaders folder.
Kind of a read this folder pointer.
So what stops adding a new folder with a new shader?
Now I don't know the limits of what could be added but maybe our friend could give us a clue?
:03:

Hopefully yes. He told me he won't have access to the game until February but that's definitely something worth asking. He might also have an answer on why dat objects and particles are not visible through the sea surface, and why they look so blurred when seen underwater. That could be something shader-related...

Seaowl
01-15-19, 09:30 PM
@Gap: Thank you.
:up:
it was - like you suggested in the modding thread – essential keeping seperate things seperate.
Finally - I don´t know after how much unsucessful attempts (no idea what I was doing wrong in the end) - I got it working:

The lighthouse is now defined as landunit, can be positioned by mission-editor and as landunit the flare ranges after first estimation about 17 km (don´t know how much weather like fog affects the range). Pretty much like the lightship-flare. It´s a nice effect: You first see the lighthouse and after a while the city lights appear.
Have to experiment a little with ParticleGenerator, if range could be extended a bit more. But have to look into some Env-files too. No popping up observed.

Now as your Ecomod-Helgoland is near completion, I should find out the SH5 coordinates of lighthouses like Roter Sand, Hohe Weg, Arngast. But I see the next problem appearing:
These are mostly Offshore-Lighthouses; so I will try what happens, if I turn for example the LSH15 Roter Sand into a sea unit.

About AO-mapping:
At the moment Blender keeps me busy. To avoid troubles for not having Unified Render Controller, I have chosen a sea unit - namely the Harbour Tug - for first trials in AO-mapping.
Meanwhile I got stuck in renovating and it will take me some time to split up the modell.
I´am planning to seperate hull, superstructure, deckstuff and the mast, taking individual lightmaps and combining them in one AO-map in the end. I think thats the way it is done?
After that I will see whats the trouble with the lighthouse.

@Jeff-Groves: Thanks for the hint with the normals. As I understand it, it would be enought to import the lighthouse into Blender and recalculate the Normals?
And some really working Unified Render Controller with transparent water and shadows would be great for sh5.

gap
01-17-19, 12:47 PM
@Gap: Thank you.
:up:
it was - like you suggested in the modding thread – essential keeping seperate things seperate.
Finally - I don´t know after how much unsucessful attempts (no idea what I was doing wrong in the end) - I got it working:

The lighthouse is now defined as landunit, can be positioned by mission-editor and as landunit the flare ranges after first estimation about 17 km (don´t know how much weather like fog affects the range). Pretty much like the lightship-flare. It´s a nice effect: You first see the lighthouse and after a while the city lights appear.
Have to experiment a little with ParticleGenerator, if range could be extended a bit more. But have to look into some Env-files too. No popping up observed.

Cool! :up:


Now as your Ecomod-Helgoland is near completion, I should find out the SH5 coordinates of lighthouses like Roter Sand, Hohe Weg, Arngast. But I see the next problem appearing:
These are mostly Offshore-Lighthouses; so I will try what happens, if I turn for example the LSH15 Roter Sand into a sea unit.

When you hoover the pointer on the world map, Mission Editor's status bar should provide information on local Lat/Long (both in deg/min format and as metric offsets). For very accurate object placing you can edit manually .mis files, where unit coordinates are expressed as meters. There used to be a tool by TDW converting from real world coordinated to SH meter offsets, and I can provide you with a spreadsheet doing the same, but knowing that in the SH world 1 degree is equal to 120 km, (1 min = 2 km, 1 sec = 33.33 m) and that the origin is at the intersection between the equator and the Greenwich meridian, you can do the math yourself (negative offsets for southern latitudes and western longitudes).

Laying "land units" on the seabed shouldn't be an issue. IIRC, Mission Editor refuses to place them in the middle of the sea, but you can drop offshore lighthouses on a nearby land area, and then adjust their placement as I described above. Indeed, using this method you will have to adjust unit's height manually, but that's not a big problem either.

On a side note: on 3D Warehouse there are a couple of models of the Roter Sand (https://3dwarehouse.sketchup.com/search/?q=roter%20sand&searchTab=model) lighthouse, one of which is nicely detailed, and a lesser detailed but still acceptable model of the Arngast (https://3dwarehouse.sketchup.com/model/37a74025bc7853701d8dd49d479890e3/Leuchtturm-Arngast). :03:


About AO-mapping:
At the moment Blender keeps me busy. To avoid troubles for not having Unified Render Controller, I have chosen a sea unit - namely the Harbour Tug - for first trials in AO-mapping.
Meanwhile I got stuck in renovating and it will take me some time to split up the modell.
I´am planning to seperate hull, superstructure, deckstuff and the mast, taking individual lightmaps and combining them in one AO-map in the end. I think thats the way it is done?
After that I will see whats the trouble with the lighthouse.

Adding AO map to SHIII models is a bit complicated. Unless the model you are importing has entirely non-overlapping UV projections, you need to combine all its parts into one model making sure that every piece goes in its correct position (node translation/rotation must be considered), make a copy of the combined model, resize/re-sort (note: re-sort, not re-do; I will tell you the reason a little below) its UV projections so that they don't overlap with each other, and bake the AO map. At this point you can split again the combined model, making sure that you follow exactly the same steps with its two copies (the original one textured with the diffuse texture and the copy textured with the AO texture). This is important because the two of them must be imported together, and for S3ditor/GR2 Editor to accomplish this task correctly, not only the diffuse and the AO model must have the same number of vertices and faces, but the order of xyz vertex coordinates, uv coordinates and face definitions must be the same for the two sets of meshes. Completely redoing the AO UV map, or accomplishing different modifications (or the same modifications but in different order) on the AO models than on the diffuse models, will most probably scramble vertex and/or face order, thus causing errors in the AO mapping once the models are imported in game.
For your first model imports I recommend you to follow the workflow I described above, but once you grasp its fundaments, you can eventually develop your own method, depending on the tools that you are using :up:


@Jeff-Groves: Thanks for the hint with the normals. As I understand it, it would be enought to import the lighthouse into Blender and recalculate the Normals?

You are correct :yep:


And some really working Unified Render Controller with transparent water and shadows would be great for sh5.

Sure they would!

flakmonkey
01-20-19, 12:33 AM
FlakMonkey has not logged in since 06-20-2017

Just follow the Guidelines posted here...
http://www.subsim.com/radioroom/showthread.php?t=115983


You will need to add the Normals to the 3D model as it does not have them.
Until that is done you will never get normal textures to work.
Same with the AO

I'm still around, and as always, anyone has standing permission to use any of my old sh3 mods for anything they like :)

Seaowl
01-20-19, 03:25 AM
Thank you, Flakmonkey!

:salute:

Your lighthouse is an awesome model and still the best looking lighthouse in SH.
And what is more: it is functional out of the box in SH5.
I will change nothing at the 3D model itself
and of course - if there will be a release - give proper credits.

At the moment I´am working out some coordinates to place it in the first two campaigns.
Had some saving troubles, but now hopefully everything will go well.

:yeah:

Seaowl
01-26-19, 04:32 AM
Small update for my part: Have localized lighthouses for regions where the first campaign takes place.
The coordinates match not to 100% the real world coordinates.
Thats not possible, because the SH5 world differs from the real world.
I tried to find the most plausible spot for lighthouses on the SH5 map near their real-world-locations.
As source I used mainly wikipedia. The lighthouses names are their present-days names (consistently without diacritical signs).

https://i.postimg.cc/bNgThDCz/LHs.png (https://postimg.cc/qztncRHY)


Reading Gap´s last information about his Ecomod, it seems to be best to wait with any further work on placing lighthouses until Gap proceeds.
I wasn´t able to place important lighthouses, because rocks and islands are missing.
Perhaps I will compile a list of those around Great-Britain, Ireland, Sweden, Norway.

Problem until now is:
Some .dat files appear in SH5, others don´t, even though I do exactly the same things, when importing them.
Will search through the TDW-unit-import-thread to find a solution.

The next step will be to import the lighthouse into a .GR2 file, namely the „church“ file.
To begin with I will do it without AO- or Normalmaps, because I had troubles with flickering.
Will follow TDW´s instructions and cry for help.
If someone knows some coprehensible tutorial, I would be grateful.

gap
01-26-19, 09:50 AM
Small update for my part: Have localized lighthouses for regions where the first campaign takes place.
The coordinates match not to 100% the real world coordinates.
Thats not possible, because the SH5 world differs from the real world.

Can you please make a quick list of the lighthouses whose real location didn't find an exact match in the SH5 world?


I tried to find the most plausible spot for lighthouses on the SH5 map near their real-world-locations.
As source I used mainly wikipedia. The lighthouses names are their present-days names (consistently without diacritical signs).

Don't always trust wikipedia: I don't say that its information is wrong, but more often than not the coordinates it offers are an approximation of the real locations. For still existing lighthouses, I always check them with Google Earth.

On a side note: the best all-around website on lighthouses that I have found so far is the lighthouse directory (https://www.ibiblio.org/lighthouse/). Other websites with nautical charts that I like checking for minor and lesser known lights and beacons not listed elsewhere, are the following:

http://map.openseamap.org/
http://fishing-app.gpsnauticalcharts.com/i-boating-fishing-web-app/fishing-marine-charts-navigation.html


Reading Gap´s last information about his Ecomod, it seems to be best to wait with any further work on placing lighthouses until Gap proceeds.
I wasn´t able to place important lighthouses, because rocks and islands are missing.
Perhaps I will compile a list of those around Great-Britain, Ireland, Sweden, Norway.

Yes please!


Problem until now is:
Some .dat files appear in SH5, others don´t, even though I do exactly the same things, when importing them.
Will search through the TDW-unit-import-thread to find a solution.

That's weird. Check if their 3D coordinates don't place them below the terrain/seabed level. Did you set them as terrain objects or as land units?


The next step will be to import the lighthouse into a .GR2 file, namely the „church“ file.
To begin with I will do it without AO- or Normalmaps, because I had troubles with flickering.
Will follow TDW´s instructions and cry for help.
If someone knows some coprehensible tutorial, I would be grateful.

Always make sure that the GR2 file you start from, fits your present and future needs.

Most stock terrain objects lack 'bump' and 'additional bumpmap' (i.e. normal map) support. In addition to that, the model you have chosen also lacks "self-illumination" (i.e. ambient occlusion map) support. That is okay, because you said that you don't want your model to feature those maps, but if in future you will decide to add them, you might be forced to re-import your model in another GR2 file with a better texture support; in theory, on loading any GR2 file the latest GR2 Editor versions let you choose whether you want to add the missing strings to the file, but that never actually worked for me.

Something else you should look, is the number of meshes of the base_GR2 file, because you can't add new meshes. Church.GR2 has only two meshes, one for the visible model and one for the collision model. That's okay if you want to import you lighthouse as one mesh, but if you wanted to split it in one or more parts, or if you wanted it to use a lowpoly water reflection model you might better pick some other GR2 file with more than two meshes.

Lastly, I have recently discovered that the HarborObjectCtrl, used in SH5 for the rendering of snowy textures during winter and of windows lights at night, doesn't work on my pinnacle rock texture, probably because - looking for normal map support - I imported it the GR2 file of one of the icebergs which obviously don't need that controller. As you see, it is a matter of compromises, and often you will have to trade off some features for some other features :)

Seaowl
01-26-19, 03:35 PM
Of course Wikipedia has not the same level of information as sources altogether dedicated the lighthouse-topic.
On the other hand, it is a good point to start with:
you are not overwhelmed, the information is clearly arranged, there are direct links to OpenStreetMap and – because both are given – you haven´t to convert degrees into decimal values.

My workflow was as follows: Following the coordinates, I tried to find approximately the location of the lighthouse on the SH5 map.
Then I compared the location on the SH5 map with the location of the lighthouse shown at OpenStreetMap.
In the end I placed the lighthouse on the SH5 map at that position, where I had the impression, it would represent best his real world position.
Often I put it nearer to the shore or at some nice shore nose around.

Two examples:

Grottuviti lighthouse at Island: The position 64.165°/-22.02195° provided by Wikipedia is located at sea on the Sh5 map.
In SH5 the island Grotta – the original place of Grottuviti – isn´t modelled.
But a little southward there is a island on the SH5 map, where OpenStreetMap indicates mainland.
Hence I placed Grottuviti there, at: 64.155472°/-22.030581.

Vardo lighthouse in the North-east of Norway: The Wikipedia position 70.38876°/31.15635° is – although near the shore – at sea.
The whole islands there aren´t modelled in detail.
Finally I placed the lighthouse at 70.389732°/31.151344° at some tongue of land .
And so on.

In addition there is only a fraction of the real world lighthouses into that Mis-file.
At the moment my foremost goal is not to have an exact real world representation (what wouldn´t be possible), but to see the effect of these lighthouses during campaign.

But probably I could convert the OpenSeaMap values and insert them into the Mis-file.
Then one could clearly see, where the lighthouses on their original location, were misplaced or not on the SH5 map.

That´s the one thing, the other thing are missing rocks and islands.
I have to lump together my hand written notes on them or collect the information anew.
It will take some time.

Concerning GR2 file import: At the moment I´am in a sort of trial and error stage.
I would be happy, if I succeed to import the lighthouse in its most basic form.
Once I´ve figured out how it works, I will take into account all these aspects you mentioned.
Thanks for that.

And I will have an eye on the 3D-coordinates of the Dats.
Thanks for that hint, too.
Next thing I will try is to import a non-working model into a working one.
Most likely I only overlook some small detail, as always.
:Kaleun_Salute:

Seaowl
02-02-19, 06:25 AM
See the difference!

From close up (with shadow!):

https://i.postimg.cc/8k6y2XWy/comp.png (https://postimages.org/)

https://i.postimg.cc/nLPh8h7Q/LHup.png (https://postimages.org/)



From far away:


https://i.postimg.cc/43MzxZtr/LHfar.png (https://postimages.org/)




The left one is the lighthouse imported into gr2 files, the right one the common dat file.
Additionaly I have added an AO- and a Normalmap.
Of course there´s quite a room for improvement.
Especially concerning Blender, I´m not fully aware of what I´m doing.

Next step will be to understand how this bones-stuff works for adding the lighthouse-flare.

Because I´m intending to place a seperate model into the library, I´ve removed the lense from the lighthouse.


https://i.postimg.cc/SQtJ0V6v/LHLat.png (https://postimages.org/)

gap
02-02-19, 09:58 AM
Well done Seaowl! :Kaleun_Applaud:

Your first GR2 import looks promising, and your GR2/DAT comparison is very useful. Besides the obvious eye candy of dynamic shadows, It also demonstrates that GR2 model look much sharper too, though the additional texture maps you have added to the GR2 version of Flakmonkey's model, the in-memory texture compression/sampling settings (for the DAT version) might also play a role in that. I have a few questions/remarks.

Have you tried adding a specular map in the alpha channel of the main (diffuse) texture? A well done specular map can do miracles in increasing the realism of models.

Are the lighthouses set as terrain objects or as land units?
If the latter is true, you can add a LOD model for the GR2 version. Just look at stock sea/air units to see how their LOD models are set.
If the contrary is true (i.e. the lighthouses are simple terrain objects) no LOD model is possible, but I am curious to know if you applied this method (http://www.subsim.com/radioroom/showpost.php?p=2587403&postcount=81) to increase the rendering radius of the GR2 model.

Are the texture/materials of the DAT lighthouse version set as in SHIII or SHIV? SHIII has a limited multi-material support, but SHIV's UnifiedRenderController enables DAT models to have as many maps and textures as SH5's GR2 models and to similarly use dds (compressed) textures instead of tga ones. It would be interesting if we could put side by side a DAT and GR2 model at their respective best, and see how they will compare in game.

I can be wrong, but I seem to see a smoothing problem near the base of the model (below the door). If that's true you can solve it by splitting some of the model edges. Since you are using Blender, there is a edge split modifier (https://docs.blender.org/manual/en/latest/modeling/modifiers/generate/edge_split.html) you can use for quickly performing that task. :)

Storing the lamp/lens model and the flare effect in separate files than the main model is a good idea. If the main model is set as a unit, you can link the lamp to it by equipment node/bone and date-configurable .eqp file or, for any other type of model, via placement nodes (for DAT units) or via bones and .prt file (http://www.subsim.com/radioroom/showpost.php?p=2095069&postcount=1) (for GR2 units).
Creating new bones using GR2 Editor is not hard: you need to check and select one of the existing bones, right click on it and select "clone bone". Renaming the new bone, changing its parent bone and editing its position within the model is quite straightforward but let me know if you need help. Just note that the latest GR2 Editor version don't handle bones very well, so make backups (in case you file gets corrupted) and in case you fail performing the clone upload here you file and I will see which one of the previous GR2E versions I have on my HD will work better with it :up:

Seaowl
02-02-19, 01:33 PM
Thanks for the reply, Gap.

Have you tried adding a specular map in the alpha channel of the main
(diffuse) texture? A well done specular map can do miracles in increasing the realism of
models. For shading I have used the „Principled BSDF“ with Cycles Renderer in Blender 2.80-beta.
The Alpha channel of the texture is enabled, but consciously I haven´t added any special specular map.
In the „Principled BSDF“ though, I had to change some values particulary the roughness, to obtain an acceptable result.

But I suppose, it´s far from perfect and I´am thankful for every instruction.
As I said above: I´am at the very beginning of using Blender.
It´s a lot of fun but a ongoing trial and error.

Are the lighthouses set as terrain objects or as land units?
If the latter is true, you can add a LOD model for the GR2 version. Just look at stock
sea/air units to see how their LOD models are set.
If the contrary is true (i.e. the lighthouses are simple terrain objects) no LOD model is
possible, but I am curious to know if you applied this method (http://www.subsim.com/radioroom/showpost.php?p=2587403&postcount=81) to increase the rendering
radius of the GR2 model.
In my first attempts I set – as you have shown me – the lighthouse as terrain unit:
The problem was, that the lighthouseflare dissappeared like switched off in a distance of about 2700 meters;
the model itself was visible only a little bit longer (about 3500 m).

Later – likewise following your suggestion – I set the lighthouse as land unit.
Since then visibility is no issue any longer.
There is no noticeable popping up of the model itself.
The flare is visible from about 16-17 km.
(Edit: I refer here to the Dat-file flare. Don´t know how a GR2-lense with Goblineditor set particle-controller will act.)

Of course: the flare of real lighthouses reaches a lot farther.
Though thats a problem to address later.

As shell-unit figures the LCD_Bunker_Large file.
So far I haven´t neither added any LOD-model, nor changed
the Reflect and DMG_col mesh of the original unit.
I will deal with them in the next turn.


Are the texture/materials of the DAT lighthouse version set as in SHIII or SHIV?
SHIII has a limited multi-material support, but SHIV's UnifiedRenderController enables
DAT models to have as many maps and textures as SH5's GR2 models and to similarly
use dds (compressed) textures instead of tga ones. It would be interesting if we could
put side by side a DAT and GR2 model at their respective best, and see how they will
compare in game.
I have used the original SH3-dat.
Never managed to append AO-maps and Bumpmaps to converted SH3 units in SH4.
But – as far as I remember – in KSD-2 (really great mod by the way) there is a simplified model of Flakmonkeys lighthouse with additional Ao-map.
Could try to import it and – if there is any significant difference – post some comparision screens.


I can be wrong, but I seem to see a smoothing problem near the base of the model (below the door). If that's true you can solve it by splitting some of the model edges. Since you are using Blender, there is a edge split modifier (https://docs.blender.org/manual/en/latest/modeling/modifiers/generate/edge_split.html)you can use for quickly performing that task.
You are right, there is a problem.
Will try to solve it with edge-splitting.

Thanks again to taking the time to answer
and providing all the tips and hints.

:Kaleun_Salute:

gap
02-02-19, 05:24 PM
For shading I have used the „Principled BSDF“ with Cycles Renderer in Blender 2.80.
The Alpha channel of the texture is enabled, but consciously I haven´t added any special specular map.
In the „Principled BSDF“ though, I had to change some values particulary the roughness, to obtain an acceptable result.

But I suppose, it´s far from perfect and I´am thankful for every instruction.
As I said above: I´am at the very beginning of using Blender.
It´s a lot of fun but a ongoing trial and error.

I know very little about rendering programs but how do your work with Cycles Renderer applies with the textures and materials we see in game?


In my first attempts I set – as you have shown me – the lighthouse as terrain unit:
The problem was, that the lighthouseflare dissappeared like switched off in a distance of about 2700 meters;
the model itself was visible only a little bit longer (about 3500 m).

That's true. As I have discovered with the input of Jeff, the rendering distance of terrain objects is proportional to the radius of their bounding sphere, so if you want to increase it, you need to add a dummy mesh to your model. A big triangular face under the soil level (so that it can't be seen) will do the trick. How big, is a matter of trial and error


Later – likewise following your suggestion – I set the lighthouse as land unit.
Since then visibility is no issue any longer.
There is no noticeable popping up of the model itself.
The flare is visible from about 16-17 km.
Of course: the flare of real lighthouses reaches a lot farther.
Though thats a problem to address later.

IIRC, units' rendering radius in stock game is 20 km. Beyond that limit, all the units are treated as immaterial points. One of TDW's patches can increase this limit. During your tests the lighthouse flare might have disappeared because you had trespassed that limit, or because the size of the effect had become too small compared to your creen resolution.


As shell-unit figures the LCD_Bunker_Large file.

That's the bunker I have imported in game for TWoS. In general I wouldn't recommend you to use modded files for your own mods. Due to the unfinished state of GR2Editor, the modding of GR2 Editor might corrupt GR2 files in a way that it won't be obvious until you you try performing certaing operations on them :yep:


So far I haven´t neither added any LOD-model, nor changed
the Reflect and DMG_col mesh of the original unit.
I will deal with them in the next turn.

You could attach the water reflection controller directly to the main model and replace the current reflect model with a simple dummy mesh with no controller atached to it, or you could create a low poly version of the main model (e.g. using Blender's decimate modifier) and use it as reflect and LOD model.


I have used the original SH3-dat.
Never managed to append AO-maps and Bumpmaps to converted SH3 units in SH4.
But – as far as I remember – in KSD-2 (really great mod by the way) there is a simplified model of Flakmonkeys lighthouse with additional Ao-map.
Could try to import it and – if there is any significant difference – post some comparision screens.

Do you have SHIV? If not, just check one of the DAT ships included in TWoS to understand how the unified render controller works. It should be okay using it on units as well as on terrain objects.


You are right, there is a problem.
Will try to solve it with edge-splitting.

Okay :up:


Thanks again to taking the time to answer
and providing all the tips and hints.

:Kaleun_Salute:

My pleasure :salute:

Let me know if in future you decide to experiment with the HarborCtrl controller (the one used in SH5 for adding night lights and winter snow to terrain objects). I tried adding it to my sea stack model but it didn't work probably because I imported it in the GR2 file of one of the stock sea units, (not a terrain object). I am not 100% sure about that, but here might be something in the materials of terrain objects that makes the said controller to work.

Seaowl
02-03-19, 08:24 AM
I know very little about rendering programs but how do your work with Cycles Renderer applies with the textures and materials we see in game?
Due to deleting the original material, my first import of the lighthouse looked like that:

https://i.postimg.cc/B6m3DLQk/spec1.png (https://postimages.org/)



So I tuned Specularity down and Roughness up.
(and applied face and edge smoothing of course)
These changes are transfered via the mtl. file.
In that case - as far as I´ve seen - especially by the Ns., Ks. and Illum values.
Is that the way, how the specular map works?


The Renderer itself appears only indirectly in game.
For exampel: the way you are doing AO-maps is determined by the specific renderer.
After a lot of efforts, I´m meanwhile able to create AO-maps in Cycles
(In the beginning they were pitch black), in Eevee or so, for whatever reason,
I´m at the moment not.

Would be interested, if AO-maps created with Cycles look differend from AO-maps created with other Renderers? Or if differences are only a matter of settings?


But concerning AO-maps: I would be thankful for every tip,
how to set up options and values to achieve good results in SH5.


Thanks at this point at the creator of ObjSort too:
Have to find the post with the link again, where I downloaded it from,
to give proper credit.
A great tool, that works very well and saves me a lot of time!


That's the bunker I have imported in game for TWoS. In general I wouldn't recommend you to use modded files for your own mods.



Initially I intended to use the church file as shell-file.
But when you open it, the church itself is miles away from zero point.
Annoyed by scrolling, I choose the bunker file instead and it was a good decision.
It´s a great import. :Kaleun_Applaud:

As you mentioned above, it´s cool to have the possibility to add AO- and Normalmaps.
And likely sooner or later, I will be able to make use of the damage and reflection model too.
Why there is an additional Bump map material: Bunker_Large_AB?
Would I be able to apply a Normalmap and a Bumpmap at the same time?

Until now I had no problems with the bunker file.
After all I read, I have expected much more instability.

IIRC, units' rendering radius in stock game is 20 km. Beyond that limit, all the units are treated as immaterial points. One of TDW's patches can increase this limit.
I need to test this again and moreover I will try to find this patch of TDW.

Do you have SHIV? If not, just check one of the DAT ships included in TWoS to understand how the unified render controller works. It should be okay using it on units as well as on terrain objects.


Yes, I have SH4. I will try to import Flakmonkeys lighthouse with SH4 features into SH5.
But – as far as I remember – the trouble with using unified render controller in SH5 is, that it doesn´t work with land units or terrain objects?

Yesterday, I managed to import the lense into the AmmoBoxGR2.
I dropped this file into the library.
It was easy to change the bone-position and to modify the lighthouse.eqp.
Problems started, as I attached a corresponding sim-file and tried to set the ParticleGenerator.
The lense vanished in Game as well as in Goblineditor.
Will experiment a bit more.
In the next step, I plan to transform the TDW_FXU_lighthouse_flare into a lense.sim.

And since you made me curious about this HarborController, I will have a look at it, as soon as possible.

Jeff-Groves
02-03-19, 09:26 AM
Thanks at this point at the creator of ObjSort too:
Have to find the post with the link again, where I downloaded it from,
to give proper credit.
A great tool, that works very well and saves me a lot of time!

Your welcome.
:03:

http://www.mediafire.com/file/lzcrdp7mlx59jjf/ObjSort.7z

Seaowl
02-03-19, 11:03 AM
Thanks again! :Kaleun_Thumbs_Up:


Helped a lot to clear the first hurdle.
In continuous use now...

gap
02-03-19, 11:39 AM
Due to deleting the original material, my first import of the lighthouse looked like that:

So you left GR2 Editor to update material properties from the mtl file of the imported model, didn't you?
That's a cool feature of GR2 Editor that IIRC is missing from Silent3ditor though I often skip the material import part and I keep stock materials. My bad for doing that: stock material settings are quite dull.


So I tuned Specularity down and Roughness up.
(and applied face and edge smoothing of course)
These changes are transfered via the mtl. file.
In that case - as far as I´ve seen - especially by the Ns., Ks. and Illum values.

In other words you use Cycles for setting up the material properties that get exported in the .mtl file. Good :up:


Is that the way, how the specular map works?

See the specularity and roughness parameters stored in .mtl files as the luminosity/contrast knobs of an old TV. They can change the global appearance of an image on screen, but if the screen displays an uniform background, messing with those knobs won't improve that much its look.
More specifically, the roughness parameter governs the strength of the normal map; if no bump/normal map is used, I think roughness will do nothing. Conversely, the specularity parameter governs the intensity of the specular map, i.e. the strength of the texture used for defining the shininess of different portions of the same material; the lighter a portion of specular map, the more shiny the corresponding material will be rendered. In your case, using no specular map is equal to using a full white specular map which, on turn, determines all the strength of the specularity parameter to be applied to the material(s), with overly bright or dark objects showing no significant highlights (as with your first lighthouse import which looked 'entirely bleached').

For more on specular map and on their usage in conjunction with bump/normal maps see the following links please:

https://wiki.splashdamage.com/index.php/Specular_Maps
http://www.rastertek.com/dx10tut21.html
https://learnopengl.com/Lighting/Lighting-maps

Talking in general, specular maps are quickly obtained from diffuse maps, by desaturating them, by enhancing their contrast, by reducing their gamma and possibly by "cutting" all the dark/medium greys so they look black. Nonetheless, the reflective properties of various materials painted on the same texture have to be taken in consideration (wood or concrete are not as glossy as metal or wet stones), so different portions of the same specular map might need different treatments. Moreover, for very nice effects, you might want to blend on your specular maps fine detail which is not visible on the diffuse texture, so to simulate small surface features of glossy or semi-glossy materials that become visible only when we observe them from certain angles relative to the incident light :yep:


The Renderer itself appears only indirectly in game.
For exampel: the way you are doing AO-maps is determined by the specific renderer.
After a lot of efforts, I´m meanwhile able to create AO-maps in Cycles
(In the beginning they were pitch black), in Eevee or so, for whatever reason,
I´m at the moment not.

Would be interested, if AO-maps created with Cycles look differend from AO-maps created with other Renderers? Or if differences are only a matter of settings?


But concerning AO-maps: I would be thankful for every tip,
how to set up options and values to achieve good results in SH5.

AO maps are another topic. They are pre-rendered shadows based on the geometry of each object and on light rays simulating a diffuse light. Due to their topological nature, they require to be 'baked' on non-overlapping UV projections. I know Blender can bake decent AO maps, but I never used that feature. For my AO maps I use Mod Tool (https://developer.valvesoftware.com/wiki/Softimage_Mod_Tool), the free version of Autodesk Softimage which, as I was said, was the tool used by the devs.


Thanks at this point at the creator of ObjSort too:
Have to find the post with the link again, where I downloaded it from,
to give proper credit.
A great tool, that works very well and saves me a lot of time!

Correct me if I am wrong: is that the tool that sorts objects files for secondary (AO) UV map importing?

If yes, I think that tool is by Jeff Groves. I would appreciate if you could find its link and post it here :D

EDIT: ops... Jeff beated me to it LOL lol



Initially I intended to use the church file as shell-file.
But when you open it, the church itself is miles away from zero point.
Annoyed by scrolling, I choose the bunker file instead and it was a good decision.
It´s a great import. :Kaleun_Applaud:

Thank you sir :cool:

The big horizontal offset of stock meshes shouldn't have discouraged you though. I don't know exactly why devs set their objects that way (probably each model was part of a big scene with many objects that had to be arranged far from the origin, and when they exported them they didn't bother centering them again), but the displacement of stock meshes won't affect the centering of the new mesh. In any case, for terrain objects, only the vertical position of the object is important.


As you mentioned above, it´s cool to have the possibility to add AO- and Normalmaps.
And likely sooner or later, I will be able to make use of the damage and reflection model too.

Those are very easy: you just need to import a low poly version of your model, and to link the proper controllers to the corresponding bones.


Why there is an additional Bump map material: Bunker_Large_AB?
Would I be able to apply a Normalmap and a Bumpmap at the same time?

Don't ask me that. I don't know what's the exact meaning of this "additional bump map". It uses the same texture map as the "bump map" (which is actually a normal map by the way), and it is probably used for enhancing its effect, creating extra roughness. And yes, they are used at the same time.


Yes, I have SH4. I will try to import Flakmonkeys lighthouse with SH4 features into SH5.
But – as far as I remember – the trouble with using unified render controller in SH5 is, that it doesn´t work with land units or terrain objects?


It doesn't? I never heard that, but you could be right. Did you read that information on the forum?


Yesterday, I managed to import the lense into the AmmoBoxGR2.
I dropped this file into the library.
It was easy to change the bone-position and to modify the lighthouse.eqp.
Problems started, as I attached a corresponding sim-file and tried to set the ParticleGenerator.
The lense vanished in Game as well as in Goblineditor.
Will experiment a bit more.
In the next step, I plan to transform the TDW_FXU_lighthouse_flare into a lense.sim.

Try looking into FX Update how TDW added lighthouse flare effect to the stock ports :03:


And since you made me curious about this HarborController, I will have a look at it, as soon as possible.


Let me know if you find anything interesting :up:

gap
02-03-19, 11:42 AM
Your welcome.
:03:

http://www.mediafire.com/file/lzcrdp7mlx59jjf/ObjSort.7z

Jeff, can you please remind me on the usage of this tool of you? :)

Jeff-Groves
02-03-19, 11:44 AM
The objsort program sorts through different obj files and arraigns the info to a more standard way that TDW's program didn't account for at the time.
I'll link the original example here.
http://www.mediafire.com/file/cmc5rgp7bifvefz/obj-files.7z/file

Look at the included obj files in notepad or any text program and you'll see the issue objsort fixes.
(I forgot this file download was still active!)

Notice how things like v and vn along with f and vt are all sorts of messed up?
objsort reads the file, buffers all this then prints out a more common format.

No idea if this issue was ever fixed in TDW's program.

gap
02-03-19, 12:51 PM
The objsort program sorts through different obj files and arraigns the info to a more standard way that TDW's program didn't account for at the time.
I'll link the original example here.
http://www.mediafire.com/file/cmc5rgp7bifvefz/obj-files.7z/file

Look at the included obj files in notepad or any text program and you'll see the issue objsort fixes.
(I forgot this file download was still active!)

Notice how things like v and vn along with f and vt are all sorts of messed up?
objsort reads the file, buffers all this then prints out a more common format.

No idea if this issue was ever fixed in TDW's program.

Okay, I will try you tool, I hope it will help with the secondary UV map importing, because often GR2 editor messed it up. IIRC at some point TDW addressed the problem and partly fixed his importing routine, but the preparation of the AO model and its importing are still a very delicate and problematic step of GR2 Editing. I think that if vertex order and UV faces are not identical in the AO model as in the main model, errors are still very likely... :yep:

Jeff-Groves
02-03-19, 01:11 PM
Okay, I will try you tool, I hope it will help with the secondary UV map importing, because often GR2 editor messed it up. IIRC at some point TDW addressed the problem and partly fixed his importing routine, but the preparation of the AO model and its importing are still a very delicate and problematic step of GR2 Editing. I think that if vertex order and UV faces are not identical in the AO model as in the main model, errors are still very likely... :yep:
I'll have to go back through that thread and refresh my mind.
I do know I pointed out better ways to get imports to work and give a smaller GR2 file size. I actually started the code to add to objsort back then that would produce a file ready for import that solved a lot of issues and jumped past the programs problems.
Pretty sure he started hateing me again about that time. :)

Get me an example with all the needed files and send it to my e-mail.
Without going back through that thread? I'm pretty sure you can hand edit the obj files to fix somethings.
Not the best way to do it but it can be coded. ;)

gap
02-03-19, 01:30 PM
Get me an example with all the needed files and send it to my e-mail.
Without going back through that thread? I'm pretty sure you can hand edit the obj files to fix somethings.
Not the best way to do it but it can be coded. ;)

You are asking me to look back into files four or five years old. Soon we will need to import in game models of some complexity requiring an AO map, and probably we will get plenty of examples to study :D

Jeff-Groves
02-03-19, 01:34 PM
I seem to be fairly good at working around issues.
:hmmm:

I also know the secret (really not that secret) as to how the GR2 stores models and how TDW's program can be tricked.
May be time to start a new thread about things like this.

Jeff-Groves
02-03-19, 04:45 PM
You are asking me to look back into files four or five years old. Soon we will need to import in game models of some complexity requiring an AO map, and probably we will get plenty of examples to study :D

Start reading from page 137 or so in the TDW extractor thread.
I explain a lot there. (Try to ignore the bad stuff. :oops:)
I'm sure there's another thread somewhere that gives even better information.
Maybe around page 105 of same thread.

gap
02-04-19, 10:34 AM
Pretty sure he started hateing me again about that time. :)


(Try to ignore the bad stuff. :oops:)

LOL :rotfl2:

I seem to be fairly good at working around issues.
:hmmm:

I also know the secret (really not that secret) as to how the GR2 stores models and how TDW's program can be tricked.
May be time to start a new thread about things like this.

Yes, that's a good idea. Maybe after we start facing all the possible problems and we have have them figured out. I am actually surprised that no one except me and you has ever pointed them out, and I start wondering if they are not coming from Wing3D's obj exporter more than from a weakness of the GR2E obj-importing code :hmm2:

What we should actually do, is encouraging people to use TDW's program (its most basic and important features are not so difficult to use after all) and to report any problem connected to its usage. In this sense, starting a new thread as a collector of reports and technical questions with their answers, would be a excellent service for the community and a good guide for you to know where to address your inspections and what needs to be fixed more urgently. :yep:

Start reading from page 137 or so in the TDW extractor thread.
I explain a lot there.
I'm sure there's another thread somewhere that gives even better information.
Maybe around page 105 of same thread.

I did, but I think you meant post #137. Anyway, as you said, I'll have to refresh my memory by re-reading that thread from the beginning...

Jeff-Groves
02-04-19, 12:40 PM
Post #2060 is one place I talk about the GR2 files when We export them to obj.
:03:

gap
02-04-19, 12:58 PM
Post #2060 is one place I talk about the GR2 files when We export them to obj.
:03:

This one:

I talked with gap about the file size on export and how RAD has the files stored in the GR2 files.
Don't recall if it was by PM, E-mail, or in a thread here somewhere.
:hmmm:
I refer to it as 'shuffeling' or adding redundant verts to balance file sizes.

Importing the files into most 3D programs gets those thrown out as most programs optimize by default.

I remember you discussing about the importance of these "redundant vertices", though to be totally honest I never fully understood what's the point about them :doh:

Jeff-Groves
02-04-19, 01:12 PM
Say we have 50 verts with their 50 normals.
But it has only 30 vts. (texture coords)
Faces don't matter as those are stored in a separate area.

GR2 stores with vt, vn, and vt in a structure.
So we run out of vt's!
TDW did some crazy stuff which does account for that but increases file size in a wild way.

So all you need to do is add to the vt count to have a balanced file.
They can be zero coords or re-use already used coords. It don't matter!
Now Exported meshes from a GR2 HAVE this extra info!
Once imported into say 3D Max? Max DUMPS the redundant stuff!
So an export with NO modifications to the file WILL NOT have the extra info.

That forces you to use TDW's strange import function and the result is a file MUCH larger then it needs to be.
I believe there's a 'clean' import or something? That sees the file as proper for import and no extra processing is needed.
Thus smaller file sizes.

Somewhere in the Exporter thread or else where I PROVED this and gave the answer!
I'll see if I still have objsort code and add to it to adjust for this.

Ashikaga
02-10-19, 05:29 AM
Pity one cannot use the searchlight glares in combination with the lighthouse ;)

gap
02-10-19, 07:01 AM
Pity one cannot use the searchlight glares in combination with the lighthouse ;)

who said that? :hmmm:

Seaowl
02-11-19, 06:51 PM
Pity one cannot use the searchlight glares in combination with the lighthouse ;)Kendras experimented with searchlights as lighthouse flares in SH3. You can find his posts referring to this here:
:Kaleun_Wink:http://www.subsim.com/radioroom/showthread.php?t=228731&page=30

By now I have solved the smoothing problem:
In fact, it was no issue with edges or faces, but trouble with uv-map and consequential
trouble with texture.
For whatever reason, parts of the uvs were stretched across the border of the uv-map.

I was able to repair this, without creating a new uv-map:
https://i.postimg.cc/LsFb41hH/lhcorr.png (https://postimages.org/)


Furthermore the GR2 lighthouse has a working GR2 lense:
https://i.postimg.cc/4NZv3QQ2/fresnel.png (https://postimages.org/)
Because of the structure of the GR2 file, it was necessary to create a Normal- and AOmap for the lense.
Seems a bit overdone, but otherwise the lense stayed black (it wasn´t possible to disable Normal- and AOmap inside the GR2 file.)
Besides I made use of the Normal-map to texture some rudimentary Fresnel structure.

At the moment I use two particle-controllers at the same time inside the simfile of the lense: The particle controller, that comes with Flakmonkeys lighthouse and the particle controller of TDW, I found inside the TWOS library,
That makes the flare more intense.

But on the other hand using TDW controller alone has one big advantage: the lighthouse flare doesn´t shine through nearly everything like bunker walls, houses, ships, hills...
Hopefully I will find the cause for that, so I could apply it on the other particle controller as well.

Here another picture from further away: (on the left the GR2 lighthouse, on the right the Dat lighthouse)

https://i.postimg.cc/652hgpzt/LHLight.png (https://postimages.org/)

Here some early version of the Normal-map: as base I used a very detailed brick texture.
But in the end I had the impression, that it was a bit too much:

https://i.postimg.cc/0j87Q81X/11bump.png (https://postimages.org/)


One thing bothers me now: no matter which particle controller is used, it seems that the GR2 lense needs some kind of activation.
It starts to glare not until then the free camera comes close.

Once activated though the flare stays visible from far away :06:

gap
02-11-19, 07:26 PM
Kendras experimented with searchlights as lighthouse flares in SH3. You can find his posts referring to this here:
:Kaleun_Wink:http://www.subsim.com/radioroom/showthread.php?t=228731&page=30

Yes, I know that: I was involved in that discussion, but I think he never actually tried. I have something in mind, but it needs to be tested...


By now I have solved the smoothing problem:
In fact, it was no issue with edges or faces, but trouble with uv-map and consequential
trouble with texture.
For whatever reason, parts of the uvs were stretched across the border of the uv-map.

I was able to repair this, without creating a new uv-map:

I am glad that you found the problem :up:


Furthermore the GR2 lighthouse has a working GR2 lense:

Because of the structure of the GR2 file, it was necessary to create a Normal- and AOmap for the lense.
Seems a bit overdone, but otherwise the lense stayed black (it wasn´t possible to disable Normal- and AOmap inside the GR2 file.)
Besides I made use of the Normal-map to texture some rudimentary Fresnel structure.

Well done Seaowl, though rudimentary your Fresnel lens looks so nice! If you want, I think I have better 3D models and better textures of real lenses. You might give them a try :up:


At the moment I use two particle-controllers at the same time inside the simfile of the lense: The stock particle controller, that comes with Flakmonkeys lighthouse and the particle controller of TDW, I found inside the TWOS library,
That makes the flare more intense.

But on the other hand using TDW controller alone has one big advantage: the lighthouse flare doesn´t shine through nearly everything like bunker walls, houses, ships, hills...
Hopefully I will find the cause for that, so I could apply it on the other particle controller as well.

That should be a quick fix and I am 100% sure that Kendras can help you on that. For some reason which I don't fully understand, he has been banned from subsim, but you can find him at his new forum:
http://kendras-sh3-modding.forumactif.com/


Here another picture from further away: (on the left the GR2 lighthouse, on the right the Dat lighthouse)

Before we look at them will need to wear virtual sunglasses lol :sunny:


Here some early version of the Normal-map: as base I used a very detailed brick texture.
But in the end I had the impression, that it was a bit too much:

I agree: definitely it was. The screenshot on top of your last post looks much better, thoughfor my personal taste I would further subdue its normal map.


One thing bothers me now: no matter which particle controller is used, it seems that the GR2 lense needs some kind of activation.
It starts to glare not until then the free camera comes close.

Once activated though the flare stays visible from far away :06:

At long range, is the lens itself visible?

Seaowl
02-16-19, 05:21 AM
@gap
Sorry for the belated reply, but I had quite a busy week.
Nonetheless I made some progress.

At long range, is the lens itself visible? It seems that this problem is solved.

Jeff-Groves solution posted here:
http://www.subsim.com/radioroom/showpost.php?p=2587350&postcount=79
worked in this case too
Thanks to Jeff once again. :Kaleun_Salute:
Short description of what I did: In Blender I made a plane-mesh with the side length of 50.000 m and about 1132 below 0 (not exactly 1000 to avoid conflicts).
This mesh I called collision_fresnel and imported it into the Fresnel GR2 file (luckily there was a free „mesh-slot“).
From now on lighthouses are visible from about 17-18km without preciding activation using the free camera.
It works great.


For the light shining trought walls, I found a solution too:
In the settings of the particle controller, you have to set the „depth buffer test“ to „true“ or (in goblin editor) to „yes“.

If you want, I think I have better 3D models and better textures of real lenses. You might give them a try :up:
As far as I know there were six sizes or six orders (and several sub orders) of fresnel
lenses.
Or at least I saw a table relating to US lighthouse lenses.
On the other hand I do not know, if the same is valid for lenses in France, Great Britain, Ireland, Sweden, Germany...
will do some research, how they grouped their lenses...
But to get to the point: It would be great to have several Fresnel lense models combined in one Fresnel file inside the library.
If you could send me a file with different models and textures, I would try to do so.

However first of all I have to take a little break from lighthouses,
mainly because I´m eager to import some vessel into GR2 files.
I think DivingDucks fishing boat would be a good beginning?

Moreover I have discovered the moles of Malta.
(how much stuff is buried into these files, I had never seen in game...)
I suppose it is not difficult to make separate land units out of them.
At Memel they could be useful to do the „white lighthouse“ at harbor entrance for example.

And I had a look at Kendras site: among other cool things, he creates really great lighting stuff.
:Kaleun_Applaud:
The screenshot on top of your last post looks much better, thoughfor my personal taste I would further subdue its normal map.As a beginner I tend to overdo all these things just to see the difference.

Meanwhile I have turned down the normal map.
In fact it looks much better now. :Kaleun_Thumbs_Up:

To tell the truth: All the lighthouse files - and especially the textures - will still need some fine or even rough tuning.
I will keep you informed.

Ashikaga
02-16-19, 07:30 AM
Well from what I can see in those images it already looks like an improvement!


:Kaleun_Thumbs_Up:

Seaowl
02-16-19, 11:45 AM
Well from what I can see in those images it already looks like an improvement!
Thanks for the encouragement, Ashikaga.

:Kaleun_Salute:

There is one thing that bothers me at the moment however:
If I will not split off the lense from the lighthouse and import both together
as one GR2 file with attached sim into the land folder,
would it be possible,
that all this collision_mesh construction wouldn´t be necessary?


Is the visibility dependend on the folder (sea, library, land, air etc) , where the file is located?


But on the other hand placing a file into the library has the advantage that it can be used very versatile.
So is there any known side effect of these big collision meshes?
I´m asking this in view of a future ship import too.
Is ist better to separate all navigation lights from the model or should they be imported into the ships main GR2 as well?

And what happens, when – for example – two harbor lighthouses are close together
at a harbor entrance?
If they use the same fresnel from the library, their collision meshes would – like the name says - collide.
And what would be the effect of this deep fresnel collision?
Ok – I will have to test this.

gap
02-16-19, 11:51 AM
@gap
Sorry for the belated reply, but I had quite a busy week.
Nonetheless I made some progress.

No problem mate :up:


It seems that this problem is solved.

Jeff-Groves solution posted here:
http://www.subsim.com/radioroom/showpost.php?p=2587350&postcount=79
worked in this case too
Thanks to Jeff once again. :Kaleun_Salute:
Short description of what I did: In Blender I made a plane-mesh with the side length of 50.000 m and about 1132 below 0 (not exactly 1000 to avoid conflicts).
This mesh I called collision_fresnel and imported it into the Fresnel GR2 file (luckily there was a free „mesh-slot“).
From now on lighthouses are visible from about 17-18km without preciding activation using the free camera.
It works great.

So the rendering range issue affects equipments as well as land units. Is that correct?

Every new discovery we make, is lesser brain racking the next time we will have to deal with similar issues. Well done on that!


For the light shining trought walls, I found a solution too:
In the settings of the particle controller, you have to set the „depth buffer test“ to „true“ or (in goblin editor) to „yes“.

That was an easy fix, I knew you would have found the "magic" setting :03:


As far as I know there were six sizes or six orders (and several sub orders) of fresnel
lenses.
Or at least I saw a table relating to US lighthouse lenses.
On the other hand I do not know, if the same is valid for lenses in France, Great Britain, Ireland, Sweden, Germany...
will do some research, how they grouped their lenses...
But to get to the point: It would be great to have several Fresnel lense models combined in one Fresnel file inside the library.
If you could send me a file with different models and textures, I would try to do so.

You are right about the six main orders (IIRC there were also a couple of intermediate orders). I should have saved somewhere some tables with pictures/drawings of them and their relevant data including sizes and ranges.

If memory serves me well, Fresnel lenses were a French pantent and between late XIX century and mid XX century they were used all around the world, some them still being in use. Not all the lighthouses had Fresnel lenses installed though. A good example of that was the old Helgoland lighthouse (the one built in 1902 and destroyed by Aliied bombings in 1945), which had a custom-made and very powerful lens installed:

http://baken-net.de/image/helgoland_zeno_wm12474b_1.jpg

Anyway, if I remember correctly I have a couple of Fresnel lenses modelled and textured, though right now I can't say which order they belong to. They are made according to the data I mentioned above, so they should be pretty accurate, though low-poly. If you think you can put them to use, I can check them and send them your way :)


However first of all I have to take a little break from lighthouses,
mainly because I´m eager to import some vessel into GR2 files.
I think DivingDucks fishing boat would be a good beginning?

Sure it would! :up:


Moreover I have discovered the moles of Malta.
(how much stuff is buried into these files, I had never seen in game...)
I suppose it is not difficult to make separate land units out of them.
At Memel they could be useful to do the „white lighthouse“ at harbor entrance for example.

Yes, there is a lot of unfinished / unused stuff in stock files that is only waiting for us to finish it and put it in game :yep:


And I had a look at Kendras site: among other cool things, he creates really great lighting stuff.
:Kaleun_Applaud:

Yes, I call him the king of special effects :D


As a beginner I tend to overdo all these things just to see the difference.

Meanwhile I have turned down the normal map.
In fact it looks much better now. :Kaleun_Thumbs_Up:

If you don't try you never know. Keep doing your experiments!


To tell the truth: All the lighthouse files - and especially the textures - will still need some fine or even rough tuning.
I will keep you informed.

Let's keep in touch! :salute:

gap
02-16-19, 11:56 AM
Thanks for the encouragement, Ashikaga.

:Kaleun_Salute:

There is one thing that bothers me at the moment however:
If I will not split off the lense from the lighthouse and import both together
as one GR2 file with attached sim into the land folder,
would it be possible,
that all this collision_mesh construction wouldn´t be necessary?


Is the visibility dependend on the folder (sea, library, land, air etc) , where the file is located?


But on the other hand placing a file into the library has the advantage that it can be used very versatile.
So is there any known side effect of these big collision meshes?
I´m asking this in view of a future ship import too.
Is ist better to separate all navigation lights from the model or should they be imported into the ships main GR2 as well?

And what happens, when – for example – two harbor lighthouses are close together
at a harbor entrance?
If they use the same fresnel from the library, their collision meshes would – like the name says - collide.
And what would be the effect of this deep fresnel collision?
Ok – I will have to test this.

You don't need big collision meshes. You can simply add a triangle or a square to the main mesh, and move it below the terrain level. That's how I fixed the rendering range issue with my Helgoland sea stack model :yep:

Seaowl
02-16-19, 02:44 PM
After the test:
Nothing happens when two lighthouses are close together at a harbor entrance.
But the cause is not that there is nothing happening when two collision meshes collide, the cause is that the lighthouses are - of course - placed at different heights.

None the wiser...:k_confused:
But fortunately the problem itself seems gone:


You don't need big collision meshes. You can simply add a triangle or a square to the main mesh, and move it below the terrain level. That's how I fixed the rendering range issue with my Helgoland sea stack model :yep:
Ok, I will check this. And if it works with the lighthouse light, I will strip the fishing vessel off its navigation lights and place them into their own library file.
Maybe then the stock fishing boat could make use of them too.
But thats a later issue.


So the rendering range issue affects equipments as well as land units. Is that correct?
Yes, but I can´t name correct distances at the moment.
Possibly I will do sometime a proper testing with comparable results.

Anyway, if I remember correctly I have a couple of Fresnel lenses modelled and textured, though right now I can't say which order they belong to. They are made according to the data I mentioned above, so they should be pretty accurate, though low-poly. If you think you can put them to use, I can check them and send them your way :)
Of course: I´m not sure if I can put them to good use, but at least I can try it.
It would be great to have a library file with different lenses and maybe I can ask Kendras, if he allows me to use some of his "special effects" (presupposed they work in SH5 as well).

Is it possible to send them via PM or should I send you - likewise via PM - my mail address?


:Kaleun_Salute:

gap
02-17-19, 12:17 PM
if I remember correctly I have a couple of Fresnel lenses modelled and textured, though right now I can't say which order they belong to. They are made according to the data I mentioned above, so they should be pretty accurate, though low-poly. If you think you can put them to use, I can check them and send them your way :)


Of course: I´m not sure if I can put them to good use, but at least I can try it.

Check your PM inbox please. :03:

The two low-poly models I sent you portray a 1st order and a 4th order Fresnel lens. They are correctly scaled relative to the SH proportions and they are already triangulated. Other than that, they might/will require some further post processing in order to be imported with GR2 Editor and to look good in game (removal/splitting of the hard edges, removal of the inner lens faces, setting up of a different materials for the crystal lenses than the one used for the metal frame, etc.).

As you can imagine from my comments above, I never used them in game, but I am glad to offer them to you and I am sure you that, with your time, you will do a good job with them. The one favour I ask you in change, is to keep updating us on your progress, on the problems you are facing, and on the workarounds that you are finding :up:


It would be great to have a library file with different lenses and maybe I can ask Kendras, if he allows me to use some of his "special effects" (presupposed they work in SH5 as well).

I already told you how to get in touch with him, but I am sure that, as long as you give him credit for his work, he won't have any problem granting you the permission to use it.

On a side note: SHIII particle generators have much in common with SHIV and SH5 ones. All the old generators should perfectly work in SH5 and, when importing SHIII-IV particle effects into SH5, you can always copy the parameters of old generators in the new ones. Btw: If you like using Skwas' Silent3ditor, I definitely recommend you to patch it with this extension by Rosomaha:

http://www.subsim.com/radioroom/showthread.php?p=2438679#post2438679

Perfect for messing with the generators of the three games using just one tool!

Seaowl
02-17-19, 02:57 PM
Thank you, gap!


:up:

Just downloaded the file and couldn´t resist to throw a quick glance at them before writing this reply.

Both are magnificient.

Without further ado I will try out the first order lense in the latern room of Flakmonkeys lighthouse.

The fourth order lense seems suitable for some smaller harbor lighthouse.
Possibly - taking other models as example - I will attempt creating one myself.

Would be a good point to start.


In any case I will keep you and of course everyone reading this thread, informed.
But - of course - it will take its time.


By the way information: yesterday I reduced the size of the Collison mesh from 50.000x50.000 to 2x2 and even 0.1x0.1m.
In either of this cases the lense was functioning flawlessly.
Henceforth there seems to be no further obstacle in creating one central fresnel file into the library folder.

:salute:

gap
02-17-19, 06:22 PM
Thank you, gap!


:up:

Just downloaded the file and couldn´t resist to throw a quick glance at them before writing this reply.

Both are magnificient.

Without further ado I will try out the first order lense in the latern room of Flakmonkeys lighthouse.

I modelled that lens for one of the tall European landfall lighths destroyed during WWII: the grand phare de l'île de Sein, which was about two times taller than Flakmonkey's lighthouse. I don't know if a 1st order lens will fit within its lantern house...


The fourth order lense seems suitable for some smaller harbor lighthouse.

You are right, that's exactly what I had in mind when I modelled it


Possibly - taking other models as example - I will attempt creating one myself.

Would be a good point to start.

Good idea. There is plenty of free information, pictures and drawings on any order of Fresnel lense, so you shouldn't have problems finding them, but if by any chance they have been removed, I should have something saved in my archive :03:


In any case I will keep you and of course everyone reading this thread, informed.
But - of course - it will take its time.

No rush :up:


By the way information: yesterday I reduced the size of the Collison mesh from 50.000x50.000 to 2x2 and even 0.1x0.1m.
In either of this cases the lense was functioning flawlessly.
Henceforth there seems to be no further obstacle in creating one central fresnel file into the library folder.

:salute:

I was sure about that. Also note that for collision of land units you can use the CollisionableObject controller. In all the SH games, this controller is used only with terrain objects, but as I have experimented, it also works with ship equipments (see the TWoS' coastal artillery bunker) and land units (see one of the testing versions of the La Plate lighthouse in Kendras' Lighthouse mod). :yep:

Seaowl
02-28-19, 02:26 PM
Since I found no suitable lighthouse for
gaps awesome lenses, I started to make one myself.

As pattern I choose the Wolf Rock Lighthouse.
Initially because I found some nice blueprints of Wolf Rock
at this site: https://www.gracesguide.co.uk/Wolf_Rock_Lighthouse

But besides that Wolf Rock has other advantages as well:

It has a quite prototypical shape of an british lighthouse.
So parts of it – like base, railing, lantern graiting – could be used to model lighthouses just as Eddystone, Beachy Head probably even Fastnet.

By the way: As I never go through the Channel I would probably never see Eddystone and Beachy Head ingame.
And even Wolf Rock itself is a border case.
Waters at this regions are far too shallow for my taste.
So actually a lighthouse at Scotland or Ireland would make more sense as a future project.

One other reason for choosing the Wolf Rock lighthouse is the shape of the lense.
Originally Wolf Rock lighthouse had a first order fresnel lense that looked
– at least at the drawings I have at hand –
pretty much the same as the first order lens model gap sent to me.
So the perfect housing.

At the moment I´m at the point where I think about to start with uv-mapping and texturing.
Concerning this I have one question:
In the early stages, I modelled the windows as parts of the main lighthouse mesh.
Not really the windows, but in fact the shutters, because on most of the pictures I have seen the windows closed.
Doing it that way, I never came along with smoothing very well.
So I decided to use the shutters as a seperate model.
There are some shipmodels, where it is done this way.
It´s also intended to have the base and the quay (will be added later) as separat models.
Are there any downsides doing it like that, especially respective game performance?

Progress is slow because I have to learn everything from scratch.
Here are some pictures:

https://i.postimg.cc/SJXD6S3m/WR-1.png (https://postimg.cc/SJXD6S3m)


https://i.postimg.cc/w3RmF1q4/WR-2.png (https://postimg.cc/w3RmF1q4)


https://i.postimg.cc/FYr1tzv4/WR-3.png (https://postimg.cc/FYr1tzv4)

gap
03-01-19, 02:38 PM
WOW, Seaowl, if you are really learning everything from scratch, we should admit that you are doing it unbelievably fast! :o :yeah:

Your model looks very nice indeed!


Sure enough, windows and other details which require hard edges, will mess with the smoothing of rounded surfaces they border with.

Within certain limits, a lesser than perfect object smoothing can be masked out with a good texture work but your idea of modelling details that protrude from the main geometry as a separate geometries, is obviously a better solution because it will eliminate the root cause of the problem, and it will make your model to have lesser polygons too. I don't see any downside to it but having to deal with tens (or hundreds, for big models) of small meshes every time you need to un-group a model, and maybe the fact that portions of the main lighthouse geometry will be hidden behind the new details, but they will still occupy texture space that you could have used more profitably for something else.

Unfortunately the same "trick" can't be used when the detail you want to add doesn't protrude from your model, but it is actually indented into it.
In that case, the only possible fix, is to break the hard edges into smaller edges, making them to follow object's (smoothed) curvature as closely as possible.


Other than that, I have a few more remarks:

12 to 16 is the ideal number of "slices" needed for SH to render acceptably smooth cylindrical surfaces without increasing too much the poly count.

I have noticed that you have used a lot of faces to model the jagged lighthouse base. While very nice looking, this is probably accounting for a significant increase of model's poly count. You could fake that detail with some well done texture maps, especially a normal map, but you are probably aware of that already.

I like very much the way you modelled the railing around the lighthouse gallery, though, again, the polygons you spent on those nicely detailed poles that we will only appreciate from very close distance, might not be worth the computer resources they will use.

Remember that GR2 units support LOD models, so you can keep all the nice detail for the main unit, and then decimate its polygons until you get a basic outline for use as LOD :03:

I think that's all for now :salute:

Seaowl
03-02-19, 03:58 PM
I have noticed that you have used a lot of faces to model the jagged
lighthouse base. While very nice looking, this is probably accounting for a significant
increase of model's poly count. […] Remember that GR2 units support LOD models, so
you can keep all the nice detail for the main unit, and then decimate its polygons until
you get a basic outline for use as LOD The thing is, that I considered this kind of basement somehow characteristic for
Wolf Rock (and also Beachy Head and Fastnet).
So I didn´t want to abandon this structure in the first turn.
Especially because it will be relatively easy to change, if the impact on resources seems too big.

The same is valid for the railing.

In any case I will take your advice and make a reduced LOD-Model.
I really hope that this will do the trick.

Yesterday I finished the quay or I don´t know how it´s called, because if you watch the
videos of change of shifts on Wolf Rock
https://www.britishpathe.com/video/wolf-rock-relieved
this platform isn´t intented for any ship to dock,
added a fog horn, a weather vane and a smoke stack,
raised the lantern room floor and – because I wasn´t sure about the scale,
imported for comparision partly the Frogs beautiful Harbour Defense Motor Launch
with one crew member. (I had to scale everything by 10)

The source of the fog horn are mainly the above mentioned videos.
The smoke stack, is sketched in on the plan I use or at least it´s my interpretation of
this pipe on the roof: https://upload.wikimedia.org/wikipedia/commons/e/ec/Wolf_Rock_Lighthouse_Engineering_drawing.png

This is by no means an exact representation of Wolf Rock, it´s only an approximation.
If you have better information or sources at hand than I have, I would be glad to correct things.

And of course, I have to add the cliff. For this reason I´m trying to understand, how this ANT-landscape addon works in Blender.

Here some pictures again:



https://i.postimg.cc/gwLyhC48/WR1.png (https://postimg.cc/gwLyhC48)


https://i.postimg.cc/p957d1F1/WR2.png (https://postimg.cc/p957d1F1)


https://i.postimg.cc/Bt3qdxWG/WR3.png (https://postimg.cc/Bt3qdxWG)


https://i.postimg.cc/877Dh4vL/WR4.png (https://postimg.cc/877Dh4vL)


:Kaleun_Salute:

gap
03-07-19, 01:16 PM
The thing is, that I considered this kind of basement somehow characteristic for
Wolf Rock (and also Beachy Head and Fastnet).
So I didn´t want to abandon this structure in the first turn.
Especially because it will be relatively easy to change, if the impact on resources seems too big.

The same is valid for the railing.


I am with you on that: within certain limits, better having nicely detailed models to start from than basic ones. As you said, we are always in time to decimate their poly count, and even so, the possibly discarded details can always be used for the baking of nicely realistic ambient occlusion and normal maps :up:



In any case I will take your advice and make a reduced LOD-Model.
I really hope that this will do the trick.

Yes, there would be no point in not exploiting this SH5 feature :yep:


Yesterday I finished the quay or I don´t know how it´s called, because if you watch the
videos of change of shifts on Wolf Rock
https://www.britishpathe.com/video/wolf-rock-relieved
this platform isn´t intented for any ship to dock,

:o

That video gave me vertigo, sea sickness and and a panic attack, the three at the same time lol :doh:


added a fog horn, a weather vane and a smoke stack,
raised the lantern room floor and – because I wasn´t sure about the scale,
imported for comparision partly the Frogs beautiful Harbour Defense Motor Launch
with one crew member. (I had to scale everything by 10)

The source of the fog horn are mainly the above mentioned videos.
The smoke stack, is sketched in on the plan I use or at least it´s my interpretation of
this pipe on the roof: https://upload.wikimedia.org/wikipedia/commons/e/ec/Wolf_Rock_Lighthouse_Engineering_drawing.png

This is by no means an exact representation of Wolf Rock, it´s only an approximation.
If you have better information or sources at hand than I have, I would be glad to correct things.

Your interpretation of the videos and drawings you have posted so far, look totally plausible to me, though the grid surrounding the lantern glass, looks a bit to weak for holding the roof in place, if you know what I mean...

50% or more of the time I spend on my models, is usually devoted to research and to guessing shapes and proportions, so I understand you doubts :up:


And of course, I have to add the cliff. For this reason I´m trying to understand, how this ANT-landscape addon works in Blender.

Cool addon, I wasn't aware about it :up:

If you have an heighmap representation of the cliff you want to create, you can use as well the 'displace' modifier :03:


Here some pictures again:

Amazing, I can't wait to see it in game :yeah:

On a side note (sorry for my shameless self-advertising) here is a preview of my next creation, the Chausey lighthouse, in Western Normandy:

https://i.imgur.com/1SxAGmF.png
As you said, the Channel is not an area we want to transit too often in game, but starting from mid 44 it will become a little busier for us, especially the area that the lighthouse above is located in...

Seaowl
04-04-19, 03:23 PM
...the Chausey lighthouse, in Western Normandy
Great Gap! :up:
Chausey lighthouse looks just beautiful!

As you said, the Channel is not an area we want to transit too often in game, but starting from mid 44 it will become a little busier for us, especially the area that the lighthouse above is located in... You are right: there was even one submarin running aground on Wolf Rock: U-1209
https://en.wikipedia.org/wiki/German_submarine_U-1209
But to my shame, I have to admit that until now I never reached late war times. :D

If you have an heighmap representation of the cliff you want to create, you can use as well the 'displace' modifier This would be great but until now I haven´t found any hightmap of the seabed there.
Besides the depth of the sea in SHV is about 150 m at Wolf Rocks location.
A GR2 cliff model would fall far short.
Time to take a look at the SH5 terrain editor for some intermediate solution.

I am with you on that: within certain limits, better having nicely detailed models to start from than basic ones. As you said, we are always in time to decimate their poly count, and even so, the possibly discarded details can always be used for the baking of nicely realistic ambient occlusion and normal maps Ok. I managed to import the lighthouse into SH5 so far.
The import of the 3D model was the easiest part, the real difficulties started using the materials.
In the end I condensed the 5 parts into one mesh alltogether.
Furthermore I simplified the model namely the base and the railing.
The texturing is at early stage.
I will have to consult some tutorials to be able to add all the necessary grunge.

But there are problems:
The platform, the shutters and the lighthouse are only stuck together and not connected by geometry.
That has a lot advantages for skinning and smoothing the lighthouse model.
But it has one big disadvantage: At the seams between the meshes occurs heavy flickering.
The reason could be that these regions are mapped twofold by the lightmap.
Its an effect that is visible at the doors and portholes of stock ships too.
One solution would probably be to connect the platform with the main lighthouse and to paint the shutters on the diffuse texture and using the normal map to give them some detailed structure.
Or I could simply bake the lightmap skipping the shutters? Have to try...


Concerning the Fresnel-lens: importing the Fresnel lens was no difficulty.
Initially I expected troubles, because there are two subsets.
But the Import worked flawlessly.
The only thing that bothers me is, that I´m not able to achieve transparency.
Currently the Fresnel lens is imported into one mesh, but I´m thinking about splitting this up, so the transparent parts could have a mesh and maybe a transparent texture by its own.
At first I thought that I could adjust these things within TDW´s Editor.
However I achieved nothing by changing values inside the subsets.



Some pictures of Wolf Rock into SH5.


https://i.postimg.cc/ThYrRC0V/1.png (https://postimg.cc/ThYrRC0V)


https://i.postimg.cc/HrGc72wP/2.png (https://postimg.cc/HrGc72wP)


https://i.postimg.cc/0M321kZH/3.png (https://postimg.cc/0M321kZH)

https://i.postimg.cc/xqz9bS6n/4.png (https://postimg.cc/xqz9bS6n)


https://i.postimg.cc/bSHMHLGH/5.png (https://postimg.cc/bSHMHLGH)


https://i.postimg.cc/w1BPLX9L/6.png (https://postimg.cc/w1BPLX9L)

Angelis
12-16-19, 12:53 PM
Wow! What beautiful pictures. Any news about your project, sir?

gap
12-16-19, 01:04 PM
Wow! What beautiful pictures. Any news about your project, sir?

Yes, I was wondering the same :)

AMZ
04-14-21, 12:35 PM
Hi all



I follow this post carefully and I would like to ask you to make Seamarks for coastal navigation in SH5.


I am very interested in the realization of your lighthouse, Seawol. I would like to understand how you imported your 3D model in a gr2 file for SH5


About me, Here is a message (https://www.subsim.com/radioroom/showpost.php?p=2742248&postcount=2480)where you can see what is wrong with me !!!




With all my consideration.

U-190
04-15-21, 05:25 PM
Good job, man! Well done! :up:

AMZ
04-16-21, 11:54 AM
Thank you for your encouragement U190!



Could you give me a simple example to follow, to realize in SH5 an object, whatever it is ?

I'm sure you have a suggestion. :salute:

U-190
05-20-21, 12:37 AM
It seems that the author is no longer interested in developing this interesting modification. He beckoned with his finger and disappeared. I think that the stock game needs similar modifications. :o