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

Reply
 
Thread Tools Display Modes
Old 08-01-10, 08:55 AM   #16
SteelViking
The Old Man
 
Join Date: Mar 2010
Location: U.S.A.-East Coast
Posts: 1,587
Downloads: 86
Uploads: 4
Default

Nice work TDW. Now you should replace all the different icon .dds files with the same one.
__________________

He sank 198,650 tons....who you ask?....Erich Topp, that's who!
SteelViking is offline   Reply With Quote
Old 08-01-10, 09:01 AM   #17
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by SteelViking View Post
Nice work TDW. Now you should replace all the different icon .dds files with the same one.
doesn't work like that. The symbols for the ships are drawn using the .shp files. The coloring for them is done with a pixel shader.
TheDarkWraith is offline   Reply With Quote
Old 08-01-10, 09:32 AM   #18
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Objects on the map like ship icons, location names, mission areas etc. are shapes (one or more 2D models in a *.shp file).

A shape file can include a texture or not. If it has a texture, the texture colors are rendered by a pixel shader on the 2D shape model.

a simple SH5 shape file:
Code:
1 
arrowbody.dds
4
0.0 0.954569 0.0
-16.3476 1.51965 0.0
-16.3476 -1.51577 0.0
0.0 -0.951302 0.0
0.9995 0.813524 0.5
0.082804 0.999501 0.5
0.0828592 0.000499517 0.5
0.9995 0.186274 0.5
2
0 1 2
0 2 3
line 1: 1 = shape use texture 0 = shape has no texture
line 2: texture name
line 3: 4 = vertex count
line 4-7: vertices for object
line 8-11: vertices for texture coordinates
line 12: 2 = triangle count
line 13-14: Indices of vertices forming a triangle
__________________
--
Vapor-ware is always easier to sell because there's no limit what it can do!
Seeadler is offline   Reply With Quote
Old 08-01-10, 01:41 PM   #19
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by Seeadler View Post
Objects on the map like ship icons, location names, mission areas etc. are shapes (one or more 2D models in a *.shp file).

A shape file can include a texture or not. If it has a texture, the texture colors are rendered by a pixel shader on the 2D shape model.

a simple SH5 shape file:
Code:
1 
arrowbody.dds
4
0.0 0.954569 0.0
-16.3476 1.51965 0.0
-16.3476 -1.51577 0.0
0.0 -0.951302 0.0
0.9995 0.813524 0.5
0.082804 0.999501 0.5
0.0828592 0.000499517 0.5
0.9995 0.186274 0.5
2
0 1 2
0 2 3
line 1: 1 = shape use texture 0 = shape has no texture
line 2: texture name
line 3: 4 = vertex count
line 4-7: vertices for object
line 8-11: vertices for texture coordinates
line 12: 2 = triangle count
line 13-14: Indices of vertices forming a triangle

Look forward to your shape program. I tried following your shape tutorial from before with no luck.
reaper7 is offline   Reply With Quote
Old 08-01-10, 01:47 PM   #20
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Seeadler View Post
A shape file can include a texture or not. If it has a texture, the texture colors are rendered by a pixel shader on the 2D shape model.
even without a texture the color for it is rendered with the color value passed to the pixel shader. I edited the pixel shader used for 2D map shapes and overrode that color value passed and used black to make all the contacts one color (0,0,0, colorpassed alpha)
TheDarkWraith is offline   Reply With Quote
Old 08-02-10, 07:46 AM   #21
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by reaper7 View Post
Look forward to your shape program. I tried following your shape tutorial from before with no luck.
It takes some little time because the shape program contains currently some dll's which I did for one of my clients and I can not release them (licensing reasons). I created the shape viewer quickly with these dll's because I needed a tool to effectively convert many of the map location names to an editable format. Now I just have to remove the customer-specific functions from the dll's.
__________________
--
Vapor-ware is always easier to sell because there's no limit what it can do!
Seeadler 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 06:10 PM.


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