Page 1 of 7

Pioneer City Buildings Modeling

Posted: Thu Sep 15, 2011 11:59 am
by Vlastan
Hi there, i love pioneer and i was following it's development for almost like a year now. I like playing videogames but i am also a 3d artist. I use 3dsmax for modeling and animation.So i decided to try on contributing to the project by creating some 3d assets...Right now i am modeling some buildings for the city; i don't now about lua and things like that, so i will need someone to effectively implement my models into the original game. I can upload the 3dmodels in various fourmats (like obj).Btw, here's what i've done today:

RE: Pioneer City Buildings Modeling

Posted: Thu Sep 15, 2011 12:18 pm
by s2odan
Very nice indeed :)If you want to make a .lua from them then you need some various LOD models. High LOD, medium down to low, and a very very simple collision mesh.

RE: Pioneer City Buildings Modeling

Posted: Thu Sep 15, 2011 12:55 pm
by Subzeroplainzero
wow, they look amazing! Be careful with those polys though.. As s2odan says, some lower lod variants would help those of us with turdy puters.

RE: Pioneer City Buildings Modeling

Posted: Thu Sep 15, 2011 1:07 pm
by Vlastan

Subzeroplainzero wrote:
wow, they look amazing! Be careful with those polys though.. As s2odan says, some lower lod variants would help those of us with turdy puters.
I am trying to keep the polycount as low as possible... but i will make lod variants for the most complex buildings tough ;)

RE: Pioneer City Buildings Modeling

Posted: Thu Sep 15, 2011 2:56 pm
by Vlastan
Here's my latest progress:Now, before i continue the modeling, i'd like to test the models in engine just to see if there are errors or glitches.So, anyone can help me doing that ? Should i use the model viewer?Here is the OBJ file of one of the skyscrapers, with texture included.[url]http://dl.dropbox.com/u/9418121/Building1.rar[/url]

RE: Pioneer City Buildings Modeling

Posted: Thu Sep 15, 2011 3:24 pm
by CreepyStepdad
Can't help you with testing, but those models look sweet! I look forward to someday seeing them in-game.

RE: Pioneer City Buildings Modeling

Posted: Thu Sep 15, 2011 5:02 pm
by Subzeroplainzero
I wish I could help, but I don't have a clue how to do that stuff. Good luck though.. I haven't really played pioneer much in months but I think I could back into it once these are in there :)

RE: Pioneer City Buildings Modeling

Posted: Thu Sep 15, 2011 5:18 pm
by s2odan
Hey try this out:

Code:
define_model('newbuilding', {info = {scale = 1, --if your model is not built to scale, increase this numberbounding_radius = 15, --is the radius of the model, it must include the entire model, the number used is the size of the model before scale is appliedlod_pixels = {.1, 20, 120, 130}, --settings for Level of detailmaterials = {'wall', 'roof'}, --materials/colours/specularstags = {'city_building'}, --what this actually is},static = function(lod)if lod > 1 thenset_material('wall', 1,1,1,1,.3,.3,.3,5) --white?set_material('roof', .2,.2,.3,.9,.7,.8,1,50) --grey?texture('newbuilding.png') --your textureif lod > 3 thenuse_material('wall')load_obj('newbuildingHQ.obj') --High quality model hereelseif lod > 2 thenuse_material('wall')load_obj('newbuildingMQ.obj') -- Medium quality model hereelseuse_material('wall')load_obj('newbuildingLQ.obj') -- Low quality model hereendelseload_obj('newbuildingCOLL.obj') -- very simple box/collison model hereendend})
Hope it helps ;) Just ask if any of that doesn't make sense.

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 8:00 am
by Luomu
You should take lods into account from the start, it's just not sensible to use a full detail model when all you see is a dot. Pioneer supports four levels of detail. The lowest one is also used as the collision mesh.You'll need to export your models as .obj files and then create a .lua file to define how the models are used.We have some docs:http://pioneerspacesim.net/wiki/index.php?title=3D_Modellinghttp://pioneerspacesim.net/wiki/index.php?title=From_Blender_to_PioneerUsing something else than Blender? I could probably find out export settings for 3ds max at least...
s2odan wrote:
Hey try this out:

Code:
define_model('newbuilding', {info = {scale = 1, --if your model is not built to scale, increase this numberbounding_radius = 15, --is the radius of the model, it must include the entire model, the number used is the size of the model before scale is appliedlod_pixels = {.1, 20, 120, 130}, --settings for Level of detailmaterials = {'wall', 'roof'}, --materials/colours/specularstags = {'city_building'}, --what this actually is},static = function(lod)if lod > 1 thenset_material('wall', 1,1,1,1,.3,.3,.3,5) --white?set_material('roof', .2,.2,.3,.9,.7,.8,1,50) --grey?texture('newbuilding.png') --your textureif lod > 3 thenuse_material('wall')load_obj('newbuildingHQ.obj') --High quality model hereelseif lod > 2 thenuse_material('wall')load_obj('newbuildingMQ.obj') -- Medium quality model hereelseuse_material('wall')load_obj('newbuildingLQ.obj') -- Low quality model hereendelseload_obj('newbuildingCOLL.obj') -- very simple box/collison model hereendend})
Hope it helps ;) Just ask if any of that doesn't make sense.
This looks fine except it hides lod1/collision (by setting the lod pixel size check to <1). There's no need to do this, a simple box is perfectly suitable as the lowest detail level when we are a few hundred km away.

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 9:57 am
by Vlastan
I've tested some models in the model viewer by using the lua example posted by s2odan and they render pretty well, so right now i'm creating the simpler lod meshes for all the buildings.I'll post a new pic soon...

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 10:24 am
by s2odan

Quote:
This looks fine except it hides lod1/collision (by setting the lod pixel size check to <1).
Noted for future reference :) ta.

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 10:36 am
by Vlastan
I created the lod for all the building models:

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 12:48 pm
by Luomu
Quality stuff. You might have to tweak the lod pixel sizes after testing in game, they seem to work a bit differently than in modelviewer (not intentionally...).

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 1:43 pm
by Vlastan
Here's an illustration i did in 3dsmax:Now i'm gonna create the single obj for every mesh. After that i think i'm gonna end the work for now.I will upload the files somewhere, so that they will be ready for whoever will take the job of implementing them ingame.

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 1:49 pm
by s2odan
Very nice indeed. Just the collision mesh to go and a quick alteration of that .lua script, as like Luomu mentioned we can use the collision mesh for really far away, which is great for performance :)
Quote:
Here's an illustration i did in 3dsmax
Oooh you ninjad me.. that looks lovely :)

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 2:02 pm
by Vlastan

s2odan wrote:
Very nice indeed. Just the collision mesh to go and a quick alteration of that .lua script, as like Luomu mentioned we can use the collision mesh for really far away, which is great for performance :)
Quote:
Here's an illustration i did in 3dsmax
Oooh you ninjad me.. that looks lovely :)
Third level of lod should work also as collision mesh, am i right ?

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 3:17 pm
by s2odan
It depends how many faces they have. The idea of the collision mesh is to have as few faces as possible for the physics calculations. It should be a very simplistic shape that resembles the final object. In this case a simple box with a pyramid on top would do all scaled appropriately :)

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 3:27 pm
by Vlastan

s2odan wrote:
It depends how many faces they have. The idea of the collision mesh is to have as few faces as possible for the physics calculations. It should be a very simplistic shape that resembles the final object. In this case a simple box with a pyramid on top would do all scaled appropriately :)
As you can see the third level of Lod is very basic and simple

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 6:55 pm
by Vlastan
They works!Here it is the final pack:http://dl.dropbox.com/u/9418121/NewBuilding.rarThe rar contains a folder with the objs and luas of all the building i've done.I tested them in the model viewer, and they all work correctly. I even tested the lod pixel parameters and i tweakened them for every model.It was a very busy day for me, and now i really looking forward to see my models into the real game :lol: So, i'll wait a bit for someone to actually do that.If this goes well... i might continue with the modeling: there are more things to do! (space stations :o )

RE: Pioneer City Buildings Modeling

Posted: Fri Sep 16, 2011 7:40 pm
by Luomu
They work pretty nicely as it is. I'll tweak the scripts somewhat.