Planet landing/flying
-
- ISO Party Member
- Posts: 461
- Joined: Fri Sep 03, 2010 12:10 pm
Planet landing/flying
Hi there, I'm a imformatics student focussed on graphics programming.
My aim is to make planet landing flying in vs come true like in the infinity engine.
I did already some work on freeorion.
but they don't want my ideas.
the steps to realize this are:
1. dl documentation about procedural synthesis (random surface generation) - done.
it seems to be easy to generate surface.
2. compile - done
todo:
3. work into the engine and understand it.
is the engine ogre based?
i did already some work on a program based on that engine.
can you give me a short introduction on which c++ files i have to focus?
realize planet flight:
4. create the random surface.
there is an alogrythm ready for this called midpoint displacement - the meshes will be easily done, but there are more problems:
1. random texture. i'll get docs for this, too. - for the beginning a simple height seperation
will do (ground level: water - blue color, height level 1: sand yellow, medium level: green, top level mountain (grey color))
2. skybox - when you come into the athmosphere the state of the skybox must change depending on the altitude from blue to black.
3. memorize landscape - the system has to save some mb/gb of surface that the player already has visited.
My aim is to make planet landing flying in vs come true like in the infinity engine.
I did already some work on freeorion.
but they don't want my ideas.
the steps to realize this are:
1. dl documentation about procedural synthesis (random surface generation) - done.
it seems to be easy to generate surface.
2. compile - done
todo:
3. work into the engine and understand it.
is the engine ogre based?
i did already some work on a program based on that engine.
can you give me a short introduction on which c++ files i have to focus?
realize planet flight:
4. create the random surface.
there is an alogrythm ready for this called midpoint displacement - the meshes will be easily done, but there are more problems:
1. random texture. i'll get docs for this, too. - for the beginning a simple height seperation
will do (ground level: water - blue color, height level 1: sand yellow, medium level: green, top level mountain (grey color))
2. skybox - when you come into the athmosphere the state of the skybox must change depending on the altitude from blue to black.
3. memorize landscape - the system has to save some mb/gb of surface that the player already has visited.
plz visit my vegastrike project branch here
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Planet landing/flying
I wouldn't consider that as an option. VS has thousands of systems with several planets each. Just a few mb each and it amounts to way too much.strook wrote:3. memorize landscape - the system has to save some mb/gb of surface that the player already has visited.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Planet landing/flying
Nope.strook wrote: 3. work into the engine and understand it.
is the engine ogre based?
There were attempts at replacing the rendering engine with Ogre, that weren't ever finished.
All graphics stuff is spread around, but mostly located in src/gldrv and src/gfxstrook wrote:can you give me a short introduction on which c++ files i have to focus?
Do you have a more detailled plan?
-
- ISO Party Member
- Posts: 461
- Joined: Fri Sep 03, 2010 12:10 pm
Re: Planet landing/flying
after reviewing some code, the engine seems to be similar coded like ogre.
i'll modify test.cpp at first to give out a example landscape.
in the moment i have problems in debugging it cause i don't have .wav codecs on my system.
and it won't compile with sound turned off.
i'll modify test.cpp at first to give out a example landscape.
in the moment i have problems in debugging it cause i don't have .wav codecs on my system.
and it won't compile with sound turned off.
plz visit my vegastrike project branch here
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
-
- ISO Party Member
- Posts: 461
- Joined: Fri Sep 03, 2010 12:10 pm
Re: Planet landing/flying
I have found out, that the mesh of a planet in planet.cpp
(class)
is created with
in sphere_generic.cpp.
this class has 2 functions
and
i can replace the polygon structure with
and
which is extracted by
and modified by this alogrithm
http://freespace.virgin.net/hugo.elias/ ... landsp.htm
(class
Code: Select all
GamePlanet
is created with
Code: Select all
new GFXSphereVertexList
this class has 2 functions
Code: Select all
BeginMutate
Code: Select all
EndMutate
Code: Select all
int GFXCreateList()
Code: Select all
GFXBOOL GFXEndList()
Code: Select all
glGet(...)
http://freespace.virgin.net/hugo.elias/ ... landsp.htm
plz visit my vegastrike project branch here
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
-
- ISO Party Member
- Posts: 461
- Joined: Fri Sep 03, 2010 12:10 pm
Re: Planet landing/flying
I have written some code,
could you tell me, why i get here a segmentation faultin my code?
the segmentation fault happens exactly here in your code after calling that EndMutate func:
could you tell me, why i get here a segmentation faultin my code?
Code: Select all
void GFXSphereVertexList::ProceduralModification()
{
//read vertices
GFXVertexList::VDAT* read_list = sphere->Map( true, false );
GFXVertex* pv = NULL;
int numPolys = 0;
int numTris = 0;
GetPolys( &pv, &numPolys, &numTris );
sphere->EndMutate( sizeof(GFXVertexList::VDAT) * numVertices );
//modify them
//write vertices
GFXVertexList::VDAT* write_list = sphere->BeginMutate( 0 );
for(int i=0; i<numPolys;i++) {
// Vector vert(rand(),rand(),rand());
Vector vert(100+i,100+i,100);
(pv+i)->SetVertex( vert );
}
write_list->vertices = pv;
--> sphere->EndMutate( sizeof(GFXVertexList::VDAT) * numVertices );
}
the segmentation fault happens exactly here in your code after calling that EndMutate func:
Code: Select all
void GFXVertexList::RefreshDisplayList( )
{
#ifndef NO_VBO_SUPPORT
if (game_options.vbo && !vbo_data) {
if (glGenBuffersARB_p == 0 || glBindBufferARB_p == 0 || glBufferDataARB_p == 0 || glMapBufferARB_p == 0
|| glUnmapBufferARB_p == 0) {
game_options.vbo = 0;
} else {
(*glGenBuffersARB_p)(1, (GLuint*) &vbo_data);
if (changed&HAS_INDEX)
(*glGenBuffersARB_p)(1, (GLuint*) &display_list);
}
}
if (vbo_data) {
BindBuf( vbo_data );
--> (*glBufferDataARB_p)(GL_ARRAY_BUFFER_ARB, numVertices
*( (changed&HAS_COLOR) ? sizeof (GFXColorVertex) : sizeof (GFXVertex) ), data.vertices,
(changed&CHANGE_MUTABLE) ? GL_DYNAMIC_DRAW_ARB : GL_STATIC_DRAW_ARB);
....
plz visit my vegastrike project branch here
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Planet landing/flying
I have no idea.strook wrote:I have written some code,
could you tell me, why i get here a segmentation faultin my code?
Did you try debugging it?
-
- ISO Party Member
- Posts: 461
- Joined: Fri Sep 03, 2010 12:10 pm
Re: Planet landing/flying
i access invalid memory.
the only reason for this can be that you must preallocate the memory
to where the polygon data is written from getPoly.
tomorrow ill go on coding. if i could compile it on my mac i could spend
more time for this project, but the mac g++ compiler is buggy on my intel
mac.
any ideas what i should do - maybe install linux gcc with macports or fink?
the only reason for this can be that you must preallocate the memory
to where the polygon data is written from getPoly.
tomorrow ill go on coding. if i could compile it on my mac i could spend
more time for this project, but the mac g++ compiler is buggy on my intel
mac.
any ideas what i should do - maybe install linux gcc with macports or fink?
plz visit my vegastrike project branch here
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed