pioneerspacesim / pioneer

A game of lonely space adventure
https://pioneerspacesim.net
1.6k stars 362 forks source link

More ships & space stations #501

Closed richardpl closed 11 years ago

richardpl commented 12 years ago

Come on where is Saker MK 3 ...

Some ideas: http://wiki.alioth.net/index.php/FFE_Ships http://wiki.alioth.net/index.php/FE2_Ships http://wiki.alioth.net/index.php/Oolite_Stations

Brianetta commented 12 years ago

I don't think there's anybody on the dev team who likes the Saker III.

Personally, I'm waiting for somebody with a lot of patience to make me an Eagle Transporter. I'd settle for an Apollo capsule, though - which would be a top candidate for a "can't land this ship" ship.

Brianetta commented 12 years ago

Incidentally, the tail pipes of an Eagle are already in the game, if you know where to look!

vlastan commented 12 years ago

I recently started on contributing the project by doing some citybuilding models. I might end up creating some space stations one day and who knows... maybe some ships.

stringue commented 12 years ago

Hi, I was directed here by s2odan,

I felt like making some 3d ships as a possible contribution to this game and also just to practice 3d modelling, my first is the "turtle" fighter, it is influenced by the 3d thruster placement of exo atmospheric ballistic missile interceptors and a fairly simple shape for starters.

There are some screenshots here,

http://img855.imageshack.us/img855/8836/65061898.jpg http://img26.imageshack.us/img26/986/79160818.jpg

And the file here;

https://rapidshare.com/files/644823257/turtle.7z

It has a lod 1 mesh and lod 2 mesh + texture, it also has 17 variations of camoflage which currently requires renaming the files as I couldnt get it to autoswitch randomly, it is set with a green one but there are many many more to look at, the various colors change its appearance quite a bit.

The ship is a military type manned space fighter with high 3d acceleration ability and small size, there are a bunch of other comments in the lua of that nature, though the lua has a 30g ability empty I thought a high g fighter could be nerfed with reduced fuel efficiencies ala afterburners etc though this I realise this isnt present in the game.

My second ship was a step up for me with a more complex shape, it is a civilian style space liner with a large high lift cough subsonic /cough delta wing based on the walrus planform and design ideas from fa-18 reversed lerxes to rc glider dihedral and a 767 fore fuselage & cross section.

It has a very tame lua acceleration setting for relaxing tours and charter flight (more relaxing if there is a basic lift model in future?), I realise the large wing may be offputing but I think it looks quite graceful,

http://img851.imageshack.us/img851/4439/55112600.png http://img580.imageshack.us/img580/2971/53256082.png http://img708.imageshack.us/img708/659/13929556.png

It has 4 liveries fairly crudely [ship] repeated in the lua to brute force what I tried to get at with the turtle, the file is here though this is missing the lod 2 texture set.

https://rapidshare.com/files/2614413530/OSL868.7z

My third ship was an attempt to more closely adhere to edge loop geometry which I have seen in other 3d models, it is a hypersonic fighter based loosely on the blackswift project, it is an edge of space fighter with air breathing ability and influenced (a little!) by some of the current hypersonic designs floating around the internet.

There are pics here;

http://img585.imageshack.us/img585/9608/49054616.jpg http://img12.imageshack.us/img12/3520/38927503.jpg http://img402.imageshack.us/img402/899/27580864.jpg http://img35.imageshack.us/img35/4876/45643245.jpg

And the file here;

https://rapidshare.com/files/3391564065/wave.7z

It has lod 1 mesh and lod 2 mesh +texture, a single big 4096 texture for the main model and a 512 for the lod 2, it has 1 liverie though it would be pretty simple to make some more.

I have extracted them to the mods folder to get them to work, use them all if you like or get back to me if there are problems with them. The wave fighter is my latest one and probably the one I am most happy with as it has just the 1 texture block and was fairly easy to hack out the edge loops (sniff) to make the lower lod mesh.

richardpl commented 12 years ago

Note, pioneer use mipmapping now so there should be only one texture for all lods. (lod 1 should not have texture at all) You do not need to reupload files just note this for future.

richardpl commented 12 years ago

Your turtle ship use mtl instructions making it impossible to manipulate in lua.

lod3 should use one single external texture and not mtl stuff - there is no texture for lod3 lod2 texture is useless for lod3, making single texture which will work for both lod2 and lod3 is solution.

stringue commented 12 years ago

I will look into making the turtle have 1 texture for the ship similar to wave,

