SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

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

Reply
 
Thread Tools Display Modes
Old 10-04-17, 09:14 AM   #91
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Hi VonDos,

I had a look into your files, and I must say that this time the problem isn't caused by erroneously split edges, but by some surfaces not being totally flat.

I can fix the problem easily, but maybe it is better if you send me the whole model (or at least the whole superstructure) for me to make sure that the perimetral vertices of the flattened surfaces will match perfectly the corresponding vertices of adjoining faces.

Sorry for making you to send the files twice, but as I said, at the beginning I thought the problem had a different cause
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 10-04-17, 02:48 PM   #92
VonDos
Admiral
 
Join Date: Mar 2007
Location: Italy
Posts: 2,213
Downloads: 75
Uploads: 49


Default

Quote:
Originally Posted by gap View Post
Hi VonDos,

I had a look into your files, and I must say that this time the problem isn't caused by erroneously split edges, but by some surfaces not being totally flat.

I can fix the problem easily, but maybe it is better if you send me the whole model (or at least the whole superstructure) for me to make sure that the perimetral vertices of the flattened surfaces will match perfectly the corresponding vertices of adjoining faces.

Sorry for making you to send the files twice, but as I said, at the beginning I thought the problem had a different cause
Hi!
I'm sending you a PM
__________________

Those, others and WIP ships are avaiable in my SHIPYARD here:
http://www.subsim.com/radioroom/showthread.php?t=136508
VonDos is offline   Reply With Quote
Old 10-04-17, 05:02 PM   #93
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by VonDos View Post
Hi!
I'm sending you a PM
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 10-04-17, 10:17 PM   #94
VonDos
Admiral
 
Join Date: Mar 2007
Location: Italy
Posts: 2,213
Downloads: 75
Uploads: 49


Default

Quote:
Originally Posted by gap View Post
Okay. Is the ship illuminated before her conversion to armed merchant?
She is illuminated only before war begin date, sept 1939. With war start, every porthole is darkened because unità is no more neutral..

Best regards,
Vd
__________________

Those, others and WIP ships are avaiable in my SHIPYARD here:
http://www.subsim.com/radioroom/showthread.php?t=136508
VonDos is offline   Reply With Quote
Old 10-05-17, 12:48 PM   #95
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default Porthole/window lights

Quote:
Originally Posted by Kendras View Post
I remind you that it would be a wonderful addition if you could create enlighted portholes for the night...
Quote:
Originally Posted by gap View Post
I have looked into this while working on ship's smoothing groups. For portholese to look illuminated, the central part of them should be given a "luminous" material. Unfortunately, the 3D portholes currently in place have only the external ring modelled, but not the central glass.
I was wrong: after having looked more closely into the unit VonDos is currently working on, I have discovered that porthole's central portions are modelled. At first I didn't notice them, as thei are stored in diffrent submodel than the frames.

Quote:
Originally Posted by VonDos View Post
PS About light question, please try to dowload and install my Queen of Bermuda mod. Try this unit in a single mission with mission editor in 1939 before war start date, in 1939 after war start date and in 1942. This could be interesting about portholes lights and timeline (neutral enlightened, war duty darkened..) and about textures management issue.
Quote:
Originally Posted by gap View Post
Is the ship illuminated before her conversion to armed merchant?
Quote:
Originally Posted by VonDos View Post
She is illuminated only before war begin date, sept 1939. With war start, every porthole is darkened because unità is no more neutral..
I have had a quick look into your Queen of Bermuda. I see you have followed my advise to store different ship parts in a separate library file, but I think you have actually overdone my suggestion lol

The only parts that actually had to be set as external equipments, are the ones that were historically modified during the conversion (vents, funnels, masts, part of the superstructure, etc). Imo the main hull and all the parts not modified during the conversions, should be stored directly in one of the dat files in the sea folder. Only one, not the two of them, because two (similar) units can share the same dat file (so you might also scrap the second dat file).

