SUBSIM Radio Room Forums


SUBSIM: The Web's #1 BBS for all submarine and naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 02-03-2019, 12:30 PM   #31
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 7,557
Downloads: 699
Uploads: 10


Default

Quote:
Originally Posted by Jeff-Groves View Post
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
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-03-2019, 12:34 PM   #32
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Location: Nevada, Ohio
Posts: 2,216
Downloads: 42
Uploads: 0


Default

I seem to be fairly good at working around issues.


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 is offline   Reply With Quote
Old 02-03-2019, 03:45 PM   #33
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Location: Nevada, Ohio
Posts: 2,216
Downloads: 42
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
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
Start reading from page 137 or so in the TDW extractor thread.
I explain a lot there. (Try to ignore the bad stuff. )
I'm sure there's another thread somewhere that gives even better information.
Maybe around page 105 of same thread.
__________________
“I have not failed. I’ve just found 10,000 ways that won’t work.”

Last edited by Jeff-Groves; 02-03-2019 at 04:12 PM.
Jeff-Groves is offline   Reply With Quote
Old 02-04-2019, 09:34 AM   #34
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 7,557
Downloads: 699
Uploads: 10


Default

Quote:
Originally Posted by Jeff-Groves View Post
Pretty sure he started hateing me again about that time.
Quote:
Originally Posted by Jeff-Groves View Post
(Try to ignore the bad stuff. )
LOL

Quote:
Originally Posted by Jeff-Groves View Post
I seem to be fairly good at working around issues.


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

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.

Quote:
Originally Posted by Jeff-Groves View Post
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...
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-04-2019, 11:40 AM   #35
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Location: Nevada, Ohio
Posts: 2,216
Downloads: 42
Uploads: 0


Default

Post #2060 is one place I talk about the GR2 files when We export them to obj.
__________________
“I have not failed. I’ve just found 10,000 ways that won’t work.”
Jeff-Groves is offline   Reply With Quote
Old 02-04-2019, 11:58 AM   #36
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 7,557
Downloads: 699
Uploads: 10


Default

Quote:
Originally Posted by Jeff-Groves View Post
Post #2060 is one place I talk about the GR2 files when We export them to obj.
This one:

Quote:
Originally Posted by Madox58 View Post
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.

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
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-04-2019, 12:12 PM   #37
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Location: Nevada, Ohio
Posts: 2,216
Downloads: 42
Uploads: 0


Default

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.
__________________
“I have not failed. I’ve just found 10,000 ways that won’t work.”

Last edited by Jeff-Groves; 02-04-2019 at 12:38 PM.
Jeff-Groves is offline   Reply With Quote
Old 02-10-2019, 04:29 AM   #38
Ashikaga
XO
 
Join Date: Aug 2016
Location: Netherlands
Posts: 433
Downloads: 21
Uploads: 0
Default

Pity one cannot use the searchlight glares in combination with the lighthouse
__________________
Ashikaga is offline   Reply With Quote
Old 02-10-2019, 06:01 AM   #39
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 7,557
Downloads: 699
Uploads: 10


Default

Quote:
Originally Posted by Ashikaga View Post
Pity one cannot use the searchlight glares in combination with the lighthouse
who said that?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-11-2019, 05:51 PM   #40
Seaowl
Sailor man
 
Join Date: Nov 2018
Posts: 43
Downloads: 30
Uploads: 0
Default

Quote:
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:
http://www.subsim.com/radioroom/show...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:



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.

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)



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:




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

Last edited by Seaowl; 02-11-2019 at 06:16 PM.
Seaowl is offline   Reply With Quote
Old 02-11-2019, 06:26 PM   #41
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 7,557
Downloads: 699
Uploads: 10


Default

Quote:
Originally Posted by Seaowl View Post
Kendras experimented with searchlights as lighthouse flares in SH3. You can find his posts referring to this here:
http://www.subsim.com/radioroom/show...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...

Quote:
Originally Posted by Seaowl View Post
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

Quote:
Originally Posted by Seaowl View Post
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

Quote:
Originally Posted by Seaowl View Post
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/

Quote:
Originally Posted by Seaowl View Post
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

Quote:
Originally Posted by Seaowl View Post
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.

Quote:
Originally Posted by Seaowl View Post
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
At long range, is the lens itself visible?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-16-2019, 04:21 AM   #42
Seaowl
Sailor man
 
Join Date: Nov 2018
Posts: 43
Downloads: 30
Uploads: 0
Default

@gap
Sorry for the belated reply, but I had quite a busy week.
Nonetheless I made some progress.

Quote:
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/show...0&postcount=79
worked in this case too
Thanks to Jeff once again.
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“.

Quote:
If you want, I think I have better 3D models and better textures of real lenses. You might give them a try
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.

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

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.
Seaowl is offline   Reply With Quote
Old 02-16-2019, 06:30 AM   #43
Ashikaga
XO
 
Join Date: Aug 2016
Location: Netherlands
Posts: 433
Downloads: 21
Uploads: 0
Default

Well from what I can see in those images it already looks like an improvement!


__________________
Ashikaga is offline   Reply With Quote
Old 02-16-2019, 10:45 AM   #44
Seaowl
Sailor man
 
Join Date: Nov 2018
Posts: 43
Downloads: 30
Uploads: 0
Default

Quote:
Well from what I can see in those images it already looks like an improvement!
Thanks for the encouragement, Ashikaga.



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.
Seaowl is offline   Reply With Quote
Old 02-16-2019, 10:51 AM   #45
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 7,557
Downloads: 699
Uploads: 10


Default

Quote:
Originally Posted by Seaowl View Post
@gap
Sorry for the belated reply, but I had quite a busy week.
Nonetheless I made some progress.
No problem mate

Quote:
Originally Posted by Seaowl View Post
It seems that this problem is solved.

Jeff-Groves solution posted here:
http://www.subsim.com/radioroom/show...0&postcount=79
worked in this case too
Thanks to Jeff once again.
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!

Quote:
Originally Posted by Seaowl View Post
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

Quote:
Originally Posted by Seaowl View Post
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:



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

Quote:
Originally Posted by Seaowl View Post
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!

Quote:
Originally Posted by Seaowl View Post
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

Quote:
Originally Posted by Seaowl View Post
And I had a look at Kendras site: among other cool things, he creates really great lighting stuff.
Yes, I call him the king of special effects

Quote:
Originally Posted by Seaowl View Post
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.
If you don't try you never know. Keep doing your experiments!

Quote:
Originally Posted by Seaowl View Post
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!
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:55 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 1995- 2019 Subsim