SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   Cloning Objects in "Plainer English" by stljeffbb1 (https://www.subsim.com/radioroom/showthread.php?t=84285)

AG124 09-27-05 09:04 AM

Would it ever be possible to import the models from SH2? I know they are in a different format, but maybe they could be converted? It would provide us with a lot of ready-made models, anyway.

09-28-05 08:52 AM

Quote:

Have you install java in your XP? www.java.com

Cheers,
Yes, I have latest java installed, but it shows just black screen and stops.
Finally, it stopped to work at my office (luckely, I managed to make most of what i wanted, yesturday :rock: ), and I don't know why. It says that a pass, file or library is missed :( Dropping files from fresh or later versions doesn't help.
I want Sansal's tool back! :damn:

Sansal 09-30-05 09:22 PM

http://rapidshare.de/files/5729597/Pack3D.jar.html

Copy in sh3 folder....tomorrow the manual :zzz:

stljeffbb1 09-30-05 11:54 PM

oooooooh.....the new windows version of Sansal's tool looks good!

:up:

-Jeff

Canaris 10-01-05 02:17 AM

Looks fine Sansal. :up:
Hm, because of that "Fun with Wings 3d"-thread i had a look into the Wavefront .obj file format. Their were reported some things about wrong texturemappings. Following:
Wavefront .obj file format uses a different v offset in uvw-maps.
That means obj has the zero-coordinate for v on the opposite of the mapfile than SH3 geometry. Maybe that helps a little bit.

MfG
Canaris

Sansal 10-01-05 07:09 AM

Quote:

Originally Posted by Canaris
Looks fine Sansal. :up:
Hm, because of that "Fun with Wings 3d"-thread i had a look into the Wavefront .obj file format. Their were reported some things about wrong texturemappings. Following:
Wavefront .obj file format uses a different v offset in uvw-maps.
That means obj has the zero-coordinate for v on the opposite of the mapfile than SH3 geometry. Maybe that helps a little bit.

MfG
Canaris

I don't work before with 3d modelling and i don't know good the obj format. Canaris, do you know how to specify a tga texture in the obj? All that i found in the net don't explain it.

Thanks Canaris,

Seeadler 10-01-05 07:40 AM

Textures informations are stored outside the OBJ file in a material file.

Example:
- A simple cube with a texture sun.tga mapped on all sides.
- You will get two files, the cube.obj and cube.mtl

cube.obj:
Code:

# Wavefront OBJ file: H:\Projekte\epro Software GmbH\Testobjekte\cube.obj
# Bounding box of geometry = (-20.9466,0,-23.3042) to (2.77286,21.2039,7.55135).

mtllib cube.mtl

# Coordinates for object 'Box01'
v  -20.946615 0.0 7.551350
v  2.772858 0.0 7.551350
v  -20.946615 0.0 -23.304178
v  2.772858 0.0 -23.304178
v  -20.946615 21.203859 7.551350
v  2.772858 21.203859 7.551350
v  -20.946615 21.203859 -23.304178
v  2.772858 21.203859 -23.304178
v  -20.946615 0.0 7.551350
v  2.772858 0.0 7.551350
v  2.772858 21.203859 7.551350
v  2.772858 21.203859 7.551350
v  -20.946615 21.203859 7.551350
v  -20.946615 0.0 7.551350
v  2.772858 0.0 -23.304178
v  2.772858 21.203859 7.551350
v  2.772858 0.0 -23.304178
v  -20.946615 0.0 -23.304178
v  -20.946615 21.203859 -23.304178
v  -20.946615 21.203859 -23.304178
v  2.772858 21.203859 -23.304178
v  2.772858 0.0 -23.304178
v  -20.946615 0.0 -23.304178
v  -20.946615 21.203859 7.551350
v  -20.946615 21.203859 7.551350
v  -20.946615 0.0 -23.304178
# 26 vertices

vt 0.0 0.0 0.0
vt 0.0 1.000000 0.0
vt 1.000000 0.0 0.0
vt 1.000000 1.000000 0.0
# 4 texture vertices

vn  -1.0 0.0 0.0
vn  0.0 -1.0 0.0
vn  0.0 0.0 -1.0
vn  0.0 0.0 1.0
vn  0.0 1.0 0.0
vn  1.0 0.0 0.0
# 6 normals

usemtl 01___default

o Box01
g Box01

s off
f 1/3/2 3/4/2 4/2/2
f 4/2/2 2/1/2 1/3/2
f 5/1/5 6/3/5 8/4/5
f 8/4/5 7/2/5 5/1/5
f 9/1/4 10/3/4 11/4/4
f 12/4/4 13/2/4 14/1/4
f 2/1/6 15/3/6 8/4/6
f 8/4/6 16/2/6 2/1/6
f 17/1/3 18/3/3 19/4/3
f 20/4/3 21/2/3 22/1/3
f 23/1/1 1/3/1 24/4/1
f 25/4/1 7/2/1 26/1/1
# 12 polygons

cube.mtl:
Code:

# Wavefront OBJ file: H:\Projekte\epro Software GmbH\Testobjekte\cube.obj
# Bounding box of geometry = (-20.9466,0,-23.3042) to (2.77286,21.2039,7.55135).

newmtl default
        Ns 32
        d 1
        illum 2
        Kd 0.4 0.4 0.4
        Ks 0.7 0.7 0.7
        Ka 0.3 0.3 0.3

newmtl 01___default
        Ns 3
        d 1
        illum 2
        Kd 0.588235 0.588235 0.588235
        Ks 0 0 0
        Ka 0.588235 0.588235 0.588235
        map_Kd sun.tga


Sansal 10-01-05 08:02 AM

Many thanks Seeadler :up:

What is Kd Ks Ka in mtl ? Three posible images?

Canaris 10-01-05 08:12 AM

Hm, i also didn't use the obj-format, but how the faces are written is very useful for work with SH3-geometry. :)
To add a material is very simple:
Code:

# Wavefront OBJ file
# header & blabla
mtllib NCL_Dido_boat02.mtl #use a file to specify the materials
g NCL_Dido_boat02 #objectname as group
v 0.000912 0.049299 -0.350204
v 0.000798 -0.063856 -0.287090
v -0.000745 -0.063856 0.282524
v -0.000864 0.049307 0.350204
# and so on
vt 0.860849 0.364295
vt 0.741674 0.314768
vt 0.980788 0.315139
vt 0.958285 0.357868
vt 0.965689 0.412230
# and so on
usemtl normal #specify the material by name(normal) that is used in following faces
f 2/3 3/2 7/1
f 7/1 15/4 2/3
f 8/6 15/4 9/5
f 9/5 1/7 8/6
f 15/4 8/6 2/3
# and so on
usemtl 2sided #specify the material by name(2sided) that is used in following faces
f 31/27 21/26 30/25
f 25/30 9/29 28/28
f 9/29 25/30 1/31
f 14/34 23/33 4/32
f 27/37 29/36 26/35
f 11/39 19/38 27/37
# and so on

and the materialfile NCL_Dido_boat02.mtl
Code:

# Wavefront material file
# header & blabla

newmtl normal    # specify a new material - named normal
        Ka 0 0 0                                        # ambient color - means what colors of ambient light are reflected (rgb)
        Kd  0.898039 0.898039 0.898039  # diffuse color - means what colors of diffuse light are reflected (rgb)
        Ks 1.000000 1.000000 1.000000  # specular color - - means what colors of specular light are reflected (rgb)
        illum 1.000000
        Ns 0.003922
        map_Kd NCL_Dido.tga  # specifys a mapfile for diffuse material
newmtl 2sided    # the same procedure as last year
        Ka 0 0 0
        Kd 0.898039 0.898039 0.898039
        Ks 1.000000 1.000000 1.000000
        illum 1.000000
        Ns 0.000000
        map_Kd NCL_Dido.tga

What Ns means i don't know. But i hope that helps a little bit.

MfG
Canaris

edit: i should learn to write faster :damn:

Seeadler 10-01-05 08:27 AM

Quote:

Originally Posted by Sansal
What is Kd Ks Ka in mtl ?

Ka - defines the ambient color of the material to be (r,g,b). The default is (0.2,0.2,0.2);

Kd - defines the diffuse color of the material to be (r,g,b). The default is (0.8,0.8,0.8);

Ks - defines the specular color of the material to be (r,g,b). This color shows up in highlights. The default is (1.0,1.0,1.0);

d - defines the transparency of the material to be alpha. The default is 1.0 (not transparent at all) Some formats use Tr instead of d

Tr - defines the transparency of the material to be alpha. The default is 1.0 (not transparent at all). Some formats use d instead of Tr

Ns - defines the shininess of the material to be s. The default is 0.0

illum - denotes the illumination model used by the material. illum = 1 indicates a flat material with no specular highlights, so the value of Ks is not used. illum = 2 denotes the presence of specular highlights, and so a specification for Ks is required

map_Ka - names a file containing a texture map, which should just be an ASCII dump of RGB values

Reference:
http://www.csit.fsu.edu/~burkardt/data/mtl/mtl.html

martes86 10-01-05 09:22 AM

I'm not professional 3D modeller, and don't use Maya or whatever you use (I use gMax), but wanted to test the new version of Sansal's tool. It's great. You can export the sub's 3D interior too, and do the things in a Windows interface... Someone to try to fix some litlle things? :D

Sansal 10-01-05 09:40 AM

:up: Many, many, many thanks Canaris y Seeadler.....all this datas are in the type 2 chunk. Reworking to insert mtl in the export tool :ping:

Aaaaaaaaaaaaarrrrrrrrrrrrrrrrrrgggggggggggggg ( The Bismark is sexy )

http://i3.photobucket.com/albums/y72...l/f05be9d6.jpg

10-03-05 03:13 AM

I am making HMS Arethusa light cruiser of Dido. I have edit the haul in Maya 5.0 by cutting waste dacks, but as it is my first work with 3d editor i need some help.
1. How can I add poligons to the model?
2. How can I put back cutten poligons if they are nessesary?
3. Hoe can I export edited object from Maya to SHIII .obj?
4. How can I reposition nodes for turrets deeper in the haul to put 6'' ones from Nelson?

Sansal 10-03-05 07:20 AM

My last version of the tool don't work fine with textures but i guees to upload the solution today or tomorrow.

For questions 1 and 2. There are a new non-commercial version of Maya 7 http://www.alias.com/glb/eng/product...ductId=1900003 whit tutorials for begginers.

3.- You need to activate the objExport plug-in.:Windows->Settings/Preferences -> Pluguin Manager

4.- You need change, with a hexeditor, the position a non-3d node like cfg#M01_NAME_OF_SHIP. If you need one torret more you can change the name of, for example, cfg#A12_NAME_OF_SHIP for cfg#M04_ and add the type of gun in the .eqp file.


Sorry my english.

Seeadler 10-03-05 08:04 AM

Which is the correct internal OBJ format syntax to the import?
I used several 3D tools (3DMax7, Maya 5 PE, Wings3D, DeepExploration) and all outputs different OBJ formats but none of these formats can be imported.

The import tool gives as error message: "java.lang.NumberFormatException: emty String"

Also the new values copied into the OBJ structure produced by Pack3D ends with the this error while import the OBJ file.


All times are GMT -5. The time now is 02:15 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.