PDA

View Full Version : Question on texture modding


flaminus
04-24-16, 10:09 PM
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).

http://i862.photobucket.com/albums/ab188/Flamininus/hull%20number%20sample_zpsz8u5fpsw.jpg

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.

http://i862.photobucket.com/albums/ab188/Flamininus/sh_zpsqcmwwmqs.jpg

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.

http://i862.photobucket.com/albums/ab188/Flamininus/SH4Img2016-04-25_09.52.43_669_zpst19dxvg9.png

http://i862.photobucket.com/albums/ab188/Flamininus/SH4Img2016-04-25_09.53.04_809_zpsyaamkpng.png

http://i862.photobucket.com/albums/ab188/Flamininus/SH4Img2016-04-25_09.50.45_773_zpskbinihuv.png

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.

flaminus
05-12-16, 01:24 AM
Hello guys, Sorry that the original images were all dead links, now I've updated the links so the pictures can be seen normally. :)

CapnScurvy
05-12-16, 08:25 AM
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 :up:

flaminus
05-12-16, 10:49 AM
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 :up:

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.

http://i862.photobucket.com/albums/ab188/Flamininus/es_zps95ljx2zj.jpg

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... )
http://i862.photobucket.com/albums/ab188/Flamininus/1_zpsodj4sg0x.jpg

Besides, there are also some settings when we ex/import the 3D model, which i don't know clearly what they mean.
http://i862.photobucket.com/albums/ab188/Flamininus/ex_zps2wcjqi5y.jpg

http://i862.photobucket.com/albums/ab188/Flamininus/im_zpso69agrax.jpg

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

CapnScurvy
05-12-16, 03:15 PM
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.

iambecomelife
05-12-16, 05:09 PM
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.

flaminus
05-12-16, 09:14 PM
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.

====================================
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".:rock:

Aha~ the color is white now. :har:

http://i862.photobucket.com/albums/ab188/Flamininus/SH4Img2016-05-13_10.32.46_055_zpsekrwiy93.png

CapnScurvy
05-12-16, 10:56 PM
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.

flaminus
05-13-16, 12:30 AM
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.:hmmm:
http://i862.photobucket.com/albums/ab188/Flamininus/h_zpsvnjjhpj8.jpg

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.

CapnScurvy
05-13-16, 07:00 AM
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. :up: