Planetary code

The point of no return for both Ogre ports. Permanent links will be stickied on top with current information of each port (Lua and Python)

Moderators: ghoulsblade2, strook

Re: Planetary code

Postby klauss » Sat Feb 09, 2013 7:52 am

I posted something there, nothing about planets but something else, zero replies. It seems to be a very little publicized part of SF (being SF I thought they'd make some more noise, but nope).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Re: Planetary code

Postby pheonixstorm » Wed Feb 13, 2013 10:09 pm

The help wanted section has a lot of use, but from my experience asking for help with the tools project a lot of the replies went no where. Many of the people who replied didn't really know much C++ or were just learning and didn't want to get into something difficult.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
User avatar
pheonixstorm
Elite
Elite
 
Posts: 1567
Topics: 113
Joined: Tue Jan 26, 2010 2:03 am

Re: Planetary code

Postby Spaceman » Thu Nov 07, 2013 11:42 pm

Has there been any progress recently?
Spaceman
Explorer
Explorer
 
Posts: 11
Topics: 3
Joined: Mon Oct 28, 2013 9:00 pm

Re: Planetary code

Postby pheonixstorm » Sun Nov 17, 2013 7:05 am

Nope. Just myself and klauss doing anything real lately. Mostly we just talk and argue a bit on the direction of VS and never really have enough time or people to get out a lot of our wish list items. The base planetary code is still there but hasn't been touched in a long time. Duess and some of the others contribute from time to time but RL takes its toll on the rolls.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
User avatar
pheonixstorm
Elite
Elite
 
Posts: 1567
Topics: 113
Joined: Tue Jan 26, 2010 2:03 am

Re: Planetary code

Postby klauss » Wed Feb 05, 2014 7:26 pm

I'm going to have some time soon-ishly.

This is worth a separate topic, so I'll link instead ;)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Planetary code

Postby ezee » Mon Apr 07, 2014 11:11 am

I made a test with Terrain and Continuousterrain recently , and have tried to describe the
parts of c++ code that use them , and why they actually don't work :
viewtopic.php?f=56&t=20016&p=136585#p136585

I remember that i have successfully run the experimental ogre planet project for win32 .
Well , not fully because i had the " no base/missile " syndrom that i was unable to identify and solve at this time :
viewtopic.php?f=51&t=19579

Today i think i used a bad data folder , so i will retry the experiment soon , just in case .
And see if the log0 code could be adapted too to the Terrain code in Vegastrike .
( Klauss won't like that ... :lol: )
Because it's not good to have c++ code doing nothing .
(a plan to remove/replace the actual terrain and Continuousterrain from the c++ code could be started , as they seem to be based on a tutorial , and have hard coded Dem data references at the quadtree level , that are irelevant because the Dem datas no more
exists in SVN - and are very hard to find in public/free domain .
So implement these classes with Log0 code could be a way to save them )

:wink:
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE

Re: Planetary code

Postby klauss » Tue Apr 08, 2014 6:13 pm

ezee wrote:And see if the log0 code could be adapted too to the Terrain code in Vegastrike .
( Klauss won't like that ... :lol: )

Actually, I was hoping myself to be able to merge log0's code inside VS (switching the rendering engine to VS's engine), replacing the current terrain code.

If you can do that legwork, I'll be happy to commit.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Planetary code

Postby ezee » Tue Apr 08, 2014 9:49 pm

Actually, I was hoping myself to be able to merge log0's code inside VS (switching the rendering engine to VS's engine), replacing the current terrain code.

Ah ?
It seemed to me that you said all the contrary , wanted to go 100% ogre thing .
But you said " actually ", that prooves that you are a real man and not a bot . :wink:
That's cool ! :D

If you can do that legwork, I'll be happy to commit.


To be true , i don't think i am skilled enough to do that alone .
A good knowledge of opengl is a prerequisite that i don't have , but ok , i am still learning...
Thank you for the proposition , that honnors me , and i hope that someone with better
qualifications will take this challenge before me . :lol:

I have tried yesterday to run the experimental ogre branch for win32 , but i failed to
reproduce the same result than this one , few weeks ago . ( yeah , i had to checkout again , and choose which Base folder use ( the Base in svn/branch/experimental contains only ogre stuff ) . I have tried to use the 0.5.1 rc1 from tag , and the 0.5.1 from branch , but i had a ctd when entering the Universe creation in the main() fonction .
Ogre was well initialized , and the stderr indicated that the failure was on VS side .
Perhaps the 0.5.2 data would work , but i'm low on time now .

I've started a simple ogre project , to test my ideas with the Factions AI .
If i have good results , perhaps i will try to merge some VS stuff ( art for the most part )
and see how things evolve .

Yeah , my new idea is to start from scratch with Ogre , and to pick only the good in VS .
I'm not sure i will bind python , but i think i could reuse XML and .cvs
The experience shows that only ( very ) good python programmers are able to be creative in vegastrike with AI , and they are not a lot ( i'm not a good python programmer too :mrgreen: ) .

The code for seamless planet will be also easier to use in that Ogre3d context .
( the code already exists )
Same for terrain ...
:wink:
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE

Re: Planetary code

Postby klauss » Wed Apr 09, 2014 5:32 pm

Oh, don't even try that.

Vegaogre tried, and it's already semi-abandoned.

Re-doing all of VS is a decade-long proposition for a one-man team doing part-time.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Planetary code

Postby ezee » Wed Apr 09, 2014 7:32 pm

Re-doing all of VS is a decade-long proposition for a one-man team doing part-time.


A reply for fun : i said "Yeah , my new idea is to start from scratch with Ogre , and to pick only the good in VS .
How much is good ?
:lol:

But seriously , things are so intricated in Vegastrike that it would take too much time to
figure out how insert new ideas in a framework that need to be explained and cleaned first . ( separate what is in use and what is waiting to be used )
I really better understand how VS works , at mid-level , the things were i haven't been in
deep are Network and GFX .

For the planetary code , i think it's best to have a previous experience in a working project before attempting to make it in Vegastrike . ( because of the dependency on his particular framework . Log0 work is indeed very interesting , but unfinished and unstable.
Taking weeks to have it working , then being stuck because of an other VS restriction would be sad )

Rewrite Vegastrike in a robust game engine is a solution not so crazy , if there are solutions to all VS specific dependencies .
The main problem i see is for the mesh models , that are GFX specific and are kindof lost
outside of VS environment .

If there were a lot of artists that actively works in producing blends ( assuming blender is
our favorite 3d producer of content ) , i think that would be stupid to not try to port VS
game engine to Ogre . But i'm here for weeks , and i know that we are not enough to make the deal .

Anyway , i will continue to help and support artists and coders for Vegastrike where i can , and do my experimentations with Ogre .
Perhaps later my experience with Ogre3d will serve the Vegastrike project .
:)
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE

Re: Planetary code

Postby klauss » Wed Apr 09, 2014 11:08 pm

ezee wrote:Rewrite Vegastrike in a robust game engine is a solution not so crazy , if there are solutions to all VS specific dependencies .
The main problem i see is for the mesh models , that are GFX specific and are kindof lost
outside of VS environment .

Oh, they're not.

You can convert them to .obj with mesher, or if you build against an old version of Ogre, to Ogre .mesh
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Planetary code

Postby ezee » Fri Apr 11, 2014 11:47 am

You can convert them to .obj with mesher,

I have tried it weeks ago , without success .
If you are sure mesher is working and you know exactly how to use it , i suggest to ya :

_ As SVN Admin , create in the Masters branch a folder with all the .obj you can .
This way , any artist that want to improve the mesh detail/texture/anim/mountpoints etc ...
will have the opportunity to work directly with the mesh ( by importing .obj ) without touching a line of code or trying to figure out how the hell is possible .
:lol:

_ Improve mesher to give him auto conversion for all units in the game .
( better option because once this done , you will never have to do it again manually )

I hope you will do something in that level ( make the .obj for the artists ).
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE

Re: Planetary code

Postby TBeholder » Fri Apr 11, 2014 6:21 pm

Uh, normally artists are supposed to work with /masters/... rather than with second-hand coversions. It's a workflow problem, again.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
User avatar
TBeholder
Elite Venturer
Elite Venturer
 
Posts: 750
Topics: 38
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Planetary code

Postby klauss » Fri Apr 11, 2014 7:25 pm

Yes, I'd rather not add to masters things that aren't really masters.

That said, if you want a specific mesh converted I can send it your way (along with a description of how I made the conversion, so perhaps next time it'll work for you)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Planetary code

Postby ezee » Fri Apr 11, 2014 8:28 pm

Oh man , we are in the same frequency now .
You used the words i hesitate to say .

Yeah , i need to know how to use Mesher to obtain a llama.obj .
I have tried the command line args following the help of the program , but failed each time
i used it .

If i knew how to efficiently use mesher , i could make the harassing job of converting each
vessel and stations . ( and probably tweak the mesher project for win32 too)
I really think that simplify the way for the artists is the shortest way
to give more chance to vegastrike to being mature .

Your turn ...
:wink:
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE

Re: Planetary code

Postby klauss » Fri Apr 11, 2014 9:11 pm

Well, the how-to is easy.

First thing to know, is that bfxm can have many meshes inside, not just one, with LOD and animation.

.obj can only handle one component. It can have multiple meshes, but not LODs.

So, when you convert a bfxm into obj, you might get multiple of the same (those are the LODs).

Converting from bfxm to obj is simple:

mesher blabla.bfxm blabla.obj boc

Converting from obj to bfxm is equally simple:

mesher blabla.obj blabla.bfxm obc

The third parameter is the command: first letter is "from" format, second letter is "to" format, and third letter is "action" (which can be "c" - create, or "a" - add).

mesher --help will print out a lot of stuff, mainly used for more advanced editing.

The real trick, goes in how to handle the .mtl file prior to making the bfxm. Because blender's output is quite useless.

I think the best you can do here, is read the .mtl generated by mesher, and you'll get a good idea of how it works. In essence, map_<something> specifies a kind of texture. map_kd being diffuse, map_ke glow, map_normal obviously the normal map, etc... (don't remember them all)

And of course, the other real trick is making LODs. You cannot do that with obj, you need xmesh. For lods, convert each LOD to xmesh individually like:

mesher lod1.obj lod1.xmesh oxc
mesher lod2.obj lod2.xmesh oxc
mesher lod3.obj lod3.xmesh oxc

Then, you'll have to edit lod1.xmesh and add the references to the other lods. I don't really remember the details, but there's some examples somewhere (I think wiki?)

Then, you build the bfxm.

mesher lod1.xmesh something.bfxm xbc

Mesher will automatically add the lods from the other .xmesh.

If the .obj have multiple meshes, there will be multiple .xmesh, it gets more complicated, because mesher automatically names them 0_0, 0_1, etc... so beware not to step on existing files (rename them prior to converting the next).

And now my first sentence is ridiculous. Simple my ass. Yeah, we really need some python script to make all this easier :)