How can you do that, you may ask? The answer is easy: by adding the following line to the [Unit] section of the cfg file, for the unit that you want to use another unit's model:

Code:
[Unit]
ClassName=BBPennsylvania
3DModelFileName=data/Sea/NBB_Colorado/NBB_Colorado
UnitType=11
...
The example above is from SHIV's USS Pennsylvania which, as you can see, uses the same files as the USS Colorado. The only files found in Pennsylvania's folder, besides the cfg and the shape files, are eqp and sns files, used for customizing the ship relative to her sister (the Colorado):



In this example, the Colorado and the Penssylvania use the same texture, but if devs wanted the latter to use a special texture, I think they could have done that by editing the following entries in her ROSTER cfg file:

Code:
[Texture 1]
TextureName=data/Sea/NBB_Colorado/NBB_Colorado_T01.tga
LightmapTextureName=data/Sea/NBB_Colorado/NBB_Colorado_O01.tga
NormalmapTextureName=data/Sea/NBB_Colorado/NBB_Colorado_N01.tga
StartDate=19000101
EndDate=19991231
Frequency=1
I think the same settings can also be used in SHIII, though they are not found anywhere in stock files.

One last note: In the case of the Queen of Bermuda, having the ship set as two separate units (one being a proxy clone of the other), makes sense because the two versions of the ship had different roles and they require different unit types. For the Queen Mary, we just need one unit whose paint scheme and equipments (including the lightened windows) can be switched by date, through eqp and cfg files' start/end date settings.

PS: check your PM box
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 10-05-17, 01:11 PM   #96
the_frog
Commander
 
Join Date: Nov 2010
Posts: 456
Downloads: 17
Uploads: 0
Default

gap,

you asked me once if I tried the SH4 method of defining textures for certain for periods in the roster *cfg file in SH3. My answer was I tried but without success. So, my question -- have you tested the method in SH3?

Cheers
the_frog is offline   Reply With Quote
Old 10-05-17, 02:00 PM   #97
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by the_frog View Post
gap,

you asked me once if I tried the SH4 method of defining textures for certain for periods in the roster *cfg file in SH3. My answer was I tried but without success. So, my question -- have you tested the method in SH3?

Cheers
You are right. To be honest I didn't test that: I had forgot about that conversation.

I wish I could prove you wrong but, in any case, I think texture used (in case of multiple-textured models) can be controlled via campaign files:

http://www.subsim.com/radioroom/show...9&postcount=44
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 10-05-17, 03:41 PM   #98
VonDos
Admiral
 
Join Date: Mar 2007
Location: Italy
Posts: 2,213
Downloads: 75
Uploads: 49


Default

Quote:
Originally Posted by the_frog View Post
gap,

you asked me once if I tried the SH4 method of defining textures for certain for periods in the roster *cfg file in SH3. My answer was I tried but without success. So, my question -- have you tested the method in SH3?

Cheers

Hi the_frog, Gap and everyone!
I also tested this method while working on Queen Of Bermuda, sadly without success. This is the cause of her strange library's configuration, with a war hull and a civil hull (and another different hull because some large parts were removed during war for create spaces for main guns).

Btw, thanks again Gap, tested now, great work with light\shadows!



Best regards,
Vd
__________________

Those, others and WIP ships are avaiable in my SHIPYARD here:
http://www.subsim.com/radioroom/showthread.php?t=136508
VonDos is offline   Reply With Quote
Old 10-05-17, 04:39 PM   #99
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by VonDos View Post
Hi the_frog, Gap and everyone!
I also tested this method while working on Queen Of Bermuda, sadly without success.
What about this other method? (see quote below)

Quote:
Originally Posted by gap View Post
...in any case, I think texture used (in case of multiple-textured models) can be controlled via campaign files:

http://www.subsim.com/radioroom/show...9&postcount=44
Quote:
Originally Posted by VonDos View Post
Btw, thanks again Gap, tested now, great work with light\shadows!
My pleasure mate
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 10-05-17, 05:02 PM   #100
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Still talking about the illuminated windows, I have seen that you have set their material as 'emissive', similar to what Anvar made with GWX neutral ships.
This is indeed an effective and easy way to make an object to look luminous in game, but such a lights are always "on".
If you are looking for a more polished method to make ship lights to shine only at night, you can experiment with the CityLights controller. I have been looking into game files for its usage, and I think I have understood the way it works and how to set up objects/materials for it. If you are interested, I can explain here
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 10-05-17, 10:29 PM   #101
Kendras
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by gap View Post
Still talking about the illuminated windows, I have seen that you have set their material as 'emissive', similar to what Anvar made with GWX neutral ships.
This is indeed an effective and easy way to make an object to look luminous in game, but such a lights are always "on".
If you are looking for a more polished method to make ship lights to shine only at night, you can experiment with the CityLights controller. I have been looking into game files for its usage, and I think I have understood the way it works and how to set up objects/materials for it. If you are interested, I can explain here
I'm interested !

By the way, there are also light halos (texture) to add for position lights (green and red, and on the masts) : I don't think they can be controlled to be switched off during day time.
  Reply With Quote
Old 10-06-17, 04:04 AM   #102
VonDos
Admiral
 
Join Date: Mar 2007
Location: Italy
Posts: 2,213
Downloads: 75
Uploads: 49


Default

@Gap yes, please =) explain!

Today i've reworked a little superstructure's design. More linear and detailed:





Next heavy work will be adjust portholes in right re-worked position...
__________________

Those, others and WIP ships are avaiable in my SHIPYARD here:
http://www.subsim.com/radioroom/showthread.php?t=136508
VonDos is offline   Reply With Quote
Old 10-06-17, 12:50 PM   #103
Kendras
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by VonDos View Post
@Gap yes, please =) explain!

Today i've reworked a little superstructure's design. More linear and detailed:



Looks clean !

Quote:
Originally Posted by VonDos View Post
Next heavy work will be adjust portholes in right re-worked position...
I can do it if you want. I would like each porthole to be at the real place, and right dimension (I think yours are a bit too small).

Last edited by Kendras; 10-06-17 at 01:07 PM.
  Reply With Quote
Old 10-06-17, 01:20 PM   #104
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by VonDos View Post
Today i've reworked a little superstructure's design. More linear and detailed
To be honest I can't spot the difference but we trust you

Quote:
Originally Posted by VonDos View Post
Next heavy work will be adjust portholes in right re-worked position...
Yep, that's the hard part

Quote:
Originally Posted by Kendras View Post
I'm interested !
Quote:
Originally Posted by VonDos View Post
@Gap yes, please =) explain!
Okay.

How it works

That's probably easier for you to understand if you look at stock files, than it is for me to explain. I suggest you to open Harbor_kit.dat using S3d, and to look for one of the house models contained in it. Let's take House08_A for example.
If you select its embedded 3D model, you will see that it got two map channels.

 
If you are not familiar with secondary map channels, be aware that the 1st channel is the UV projection used for mapping on an object its main texture; the 2nd channel, on turn, is used in SHIII, IV and 5 for mapping on the same object another texture (such as a specular, an ambient occlusion map, etc.), when the latter and the main texture do not coincide perfectly.


If you click on the export button, S3d will let you to choose whether you want to export only the main map channel or both channels, and it will respectively name them *.obj and *-uv2.obj . If you open those objects in a 3D application, you should note two things:
  • the first remarkable feature is that both objects have identical x,y and z vertex/edge/face coordinates, but different UV projections, but that's no surprise if you have read the spoiler above.
  • the second remark, is that the two objects use two materials each, the 1st material corresponding to the whole house, and the 2nd one being limited to a couple of "redundant" faces, overlapping the two main facades on the house model, where doors and windows are painted.