Thankyou richardpl for the instructions regarding lods I will incorporate that into future attempts to make more ships.

I have currently been working on another ship, a medium (imo) size corvette called hammer, here is a single screen shot;

http://img31.imageshack.us/img31/7536/66587371.jpg

I will likely change the wing color atm to match the dorsal surface.

It is a 180m * 180m footprint size corvette, with 2 large lateral missile bays and a single large fore weapon bay, large rear thrusters and med size lateral thrusters, x shape wings, and armored top and bottom protecting a "populated" recessed side similar to turtle (not shown here).

I have a problem getting it into the game though so was wondering if any1 can help,

I can export it from wings to wavefront obj and get the model into game but the textures are messed up where normals change "significantly", I have had this problem from day1 with all my models so far and have solved it by exporting as 3ds into blender and then exporting into obj from blender (I presume the wings obj exporter has messed up uv coords though this is just based on my own experiences).

This has worked fine with the previous 3 ships but with this one when I try to load the game I get a ....

"Assertion failed!

Program: ... File: BufferObject.h Line: 31

Expression: GetVertexSpaceLeft() > = numVertices

For information on how you program can cause.........(snip)

This error pops up at 4.5 billion years ( aprox precambrian), I get no error from wings obj export of this model but I cannot for the life of me get wings to export the textures in .obj ok (despite much googling), I have also tried many combinations of the blender .obj export dialogue (inc the ones listed on this site which I have used for prev models) to no avail.

The blender exported obj appears ok in "3d model viewer" a freeware obj viewer, and I have used the same settings as prev models its just this 1 wont work.

Any ideas? I was tempted to start hacking out edge loops and other detail from the mesh as it is quite hefty at 16,000 polygons but I will wait a bit to see if you have any ideas, thankyou!

I also posted the wave fighter with gear and sliding wells on the other thread, also is there also a cap on polygons for models and also a cap on texture size? is a single 4096 texture block ok? Or should I make them smaller?

Luomu commented 12 years ago

Program: ... File: BufferObject.h Line: 31 Expression: GetVertexSpaceLeft() > = numVertices

There is a defined 65536 vertex limit per VBO... so I guess we do have some established limits. But you shouldn't be hitting this limit yet I think. Maybe there is duplicate geometry or something, you can always post the .blend file so we can have a look.

is a single 4096 texture block ok? Or should I make them smaller?

That sounds a bit much :) Try 2048 or even better, 1024. You can always work in higher res and downscale when publishing...

richardpl commented 12 years ago

stringue, did you tried to flip vertically your texture for ship in gimp.

About normals, I'm working on another ship and it have very strange wings so part of them are transparent in pioneer/modelviewer will try to export it to obj without normals so it may fix issue.

Edit: transparency was due normals facing wrong direction, there is nice feature in blender that you can make normals very big ...

How are you unwrapping your model?

stringue commented 12 years ago

Hey thanks for replies, yeah I have been flipping the textures vertically to get them to show properly after blender obj export. I am sorry but I dont understand unwrapping completely, if I understand that term as UV mapping I am projecting the normals along x y and z axis onto textures it seems to give reasonable results when viewed along these axis and less so at odd angles. (I am using uvauto map in wings, it is part of wings and pretty simple so i kinda took to it, i am basically coloring in x/y/z facing sides and projecting them along the respective axis)

The normals feature in blender sounds like something I will have to look at, I am just a wings man atm lol blender scares me with sooo many buttons and things, plus i like the "tactile" feel in wings.

I think it is this model is too big, I got the same result making a 120*120 (divisions) sphere in wings then exporting it to blender via 3ds, which I now realises triangulates the models doubling my quad face count, and to the game via obj export. it caused the same crash on startup, it seems around over 20k triangles causes the crash, in hindsight that number seems pretty big to me (spoilt with an i7) so i will prob just hack away, the wave ship was under 20k tris and the latest corvette has trumped that somewhat, my next ship will definately be an attempt to reign in big numbers in textures and faces :)

I have tried to export to game using quads now which halfs the total poly number (not realising i was triangulating with 3ds export from wings) and the mesh of the model is just fine in game, just the textures, apparently at junctions where edges are sharp (i think), are messed up, though I am sure this is not the texture flipping problem as I have already tried this ( i will try again other combos of mirroring)

So i can export with low poly quads and odd textures, or high poly tris and well the crash. I think this is my fault with too many tris (its a learning experience!) and will get the proverbial scissors out soon, just will be busy for few days so will have to wait.