Of coursem, take all this with a grain of salt, I'm doing this from memory (I don't really know if everything is accurate).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Planetary code

Postby ezee » Fri Apr 11, 2014 10:21 pm

ah ah ah Thank you for the effort .
:wink:
Please try to obtain a .obj from your favorite ship .
Then give me a link to it .
If you can't produce for us a .obj , no one else can .
So be the first , please ?
:wink:

When we 'll all know by the proof that this is possible , nothing will stay impossible .
Because now , there is a mountain on the road ...
:roll:

Salt you said ? I live in a city that produce mountains of it .
Image
For the little story , we have pink flamingo here too .
And mosquitos .
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE

Re: Planetary code

Postby Deus Siddis » Fri Apr 11, 2014 11:58 pm

klauss wrote:And now my first sentence is ridiculous. Simple my ass. Yeah, we really need some python script to make all this easier :)


We had one, Unit Converter, but it was buggy and has not been updated in many years.

What would really rock is using a common 3D standard that already has a well maintained exporter script directly out of blender. I have/had hope collada would become this, but ogre's formats might be more realistic. The latter is what jMonkeyEngine uses as well.

ezee wrote:Please try to obtain a .obj from your favorite ship .
Then give me a link to it .
If you can't produce for us a .obj , no one else can .
So be the first , please ?


Actually he wouldn't be the first as many have done these conversions before and in both directions. It is not too difficult or time consuming; I converted every ship in the game into obj (to bring them into blender for scale reference). Getting things into the game format correctly is a bit more difficult but not greatly so.
Deus Siddis
Elite
Elite
 
Posts: 1362
Topics: 13
Joined: Sat Aug 04, 2007 3:42 pm

Re: Planetary code

Postby klauss » Sat Apr 12, 2014 1:15 am

Deus Siddis wrote:
klauss wrote:And now my first sentence is ridiculous. Simple my ass. Yeah, we really need some python script to make all this easier :)


We had one, Unit Converter, but it was buggy and has not been updated in many years.


Last I checked, Unit Converter didn't support LODs and all the really complicated things... did it?
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Planetary code

Postby Deus Siddis » Sat Apr 12, 2014 4:19 am

I recall it having support for some advanced features but others were either broken or to-be-implemented. I am foggy on the specifics since this was circa six years ago.
Deus Siddis
Elite
Elite
 
Posts: 1362
Topics: 13
Joined: Sat Aug 04, 2007 3:42 pm

Re: Planetary code

Postby ezee » Sat Apr 12, 2014 11:42 am

(to bring them into blender for scale reference)

Exactly !

So you say that make a .obj is easy ...
Ok.
Do you use Mesher in place and give the paths to the bxfm files ?
Or copy mesher in the folder containing the bxfm ?
Because the paths could be long ya know .

For now , i don't care about getting back to VS the .obj , but i understand that this will be tricky .
As i'm working with ogre3d now , i want to test some features like bone and shape animations
( landing gear , orientable thrusters etc ... ) with original VS models .
To prepare landings in terrain , real docking with stations etc ...

An other use of the .obj could be to make 3D cockpits based on the actual meshs .
Or just 3d cockpits rendered in 2d .

But back to planetary code , everything seem to be more simple with Ogre3D , as it is something
that a lot of people have already done ( and a lot of examples of code are published , from transform a cube quadtree to sphere , to shaders for the atmosphere .)

I know all the python code seems to be lost in that case , but it's not .
Same procedures could be duplicated or rearranged .

The Network part is to be reinvented also , to introduce AI and NPC server side .

Having a planetary code should mean also ways to populate it with buildings etc ...
( find flat zones for build citys , mines etc... )
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE

Re: Planetary code

Postby TBeholder » Sat Apr 12, 2014 12:44 pm

ezee wrote:Having a planetary code should mean also ways to populate it with buildings etc ...
( find flat zones for build citys , mines etc... )
...ground defense stations, interceptor garrisons...
Actualy, there's already some code supposed to generate subunits for planets.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
User avatar
TBeholder
Elite Venturer
Elite Venturer
 
Posts: 750
Topics: 38
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Planetary code

Postby ezee » Sat Apr 12, 2014 1:38 pm

Interesting , thank you TBeHolder .
I will have a look to that , even if that was designed to work with terrain i guess .
Perhaps could be derived to something allowing big ground dca to shoot hostile vessels in low orbit ?
In the actual planet system i mean .

And i could try to reuse this Planet class with my ogre3d app , to start to work with the same XML scheme .

I go check that AI turret for planets now .
:wink:

Edit : I have a good graph showing how complex is the Unit class inheritance today :
Image

and the code for Ai turrets called in the planet's constructor is here :
http://spacetechs.free.fr/VEGASTRIKEDEV ... tml#l02079

In my 0.5.1 rc1 vegaconfig.xml , the physics section don't contains the required field
to have AI turret enabled :
static bool smartplanets = XMLSupport::parse_bool( vs_config->getVariable( "physics", "planets_can_have_subunits", "false" ) );


As it is initialized to false if the entry is not in the config , that mean we have to add
this line prior to test AI turrets in planets :
<var name="planets_can_have_subunits" value="true"/><!-- added by ezee to test AI turrets in planets -->


I guess that is not enough , but i will try that ( must be enabled in a hostile planet ? )
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE

Re: Planetary code

Postby Deus Siddis » Sat Apr 12, 2014 5:15 pm

ezee wrote:So you say that make a .obj is easy ...
Ok.
Do you use Mesher in place and give the paths to the bxfm files ?
Or copy mesher in the folder containing the bxfm ?
Because the paths could be long ya know .


You cannot move mesher because it has dependencies, if I recall correctly.

But you can and should copy the bfxm and move it to mesher. Much faster than typing and mistyping long paths into a command line program.
Deus Siddis
Elite
Elite
 
Posts: 1362
Topics: 13
Joined: Sat Aug 04, 2007 3:42 pm

Re: Planetary code

Postby ezee » Sat Apr 12, 2014 6:29 pm

Thank you for this tip .
But i have already tried that ( at my first attempt :wink: ) , with the llama , without success.
Since ya say it's working like that , i will retry .
( but there will be a lot of files in the data folder , that's not my favorite method )

Edit : I just tried with the ancestor and a aera turret , but mesher crashed with an unhandled exception .
Files of 0 ko are created ...
:roll:

vega strike ... on my nerves :lol:
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE


PreviousNext

Return to Vega Ogre Port

Who is online

Users browsing this forum: No registered users and 1 guest