Let's have look at those material in Harbor_kit.dat now, so that we can discover how they are set.
Both of them are named Kit_00.tga, but they do different jobs, and they are set differently.
There is not much to be said about the 1st material: it got the day-time texture embedded and, as for the rest, it is set as may other materials in game. The 2nd material is a bit more unusual though; for a start, we should note that it got a texture map controller attached, being set as "Ambient Occlusion" and with a night-time texture embedded. The second remarkable feature is the CityLights controller also attached to it, with DayIntensity and NightIntensity values that can be used for adjusting the transition from light to darkness.

Summing up, we have two texture maps and two materials, with four possible combinations of them. If my guess is right, only two combinations are active in game though:



The combination of UV map #1 and material #1 is the texture we normally see. Below a certain ambient light level, as set with the DayIntensity parameter, the combination of UV map #2 and material #2 start being gradually applied to the regular texture, until it reaches it maximum when ambient luminosity falls down the level set with the NightIntensity parameter.

I ignore the detail of how game shaders blend the two textures together, but it is possible thatthe night nexture it is applied to the main texture as a self-illumination map, or as a combination of self-illumination and ambient occlusion map.

How to set 3D portholes to emit light only at night

- Once you have finished moving/rotating them, group all the porthole glasses in a single object, separate from their ring-shaped frames and from the remaining ship parts. If you want, you can send the resulting object to me, for me to weld the redundant split edges (thus reducing vertex/edge count) and to rework a bit the UV map.

- After that, you should duplicate the object, assign a different material to each of the two copies of the porthole-glass-object, and re-group the two of them in a single object.

- When you have finished, export the resulting object two time, using the names whateveryouwant.obj and whateveryouwant-uv2.obj

- Create an empty library (dat) file, and copy the following chunks from Harbor_kit.dat in the new file:



 
A recommendation: Copy the chunks using the Ctrl **** C key combination to copy the chunks with all their subchunks. You could as well add the chuncks manually, using S3d's 'Append new chunk' or 'Append new child chunk' menus, but while working on specular maps, I have noticed that sometimes freshly created chunks, or chunks copied from an unappropriate file, don't work as supposed (I guess there might be some unknown special flags/properties that can't be seen nor edited in S3d, though the program can read/write them)


- Make sure that you have remapped all the Id's, and import the recently exported object in the 3d model chunk. If you select the one with the shortest name, S3d will automatically the one with the -uv2 suffix in its name, and it will give you the option to import it.

- Replace the textures embedded to the two materials with appropriate ones. Unless you want to paint some detail on them (like dust, sky reflections or smooth light transitions), you won't need big textures. Even the minimun size allowe (4x4 pixels IIRC) would be okay. The main texture should be painted with a shade of dark blue-grey or whatever you prefer, whereas the night texture can be painted light grey, almost white, or in a very bright tone of yellow.

- At this point, you can link the illuminated portholes to the main model through eqp file. you might also want to create a non-illuminated version of them for usage after war start.

That should be all. More or less the same method could be used for making ship surfaces, like decks and walls, illuminated at night, but for smooth light transition effects we should remap the UV projection of the second map channel, and create an appropriate texture. Probably too much work for a ship we will seldomly see in game in her neutral configuration

Quote:
Originally Posted by Kendras View Post
By the way, there are also light halos (texture) to add for position lights (green and red, and on the masts) : I don't think they can be controlled to be switched off during day time.
The method I have described above apllies to gloving lights, but who knows, maybe we can device some trick for making it to work with light halo effects too. Imagine how cool would be our lighthouses if we manage making their light to fade away during the day and to become proportionally more shiny at night
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 10-06-17, 01:26 PM   #105
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Kendras View Post
I can do it if you want. I would like each porthole to be at the real place, and right dimension (I think yours are a bit too small).
That's a deal that I would jump on VonDos, accept Kendras offer, before he realizes the troubles he is getting in
__________________
_____________________
|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:38 AM.


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