Author Topic: Vegetation Earth map  (Read 67090 times)

Volutar

  • Guest
Re: Vegetation Earth map
« Reply #30 on: July 30, 2012, 03:24:54 pm »
luke83, if there won't be any chances to keep surface groups (tags), we dont need this format. Any mesh editor which can handle obj import/export will be fine with that. Obj format does have grouping, but i havent found nice obj editor which will keep these groups.
And anyway, editing polys near meridian_zero (greenwich) will be quite a pain, and there's no format which can ease this.
Unless we start to export and import globe as projected 3d sphere, not 2d map, and unproject it into world.dat.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Vegetation Earth map
« Reply #31 on: July 30, 2012, 03:27:21 pm »
blender (www.blender.org) appears to be able to load and edit .obj files. I have a little experience with blender... I'll look into it.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Vegetation Earth map
« Reply #32 on: July 30, 2012, 03:39:52 pm »
okay, it loads and displays nicely. apparently the surfaces have been grouped by terrain type... is that intentional? scratch that, of course it is, that's what you were talking about, right? so it appears to work :)

Volutar

  • Guest
Re: Vegetation Earth map
« Reply #33 on: July 30, 2012, 03:56:01 pm »
blender... ehh.. never understood how to start doing something in it... useless buttons and empty screens... not for me :)

moriarty, I'm glad you managed to.. load exported world.dat into blender, right? Can you export same file into obj and send it? I have to compare what I need to change in obj importer.

BTW, I want to implement exporter/importer sphere projected land mesh.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Vegetation Earth map
« Reply #34 on: July 30, 2012, 04:01:02 pm »
with blender it's quite easy to alter the surfaces. I played around a bit and changed the shape of new zealand's northern island, attaching it to australia... now all I need is something to convert it back to globe.dat - volutar? do you have something that does this?

btw, volutar, great job on the terrain editing funtion for your viewer... that's precisely what I thought of. simple select and click-to-change. perfect!


you know what would be nice? the current geoscape globe handling makes a difference between land mass and water by defining land as "there's something" and water as "there's nothing". If we could change that to water being just a different terrain type (or rather, several different water terrain types), we would be one step closer to combining UFO and TFTD... but of course, that's V1.0+ again... although a globe with different ocean zones of different colors would be kind of nice even now.


(Attachment: globe.obj with modifications, just for proof-of-principle)

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Vegetation Earth map
« Reply #35 on: July 30, 2012, 04:07:30 pm »
Volutar, here's the globe.obj file loaded into blender and re-saved. I get two files from that, one .obj and one .mat - I guess the latter contains the material information.

Volutar

  • Guest
Re: Vegetation Earth map
« Reply #36 on: July 30, 2012, 04:10:11 pm »
moriarty, thanks for zipped exported globe.obj.
First. I haven't written obj importer since I didn't know what to import... Every editor have different obj importer/exporter. Blender importer/exporter as I see splits mesh object with number of groups into number of objects without any groups. So I guess I have to write importer, that wouldn't be able to import its own files without blender exporter :)
The thing is.. it alters group names g1->Mesh.006_g1 g2->Mesh.005_g2 g4->Mesh.003_g4.
can you control this or it's something automatic?
I guess it is. Can you modify those object group names?

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Vegetation Earth map
« Reply #37 on: July 30, 2012, 05:48:47 pm »
I don't know if the group names can be changed... maybe they can, but I cannot.  :-\  My experience with blender is somewhat limited, there's a lot of "hidden" features that you can only access with key combinations.

Anybody else on here that knows more about blender? luke, didn't you say you are in contact with somebody using it?
EDIT: I've sent a message to Tentaculars, he appears to know a good deal more about blender than I do :)
« Last Edit: July 30, 2012, 05:52:17 pm by moriarty »

Volutar

  • Guest
Re: Vegetation Earth map
« Reply #38 on: July 30, 2012, 09:22:00 pm »
Latest build is here:
https://volutar.eu5.org/worlddat.zip
Added obj import and it also imports groups as named objects (also tested with original xcom). Mesh names shouldn't be changed. They are decoded as "*gNN" (skips everything before "g" and treats next decimals as surface number).
When obj file is loading - it measures its Y size and uses it for scale factor (i.e. you can scale object - it doesn't actually matter).
Near pole mesh edit still is a pain :).
P.S.: Export also changed - it scales coords with 1/32 in order not to make object too big. And groups replaced with named objects (as blender exports them), so you can import own obj file without blender :)
P.P.S.: Mesh names can be changed (in the hierarchical object list at the right), but they really shouldn't, or they lose their surface link when importing into 'world browser'.
« Last Edit: July 30, 2012, 09:37:54 pm by Volutar »

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: Vegetation Earth map
« Reply #39 on: July 30, 2012, 10:07:48 pm »
Awesome work , now i need to work out blender, such a strange program to learn ;)
« Last Edit: July 30, 2012, 10:10:38 pm by luke83 »

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: Vegetation Earth map
« Reply #40 on: July 30, 2012, 10:42:45 pm »
OK this question will get me screamed at but i will ask anyway , is there any way to modify the world.dat whilst playing? I am thinking changing terrain types due to natural disasters , nuclear explosions or even Alien terrraforming activities, Obviously these are not for a standard Xcom game :P

Offline LCSand

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: Vegetation Earth map
« Reply #41 on: July 30, 2012, 10:54:20 pm »
OK this question will get me screamed at but i will ask anyway , is there any way to modify the world.dat whilst playing?
Not right now. People are just now figuring out how to modify it with external programms, while not running.
It could be added, if you find someone interested in programming it. But that is definetly stuff for after 1.0.

Volutar

  • Guest
Re: Vegetation Earth map
« Reply #42 on: July 30, 2012, 10:55:38 pm »
There's no need of modifying file. You may modify mesh data while game progress. Though if you try to move vertices, you may get very ugly results, like terror mission in the city which happen in the ocean, or ufo landed in the ocean (which normally doesn't happen, though I've seen once). If you want to get terrain change, like getting whole Earth frozen (spreading of ice surface) - that will be piece of cake. The only thing is that you need to save whole earth into savegames too.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Vegetation Earth map
« Reply #43 on: July 30, 2012, 11:51:46 pm »
Luke83: ooh, alien terraforming activities... I like the path this is taking :)

Volutar: awesome. Just one thing: your mousewheel zoom is backwards :) at least, when compared to the way it's used in xcom.
you know, if your viewer now allowed us to move vertices, it would be the perfect world editor. just sayin'  8)

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Vegetation Earth map
« Reply #44 on: July 31, 2012, 12:11:39 am »
Awesome work , now i need to work out blender, such a strange program to learn ;)
It's not a waste of time to know how to work with blender, and if you're good at it, you can start to make 3d models of aliens and ufos and stuff :p