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 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 04-24-16, 10:09 PM   #1
flaminus
Sparky
 
Join Date: Apr 2012
Posts: 151
Downloads: 502
Uploads: 5
Icon9 Question on texture modding

Problem Solved, see #7

Inspired by the "TMO_Sample_emblem" mod, I want to add the hull number to the subs, just like the pic below (from OTC 1.5 LoadingScreen).



Then I tried to edit the *.dat file to add 2 planes to the bow of a sub (taking Balao class as an example) and added an *.tga for them as the hull number.
I just exported the *.obj from the conning tower and imported it to hull.



When i finished that, The emblem is right, and i can see the hull number in the bow. Everything goes fine except for the "red color is missing" issue of hull number. It should be white, but now it looks like green and blue. (if you use photoshop to open this tga file and disable red Channel, you will get the same result.)
Besides, if i don't enable the "TMO_Sample_emblem" mod, there will be a blue-green square on the bow, where there is suggested to be nothing.







It's my first time to use S3D, i'm not quite familiar with the mechanism.
Could anyone help me and tell me what's wrong with it? Thanks in advance.

Last edited by flaminus; 08-17-16 at 12:03 AM. Reason: Replace the dead image links with functional ones.
flaminus is offline   Reply With Quote
Old 05-12-16, 01:24 AM   #2
flaminus
Sparky
 
Join Date: Apr 2012
Posts: 151
Downloads: 502
Uploads: 5
Default

Hello guys, Sorry that the original images were all dead links, now I've updated the links so the pictures can be seen normally.
flaminus is offline   Reply With Quote
Old 05-12-16, 08:25 AM   #3
CapnScurvy
Admiral
 
CapnScurvy's Avatar
 
Join Date: Apr 2005
Location: Dayton, Ohio
Posts: 2,292
Downloads: 474
Uploads: 64


Default

More than likely the material/texture is not set correctly in your Node:11, named "hull_number.dds".

Try to match what the TMO_sample_emblem Node:? (I can't read it), "emblem.tga" did with its parameter settings.

You may need to make your .dds image file the same as the .tga image of the other mod but I've seen .dds images work just fine.

=============

You shouldn't need (or want to) remove the red channel from the image. Obviously, you've got the Alpha channel right (showing the numbers)....just recheck the parameters in the material/texture node. That blue/green color is the Alpha without a texture image linked to it properly.

Good job in porting it over to your files! Looks like you did it correctly.....the 3D model is always numbered before the rest of the node structure that describes it. The materials/texture node is always numbered before the model. You have your model ID's different than the TMO_Emblem ID's, and the materials ID's as well (that's important, just in case these two objects ever get put into the game at the same time. Will cause a CTD every time). Good job
__________________


The HMS Shannon vs. USS Chesapeake outside Boston Harbor June 1, 1813

USS Chesapeake Captain James Lawrence lay mortally wounded...
Quote:
.."tell the men to fire faster, fight 'till she sinks,..boys don't give up the ship!"
CapnScurvy is offline   Reply With Quote
Old 05-12-16, 10:49 AM   #4
flaminus
Sparky
 
Join Date: Apr 2012
Posts: 151
Downloads: 502
Uploads: 5
Icon7

Quote:
Originally Posted by CapnScurvy View Post
More than likely the material/texture is not set correctly in your Node:11, named "hull_number.dds".

Try to match what the TMO_sample_emblem Node:? (I can't read it), "emblem.tga" did with its parameter settings.

You may need to make your .dds image file the same as the .tga image of the other mod but I've seen .dds images work just fine.

=============

You shouldn't need (or want to) remove the red channel from the image. Obviously, you've got the Alpha channel right (showing the numbers)....just recheck the parameters in the material/texture node. That blue/green color is the Alpha without a texture image linked to it properly.

Good job in porting it over to your files! Looks like you did it correctly.....the 3D model is always numbered before the rest of the node structure that describes it. The materials/texture node is always numbered before the model. You have your model ID's different than the TMO_Emblem ID's, and the materials ID's as well (that's important, just in case these two objects ever get put into the game at the same time. Will cause a CTD every time). Good job
Thank you for your encouragement. However...I did check the parameters and make sure they were the same with "emblem.tga" settings, and i also used a *.dds file to repalce *.tga, but it didn't work neither.
I didn't remove the red channel of the image with photoshop, I mean that it seems the game removes it by itself.