It just seems a shame I cant use quads without the textures appearing odd, I think I am missing something fundamental about model rendering here, oh also btw I found out that in blender obj export if you do not tick "normals" in export options the .obj file is exported without vn references which I believe are normal vectors for each vertice, if you click "high quality normals" only the file is still built without them, this was something I came across and have yet to "explore" how it affects the game and how the ships look.

richardpl commented 12 years ago

If you do not export normals from blender they will be recalculated from pioneer - i always exports normals. In blender I have pioneer preset for exporting objs and "triangulate" is enabled. If you do not triangulate than probbably pioneer will do this on its own, and this may mess textures.

For UV stuff: In blender there is "smart uv project" but usually i just select part of mesh and do not use uv project on whole mesh - because this pointed to be hard to texture in gimp.) Blender supports loading images on top of UVs and you can see textured ship in real time, and you can edit/export UV layout and etc.... I'm blender fan from very earlier ages but started to use it extensively just recently.

stringue commented 12 years ago

I trimmed the model of the "hammer" corvette down from 16k to 10.5k quads and + exporting as triangulated from blender it works fine, thankyou all for replies.

For consideration;

Hammer class corvette; Medium size atm capable warship with large fore weapon bay and large missile bays, good size/armor/fore accel, slow attitude change rate/exposed engines, single weapon bay.

https://rapidshare.com/files/2992853920/hammer.7z

http://img827.imageshack.us/img827/1074/screenshot2011101516475.png http://img835.imageshack.us/img835/8614/screenshot2011101516473.png http://img9.imageshack.us/img9/9141/screenshot2011101516481.png http://img502.imageshack.us/img502/6799/screenshot2011101516482.png http://img263.imageshack.us/img263/9066/screenshot2011101516480.png

I will prob have a go at either simplifying texture layout of the turtle next or another ship of much smaller mesh and texture size, thankyou for your perusing time!

btw. would there be any chance of game incorporation of a model with lots of struts and "space only" design, like girders and modules (maybe a little more hitech than iss but that kind of thinking), something that looks like it would crack in two if placed on the surface of a gravity well basically ?

richardpl commented 12 years ago

No need to simplify texture layout of turtle I handled that on my own - there is option in blender to separate mesh depending on material so turtle is already in pull queue - probably only need polishing materials so different parts of turtle are not of same material for lod higher that 2 - to have different diffuse and shiness. It is big ~50 MB so elders may not merge it for whatever reason, I do not care because I maintain ships in my own branch.

For future reference if you use multiple materials in you model you must export obj for each mesh that use different material(in your case it was just different texture) because currently pioneer can use multiple texture files defined in obj but can not specifiy multiple materials (use_materials()) for single obj, but just one. Also if single ship provide different set of textures like in case of turtle and OSL it is better to separate mesh that change texture instead of copying indetical >1MB obj just to use different mtl file and provide different look for ships. You can look how i did that in osl868.lua & turtle.lua

If your model is of same material but use multiple textures spread in several files it is better to put all that textures in single png.

richardpl commented 12 years ago

Pioneer currently can display up to 8 missiles on ship so there is no point to define other mount points, but you can still put additional missile locations in comments so if in future this changes it is easier to add new.

richardpl commented 12 years ago

lod1 obj should have really low number of triangles. lod1 of hammer could be lod2, and lod2 lod3 and hammer.obj could then be lod4. It is easy to lower poly number for lod1 with decimate modifier in blender so I will do it.

stringue commented 12 years ago

Awesome thankyou it saves me jobs :) If there is anything I have to do tho pls post or else i will twiddle my thumbs :) I will lower lod1 poly count in any future models, also reg turtle thankyou if you have done this richardpl, if the end result is not accepted due to size i believe i can prob tackle that in future (i am quite fond of turtle), reg multiple materials atm i make a single model, cut away for smaller lod2, make a new ( i thought small :) mesh for lod1, and an obj for glow and an obj for sliding gear wells, i am not planning on any more multiple texture models in future, i have come to prefer a single block for everything (tho this may change as i have noted alpha 15 glowmaps implentation in changelog) ala the more recent wave &hammer.

richardpl commented 12 years ago

And please do not call load_obj() in dynamic function (it is really slow) instead define another model and put load_obj() in static function then from dynamic function use call_model().

richardpl commented 12 years ago

Do not use Matrix.* for gear it force adding models for every frame, instead use simple translation and rotation with call_model()

Luomu commented 11 years ago

Looks like a stalled issue and the contributors are not with us any more.