Русский New site

Advanced search

[ New messages · Forum rules · Members ]
Page 1 of 512345»
Forum » SpaceEngine » Archive » MOD - Importing space ships 0.96 (How to import space ships models)
MOD - Importing space ships 0.96
SpaceEngineerDate: Saturday, 07.07.2012, 00:20 | Message # 1
Author of Space Engine
Group: Administrators
Russian Federation
Messages: 4798
Status: Offline
How to add a ship model in SpaceEngine 0.96

First, the folder structure:

data\textures\spacecrafts\ - textures. While there are almost no textures, in the future try to use the textures from this folder. The more ships that use the same texture, the more video memory is saved. Put here new textures for your model.

data\models\spacecrafts\ - models. Each ship in its own folder, although it is not necessary. In the future there will be a library of models of standard modules, similar to textures.

data\models\spacecrafts\spacecrafts.sc - ship script (one script for all models). It describes the parameters of the ship, paths to the model and textures, and saves the coordinates and other stuff when you exit the game.

The ship supports up to four textures (this is the name of the script's parameters):
DiffMap - diffuse (i.e., color), RGB or RGBA (if it has an alpha channel, it is interpreted as the brightness of the specular highlight).
BumpMap - height map, Grayscale or RGB (the first is better - it has a smaller size). The engine automatically calculates the normal map on it.
NormMap - normal map in tangent space, RGB. If it is specified, the BumpMap and BumpHeight are ignored.
DetailDiffMap - detailed diffuse texture, i.e. minor color pattern. Applied to the entire model with repetition, so it is a tiled texture. The format is similar to DiffMap.
DetailBumpMap - detailed map of bumps, that is, minor surface irregularities. The format is similar to BumpMap.

It is better to save textures in png format. But remember that Photoshop saves RGBA textures in png incorrectly - for some reason it multiplies the RGB on the alpha and saves image as RGB png. To get around this, save RGBA texture in the tga format, and convert them into the correct RGBA png by SpaceEngine: open the main.cfg and set the ConvertRGBAtoPNG parameter to true - then when the engine loads an RGBA texture, it automatically saves it in png format in the same folder.

SpaceEngine has its own binary format for models: *.sm. To import the model from your 3D editor, save it in the format *.obj and put the file in the data\models\spacecrafts\modelname\ folder. Once the ship script is added (see below), simply run SpaceEngine - it will load the *.obj and automatically save it in *.sm in the same folder. After this the *.obj can be removed. Depending on the number of polygons, the *.obj can take minutes to load. If you need to update the model with a new version, simply delete the *.sm and copy the new *.obj file there.

When you export the model in *.obj, in the settings select the option to export geometry as triangles, and to keep the vertex data, normals and texture coordinates. Creating of the library of materials (the *.mtl file) is not needed. Example settings for 3ds Max 2011:



Example of the script:

Code

Spacecraft  "Shuttle"
{
       Class   "Shuttle"
       Length   25.0317
       Mass     18000
             
       Unit     0.01

       Albedo   0.07
       Exposure 3.0
       SpecularPower  150
       SpecularBright 10
       Color  ( 1.00, 1.00, 1.00 )

       CurSystemID "-1.-1.-1.8403.1599.-1.0.0.28.-1"
       UnivPos     (-000000000000120026533AACF231C382, +00000000000001D01F8D4FCB6ABAEDD2, +0000000000000499C8432A00576D6A52)
       Orientation ( -2.006531731819057e-001, -8.518595060530581e-001, 2.322854490015125e-001, 4.244021161837415e-001 )
       Velocity    ( 2.608899043696360e+001, 1.300856180226599e+001, -2.689579641440001e+001 )
       AngVelocity ( 0.000000000000000e+000, 0.000000000000000e+000, 0.000000000000000e+000 )

       Orbit
       {
        Period          1.71119e-4
        SemiMajorAxis   4.927139e-5
        Eccentricity    0.0
        Inclination     0.0
        MeanAnomaly     135.27
        AscendingNode   125.08
        ArgOfPericen    318.14
       }

       Mesh    "Shuttle/Shuttle.sm"
       MeshEulerAngles (180, 270, 90)

       DiffMap "Shuttle-diff.*"

       BumpMap "Shuttle-bump.*"
       BumpHeight 2.0

       //DetailDiffMap "Detail-noise.*"
       //DetailDiffScale  16.0

       DetailBumpMap "Detail-noise.*"
       DetailBumpScale  32.0
       DetailBumpHeight 0.5
}


Description of some parameters.

Class
Allowed classes of the ships:
"Probe" - probe
"Shuttle" - landing vehicle
"Starship" - interstellar spaceship
"Planetship" - interplanetary spaceship
"Station" - space station

Length, Unit
Unit length is a length of the unit that you have used in the 3D editor. I.e. If you specify the unit length in the script, SpaceEngine will automatically calculate the length of the ship and save it to a script in the parameter Length. If the unit length is unknown, it is necessary to specify an approximate length of the ship in the parameter Length. All quantities are in meters.

MeshEulerAngles
If your ship displayed in the game upside down up or back to front, it is necessary to find the angles of rotation. You can do this in the game - select a ship to enter the Edit mode (press the * key twice). Then rotate the ship using the arrow buttons and the < and > buttons. Step of rotation - 90°, with the Shift held - 1°. The Euler angles is typed in the ship's info table, they must be written to the script manually.

*
 
VinnyDate: Friday, 24.08.2012, 20:59 | Message # 2
Explorer
Group: Users
United States
Messages: 172
Status: Offline
Hi, SpaceEngineer!

Your post about importing the spaceship mods is very interesting! is there a space ship addon for space engine? Thanks!

Cheers,
Vincent
 
HarbingerDawnDate: Saturday, 25.08.2012, 03:12 | Message # 3
Cosmic Curator
Group: Administrators
United States
Messages: 8714
Status: Offline
Quote (Vinny)
is there a space ship addon for space engine?

There are a few ship addons made, just go look through the Mods and Addons section of the forum.





All forum users, please read this!
My SE mods and addons
Phenom II X6 1090T 3.2 GHz, 16 GB DDR3 RAM, GTX 970 3584 MB VRAM
 
VinnyDate: Saturday, 25.08.2012, 06:44 | Message # 4
Explorer
Group: Users
United States
Messages: 172
Status: Offline
Hi, HarbingerDawn!

Okay, got it! Thanks!

Cheers,
Vincent
 
CheDate: Sunday, 02.09.2012, 01:45 | Message # 5
Observer
Group: Newbies
Brazil
Messages: 5
Status: Offline
great... but...

how I can show this space ships in my Space Engine?
 
FloWDate: Monday, 03.09.2012, 19:36 | Message # 6
Observer
Group: Newbies
Germany
Messages: 5
Status: Offline
hey community,

hope you can help me with my actual problem....i imported a 3d Starship .OBJ model, but i only have a black texture...

http://imageshack.us/photo/my-images/338/spaceengine201209032031.jpg/

Code


Spacecraft  "Test"
{              
                   Class   "Shuttle"              
                   Length   9.8              
                   Mass     18000              
                          
                   Unit                   

                   Albedo   0.0001
                   Exposure 1.0              
                   SpecularPower  10
                   SpecularBright 10
                   Color  ( 1.5, 1.5, 1.5 )              

                   CurSystemID "-1.-1.-1.8403.-1.114.8.8479277.9.-1"              
                   UnivPos     (-000000000000120099D50A83FB3FAFBB, +00000000000001D148A42B18FA39C552, +000000000000049D69EFB9BF8E99732F)              
                   Orientation ( 1.882922227726560e-001, -8.951173192188432e-001, -3.203508778483821e-001, 2.463459736621949e-001 )              
                   Velocity    ( 5.524161104332127e+001, -7.027288514575403e+001, -5.603119420294679e+000 )              
                   AngVelocity ( -6.975736996017264e-016, -1.047388061510629e-007, -4.043421067714033e-006 )              

                   Orbit              
                   {              
                    Period          1.71119e-4              
                    SemiMajorAxis   4.927139e-5              
                    Eccentricity    0.0              
                    Inclination     0.0              
                    MeanAnomaly     135.27              
                    AscendingNode   125.08              
                    ArgOfPericen    318.14              
                   }              

                   Mesh    "test/test.sm"              
                   MeshEulerAngles (0, 270, 0)              

                DiffMap "destiny.*"

                NormMap "destiny_normal.*"

              SpecMap "SHW-spec.*"

              DetailDiffMap "Detail-noise.*"
              DetailDiffScale  32.0

              DetailBumpMap "Detail-noise.*"
              DetailBumpScale  8.0
              DetailBumpHeight 10.3
}  


maybe any of you can help me...
 
DoctorOfSpaceDate: Monday, 03.09.2012, 20:18 | Message # 7
Galaxy Architect
Group: Global Moderators
Pirate
Messages: 3599
Status: Offline
I too am doing a Star Destroyer.

However I think your issue is the UV map. You need to fix that in your model editing software, you can only use 1 texture and 1 bump for the whole thing. Best option is to tile the texture in editing software and then remap the UV to it.





Intel Core i7-5820K 4.2GHz 6-Core Processor
G.Skill Ripjaws V Series 32GB (4 x 8GB) DDR4-2400 Memory
EVGA GTX 980 Ti SC 6GB


Edited by DoctorOfSpace - Monday, 03.09.2012, 20:18
 
FloWDate: Monday, 03.09.2012, 20:20 | Message # 8
Observer
Group: Newbies
Germany
Messages: 5
Status: Offline
do you know how to do with c4d?
 
DoctorOfSpaceDate: Monday, 03.09.2012, 21:17 | Message # 9
Galaxy Architect
Group: Global Moderators
Pirate
Messages: 3599
Status: Offline
Quote (FloW)
do you know how to do with c4d?


I do not, but if you'd like I could try to fix it for you if you send me all the required files.





Intel Core i7-5820K 4.2GHz 6-Core Processor
G.Skill Ripjaws V Series 32GB (4 x 8GB) DDR4-2400 Memory
EVGA GTX 980 Ti SC 6GB
 
HarbingerDawnDate: Tuesday, 04.09.2012, 04:33 | Message # 10
Cosmic Curator
Group: Administrators
United States
Messages: 8714
Status: Offline
Hello FloW, and welcome to the forum. Please take a moment to read the forum rules.

An appropriate place to ask this question would have been in the Importing ships thread (this thread). In the future, try not to create any new threads unless there is no other appropriate place for your post.

Thanks!





All forum users, please read this!
My SE mods and addons
Phenom II X6 1090T 3.2 GHz, 16 GB DDR3 RAM, GTX 970 3584 MB VRAM
 
DoctorOfSpaceDate: Thursday, 27.09.2012, 04:24 | Message # 11
Galaxy Architect
Group: Global Moderators
Pirate
Messages: 3599
Status: Offline
Is it possible to place a station into an orbit around a planet? I set one up but when I set the time on a new launch the planet goes to where it should be but the station stays in its current position.




Intel Core i7-5820K 4.2GHz 6-Core Processor
G.Skill Ripjaws V Series 32GB (4 x 8GB) DDR4-2400 Memory
EVGA GTX 980 Ti SC 6GB
 
HarbingerDawnDate: Thursday, 27.09.2012, 04:50 | Message # 12
Cosmic Curator
Group: Administrators
United States
Messages: 8714
Status: Offline
Quote (DoctorOfSpace)
Is it possible to place a station into an orbit around a planet?

This is something I would like to know as well; is there a way to use spacecraft models "Celestia style", with specified orbits and physics disabled? If not, might this be something that could be added in the future?





All forum users, please read this!
My SE mods and addons
Phenom II X6 1090T 3.2 GHz, 16 GB DDR3 RAM, GTX 970 3584 MB VRAM
 
Antza2Date: Thursday, 27.09.2012, 18:32 | Message # 13
World Builder
Group: Global Moderators
Finland
Messages: 1049
Status: Offline
When SE is finished, I want to import all the ships from Battlestar Galactica, start from Caprica and just pretty much re-act the whole series biggrin




Go to antza2.deviantart.com for cool photos!
 
SolarisDate: Thursday, 27.09.2012, 22:04 | Message # 14
World Builder
Group: Global Moderators
France
Messages: 731
Status: Offline
Quote (Antza2)
I want to import all the ships from Battlestar Galactica, start from Caprica and just pretty much re-act the whole series
Haha, I love that idea ! With the original soundtrack in background, that would be great cool
 
Antza2Date: Thursday, 27.09.2012, 22:06 | Message # 15
World Builder
Group: Global Moderators
Finland
Messages: 1049
Status: Offline
Quote (Solaris)
With the original soundtrack in background, that would be great

Yes! That would be awesome!
I guess it would be possible to create a BsG mod for SE, since the upcoming gameplay seems to fit BsG-Universe pretty well.





Go to antza2.deviantart.com for cool photos!
 
Forum » SpaceEngine » Archive » MOD - Importing space ships 0.96 (How to import space ships models)
Page 1 of 512345»
Search: