troubles adding custom ships

I have made two models which I like to load in Empty Epsilon, but I run into some troubles. As I am not really a programmer myself, at this point I cannot distinguish whether the problem is my model or my effort in loading it.

So far this is what I have done:
I created the model, texture etc.
I followed the steps on the Github wiki regarding the 'adding 3D models' and 'creating ship templates'.
So far so good, everything seems fine: I can setup a game, add the ships as a game master, interact with it.
The only thing that is not working is the 3D model in the main screen.

Now here is the thing: I can look up my ship in the science database and there it seems to work okay-ish: the size of the ship is bad and the camera position is bad and not the entire ship will show, but enough to see that the ship model and texture will load.

The second thing: when I turn the cinematic camera view in just the right angle, suddenly my ship loads, but when the camera turns a little further, the ship disappears again.

I tried to make a screenshots of these occasions, but that didn't work so far. (Only got a shot of the main screen.)

can somebody explain what I am missing or help to find the problem?


the code I used:
model_data.lua:
model = ModelData()model:setName("A-Station")model:setMesh("Space_Station_1.obj")model:setTexture("Space_Station_1.png")model:setScale(2)model:setRadius(30)model = ModelData()model:setName("AAA")model:setMesh("AAA.obj")model:setTexture("AAA.png")model:setScale(2)model = ModelData()model:setName("BBB")model:setMesh("BBB.obj")model:setTexture("BBB.png")model:setScale(2)model = ModelData()

shipTemplates.lua
--[[
Base of the ship templates, from here different classes of ships are included to be used within the game.
Each sub-file defines it's own set of ship classes.

These are:
* Stations: For different kinds of space stations, from tiny to huge.
* Starfighters: Smallest ships in the game.
* Frigates: Medium sized ships. Operate on a small crew.
* Covette: Large, slower, less maneuverable ships.
* Dreadnaught: Huge things. Everything in here is really really big, and generally really really deadly.

Player ships are in general large frigates to small corvette class
--]]

require("shipTemplates_Stations.lua")
---[[Until these are ready, they are disabled
require("shipTemplates_StarFighters.lua")
require("shipTemplates_Frigates.lua")
require("shipTemplates_Corvette.lua")
require("shipTemplates_Dreadnaught.lua")
--]]
--For now, we add our old ship templates as well. These should be removed at some point.require("shipTemplates_OLD.lua")
require("shipTemplates_AAA.lua")require("shipTemplates_A-station.lua")require("shipTemplates_BBB.lua")

shipTemplates_AAA.lua
template = ShipTemplate():setName("AAA"):setClass("Starfighter", "bomber"):setModel("AAA")template:setRadarTrace("radar_cruiser.png")
template:setHull(100)
template:setShields(200, 200, 200, 200)
template:setSpeed(30, 3.5, 5)

Comments

  • Now here is the thing: I can look up my ship in the science database and there it seems to work okay-ish: the size of the ship is bad and the camera position is bad and not the entire ship will show, but enough to see that the ship model and texture will load.
    That generally indicates that there is a scale/radius mismatch. Could also explain the issues with rendering on the main screen. Try setting the radius higher or the scale lower.
  • Yes, tweaking the scale and radius did the trick for the ship. Thank you.

    Is there a guideline for the scale/radius match, or is just playing around till it works?

    For the space station, I haven't be able to make it work yet though. When I handle the model as a ship it works, but when I handle the model as a station it won't, even with the same scale and radius when I handle the model as a ship.

    In the database, the model also still is not showing properly. Do I need to play around with the model renderoffset or something?

    And another question: Is there a handy way of making screen shots?
  • The radius defines the "size" of the ship in space. So that effects how close ships can get to each other and from how far the database is viewing the ship.

    While the scale is a simple scaling done on the 3D model before rendering. Same for the offset. Both only effect how the 3D model is displayed, and both could be done in 3D editing software as well.
Sign In or Register to comment.