When I imported the 3D models of planes, there was a warning like below. Maybe that's the reason. (if you chose YES, you will get this color, if you choose NO, you will get red or purple or even others, really creepy... )


Besides, there are also some settings when we ex/import the 3D model, which i don't know clearly what they mean.




==========================
BTW, I have solved the sinking credit issue, you may go back to my thread to find the result. Any comment will be appreciated.

Last edited by flaminus; 05-12-16 at 11:10 AM.
flaminus is offline   Reply With Quote
Old 05-12-16, 03:15 PM   #5
CapnScurvy
Admiral
 
CapnScurvy's Avatar
 
Join Date: Apr 2005
Location: Dayton, Ohio
Posts: 2,292
Downloads: 474
Uploads: 64


Default

I'm not sure why you would want to export/import the 3D model?? It's just a flat plane.

Why don't you just Copy/Paste the model from the TMO_Emblem mod straight over to your .dat file, then build the remaining nodes around it? With both .dat files open in S3D (as you have it in your image), you just copy the model at the end of one of your existing entities nodes (if the last node is 788, copy/paste the 3D model after it....making the model node:789). Then copy the remaining nodes for it to complete the move. You'll have to allow S3D to rename the ID's; you'll have to rename as needed the model name; then you'll have to make sure the materials ID matches within the Parent/Child ID's of the various nodes. But, you won't have to import anything....unless you're wanting to resize the plane.

Those export/import parameters are tricky....I'm not sure what I've done before to get by.....just lucky I guess. Avoid needing to export/import by just copy/pasting the model where you want.
__________________


The HMS Shannon vs. USS Chesapeake outside Boston Harbor June 1, 1813

USS Chesapeake Captain James Lawrence lay mortally wounded...
Quote:
.."tell the men to fire faster, fight 'till she sinks,..boys don't give up the ship!"
CapnScurvy is offline   Reply With Quote
Old 05-12-16, 05:09 PM   #6
iambecomelife
Silent Hunter
 
Join Date: Apr 2005
Posts: 4,584
Downloads: 297
Uploads: 0


Default

I'm pretty sure I've got part of your problem solved!

I had the same texture problem with the colors for flotilla emblems on my WWI submarines - the emblems had a very strange color tint to them. For the object plane that you use as a "board" for the submarine's bow ID number, add a child node of the type "UnifiedRenderControler". After doing that, all colors were displayed properly.
iambecomelife is offline   Reply With Quote
Old 05-12-16, 09:14 PM   #7
flaminus
Sparky
 
Join Date: Apr 2012
Posts: 151
Downloads: 502
Uploads: 5
Icon14

Quote:
Originally Posted by CapnScurvy View Post
I'm not sure why you would want to export/import the 3D model?? It's just a flat plane.

Why don't you just Copy/Paste the model from the TMO_Emblem mod straight over to your .dat file, then build the remaining nodes around it? With both .dat files open in S3D (as you have it in your image), you just copy the model at the end of one of your existing entities nodes (if the last node is 788, copy/paste the 3D model after it....making the model node:789). Then copy the remaining nodes for it to complete the move. You'll have to allow S3D to rename the ID's; you'll have to rename as needed the model name; then you'll have to make sure the materials ID matches within the Parent/Child ID's of the various nodes. But, you won't have to import anything....unless you're wanting to resize the plane.

Those export/import parameters are tricky....I'm not sure what I've done before to get by.....just lucky I guess. Avoid needing to export/import by just copy/pasting the model where you want.
I've tried to copy and paste, but the 3D model just can not be placed into the node as a child chunk, it always go outside of node. so i can only use ex/importing.

====================================
Quote:
Originally Posted by iambecomelife View Post
I'm pretty sure I've got part of your problem solved! looking forward for your " Wolves of the Kaiser" Mod.

I had the same texture problem with the colors for flotilla emblems on my WWI submarines - the emblems had a very strange color tint to them. For the object plane that you use as a "board" for the submarine's bow ID number, add a child node of the type "UnifiedRenderControler". After doing that, all colors were displayed properly.
Thanks a lot!! Finally i make it right! Your advice is really enlightening. Looking forwards for your cool " Wolves of the Kaiser".

Aha~ the color is white now.


Last edited by flaminus; 05-13-16 at 01:03 AM.
flaminus is offline   Reply With Quote
Old 05-12-16, 10:56 PM   #8
CapnScurvy
Admiral
 
CapnScurvy's Avatar
 
Join Date: Apr 2005
Location: Dayton, Ohio
Posts: 2,292
Downloads: 474
Uploads: 64


Default

Quote:
I've tried to copy and paste, but the 3D model just can not be placed into the node as a child chunk, it always go outside of node. so i can only use ex/importing
Yes, the object model will always go outside of the node chunk at first.

Think of it this way. The model object has the first numbered node of the chunk...even though its the second entry of the chunk. You first copy the model you want to add, pasting it under the last numbered node of an existing chunk (makes no difference which chunk you choose...you're just wanting to get the node sequence correct.....12, 13, 14, 15, etc). The single model node will usually drop to the bottom of the page, but the node number assigned to it is in sequence with where ever you chose to paste it.

Then you follow the progression of numbered nodes for the chunk by copy/pasting the remaining nodes in the same sequence as the chunk your copying from. You then bring them all together by having S3D make new ID's for the initial node; then copy/paste the ID into the child nodes in the ParentID: text box. The entire chunk will get in line with itself as you change the ID or ParentID of the nodes. As long as your node numbering is in sequence, the entire chunk will come into line as you create new ID's, or have ParentID's copied into the correct place. Copy/paste each line works without exporting the entire chunk.
__________________


The HMS Shannon vs. USS Chesapeake outside Boston Harbor June 1, 1813

USS Chesapeake Captain James Lawrence lay mortally wounded...
Quote:
.."tell the men to fire faster, fight 'till she sinks,..boys don't give up the ship!"
CapnScurvy is offline   Reply With Quote
Old 05-13-16, 12:30 AM   #9
flaminus
Sparky
 
Join Date: Apr 2012
Posts: 151
Downloads: 502
Uploads: 5
Icon7

Quote:
Originally Posted by CapnScurvy View Post
Yes, the object model will always go outside of the node chunk at first.

Think of it this way. The model object has the first numbered node of the chunk...even though its the second entry of the chunk. You first copy the model you want to add, pasting it under the last numbered node of an existing chunk (makes no difference which chunk you choose...you're just wanting to get the node sequence correct.....12, 13, 14, 15, etc). The single model node will usually drop to the bottom of the page, but the node number assigned to it is in sequence with where ever you chose to paste it.

Then you follow the progression of numbered nodes for the chunk by copy/pasting the remaining nodes in the same sequence as the chunk your copying from. You then bring them all together by having S3D make new ID's for the initial node; then copy/paste the ID into the child nodes in the ParentID: text box. The entire chunk will get in line with itself as you change the ID or ParentID of the nodes. As long as your node numbering is in sequence, the entire chunk will come into line as you create new ID's, or have ParentID's copied into the correct place. Copy/paste each line works without exporting the entire chunk.
Eh...Yes.I also edit the ID and ParentID of others, but we can't change the parentID of a 3D model, because it's not editable.


With the method from iambecomelife in #6 post, I've already get the right color. So I think whether ex/importing or not is not the key point. I noticed that there is an "UnifiedRenderControler" for the whole hull texture, so maybe for any additional texture in the hull, there should also be a corresponding "UnifiedRenderControler" for each node.
flaminus is offline   Reply With Quote
Old 05-13-16, 07:00 AM   #10
CapnScurvy
Admiral
 
CapnScurvy's Avatar
 
Join Date: Apr 2005
Location: Dayton, Ohio
Posts: 2,292
Downloads: 474
Uploads: 64


Default

The ParentID of the model isn't what puts the model in-line while you copy/paste the lines of the chunk.....it's the node numbering sequence.

I understand it's a moot point for what you're doing. I'm just telling you this so you don't have to export/import a model (with all the parameters that are associated with it) the next time you wish to use a model.
__________________


The HMS Shannon vs. USS Chesapeake outside Boston Harbor June 1, 1813

USS Chesapeake Captain James Lawrence lay mortally wounded...
Quote:
.."tell the men to fire faster, fight 'till she sinks,..boys don't give up the ship!"
CapnScurvy is offline   Reply With Quote
Reply


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 04:10 PM.


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