Page 19 of 21

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 12:02 am
by strook
well after a look on all your pics , there must be another implementation by you.

i think you meant you did the ogre implementation within vs.

did you load in the shaders with ogre techniques?

we could use all ogre extensions then :D

well, ok but can you display vs spaceships, too?

note that you needn't black out the ogre background, so you should be able to display them in the black parts of the sky.

for the ones in the foreground there could be a draw before the planetrendering, after the position of the planet + its radius + the surface height has been substracted from the ships pos.

note that you can compile ogres real numbers with double precision.

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 2:10 am
by pheonixstorm
Shame we can't have soemthing like this without using ogre... http://www.inovaestudios.com/technology.htm

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 4:17 am
by log0
how do you want to integrate it in vs? is there another implementation?
Of course there is. That is why I asked how to proceed!

Creating a branch from the vegaogre trunk is kinda pointless as the implementation is written against vegastrike. Anyway, here is the code+data https://sourceforge.net/projects/vegaogre/files/log0

It will compile and run on Windows and should compile on Linux. The PluginFolder dir in data/ogre/plugins.cfg will have to be adjusted. To test the implementation run "vegastrike modelview.mission" and spec towards "Landing Paradise".

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 9:03 am
by log0
I just went ahead and pushed the code to http://vegaogre.svn.sourceforge.net/vie ... rike_log0/ . I hope that is OK.

Don't forget to add http://sourceforge.net/projects/vegaogr ... z/download to your data and adjust the plugin dir.

Windows dependencies(modified vegastrike-vc9): http://sourceforge.net/projects/vegaogr ... z/download

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 12:23 pm
by strook
just compiled it on linux.

it had a few issues ... fixed.

there is one of that i'm not shure:

when redirecting the gl cotext:

Code: Select all

#else
	misc["currentGLContext"] = Ogre::String("True");
#if 0
	std::string dsp(&(DisplayString(info.info.x11.display)[1]));
	if(dsp == "")
		throw Ogre::Exception(150, "Received Empty X11 Display String!", "createRenderWindow()");
	Ogre::StringVector tokens = Ogre::StringUtil::split(dsp, ".");

	std::string s = Ogre::StringConverter::toString((long)info.info.x11.display);
	if(tokens.size() > 1)
		s += ":" + tokens[1] +":";
	else
		s += ":0:";
	s += Ogre::StringConverter::toString((long)info.info.x11.window);
	misc["parentWindowHandle"] = s;
	misc["externalGLControl"] = Ogre::String("True");
	misc["vsync"] = Ogre::String("No"); // TODO: Need to figure out why I need this under Linux...
#endif
#endif


i got from the ogre page that the line should be enough.

vs is running with modifications.

i assume that if you mean "landing paradise" that it is the level from unit converter.

set unit converter up, but got the old planet, not yours.

could you make a savegame and load it up? pls?

this evening i'll upload the linux version.

but i want to test it prior uploading it.

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 12:36 pm
by log0
i got from the ogre page that the line should be enough.
As long as it does the job. I haven't tested it under linux yet, hehe.
i assume that if you mean "landing paradise" that it is the level from unit converter.
Have you copied the data? It fixes "Landing Paradise" radius and adds an ogre folder with the planet shaders, materials. Run "vegastrike modelview.mission". You should start next to a space station. Toggle through targets(T) there should be a "Landing Paradise" planet a few light-seconds away.
this evening i'll upload the linux version.
Nice :)

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 1:34 pm
by pheonixstorm
If this doesn't use ogre code at all how long do you think it would take to finish this up for inclusion in the main vs code? Even if we have to run the normal vs engine and some terrain engine for this would be fine with me.

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 7:20 pm
by strook
well...

Image

the thing is:
it is not working.

i haven't tested it with windows though,

but execution of the program stops at that pic in the initialisation.

we should use vegaogres 2 threads and go on with that implementation.

i had already an working planet, if your version really works, log0, we could use your version

and migrate both versions together to get an planet.

we would not be far away to get an rocky planet.

my worst problem is that i didn't have synchronized the input yet.

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 10:45 pm
by log0
The problem is that we need a valid window handle. The code below(in vsogre.cpp) from Ogre3D wiki fails.

Code: Select all

	std::string dsp(&(DisplayString(info.info.x11.display)[1]));
	Ogre::StringVector tokens = Ogre::StringUtil::split(dsp, ".");
	std::string s = Ogre::StringConverter::toString((long)info.info.x11.display);
	s += ":" + tokens[1] +":";
	s += Ogre::StringConverter::toString((long)info.info.x11.window);
	misc["parentWindowHandle"] = s;
This means. Until someone figures out how to get a valid handle from SDL under linux/xserver this approach is pretty much restricted to windows. But at least I've got something to play with...

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 10:51 pm
by strook
tomorrow i'll try it with the sdl 1.3. at my last try, i was on it but didn't belive that i was near a solution.

with sdl 1.3 we have a platform independent way to display both in one window, i think.

the only i hope not so difficult problem will be that the input must be rewritten for it.

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 11:08 pm
by log0
i hope not so difficult problem will be that the input must be rewritten for it.
I think it would make more sense to go with Ogre/OIS then. Use ogre to create the window and OIS for the input. The vegastrike OpenGL calls should still work if you update the framebuffer manually, don't use Ogres rendering loop.

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 11:10 pm
by gonzo
Ready or not (not in this case... ;) ) I think some pictures should go up on the Development Blog.

Re: ogre branch ? new attempt from scratch

Posted: Thu Oct 27, 2011 11:16 pm
by strook
nah i don't want to rewrite so much important features like the input.

i've tried it and, believe me it is the best to leave it as it is now.

anyway, after googling a bit, i have found out, that the input won't be changed so much.

1.: there shall be exist sdl1.2 backwards compatibility input headers.

2.: only the management of special and multiple keys, maybe of multiple input. will be changed.

so i think it's save to use 1.3 also it should have been done this summer already.

Re: ogre branch ? new attempt from scratch

Posted: Fri Oct 28, 2011 2:21 am
by strook
i think i got it - make yoursef an opinion:

Image
Image
Image
Image

i'll upload the code tomorrow.

and test how it is without texture to get shure.

GOOD WORK log0!! :D

Re: ogre branch ? new attempt from scratch

Posted: Fri Oct 28, 2011 7:16 am
by log0
Looks like the default vegastrike planet mesh :?

Re: ogre branch ? new attempt from scratch

Posted: Fri Oct 28, 2011 1:07 pm
by strook
shit, you are right.

i'll play and google a bit with the opengl inject parameters of the app.

Re: ogre branch ? new attempt from scratch

Posted: Fri Oct 28, 2011 11:29 pm
by log0
I'll see if I can get Ogre/OIS running for the window and input.

Re: ogre branch ? new attempt from scratch

Posted: Sat Oct 29, 2011 1:18 am
by strook
nah i think i can get it running with sdl1.2 and old input.
don't make the things too complicated. :!:

i disabled all the vegastrike sphere generations for the planet and atmosphere etc, and got a white sphere.

i don't know wether it comes from the ogre part. i'll have to test that.

this evening, i brought up my time in trying to replace every planet in the system at once.

maybe i should check if i'don't use the ogre planets anymore wether it still exists in the unitconverter scene.

also i have seen , that you disabled much stuff.. the sky et. i enabled it and got this.

but i haven't thime this evening, it' 2:30 i have to sleep...

cu tomorrow.

Code: Select all

Error: Cannot Open Unit Llama.begin from save file New_Game.
Creating planet JumpTo17-ar with texture jump.texture and technique  - unitlevel <= 2
Creating planet Cephid_17 A with texture stars/white_star.texture and technique  - unitlevel <= 2
WARNING: material OgrePlanet/Sky has no supportable Techniques and will be blank. Explanation: 
Pass 0: Vertex program OgrePlanet/sky_vp cannot be used - not supported.

Creating planet Atlantis with texture planets/ocean.texture|planets/ocean_specular.texture|planets/earth/earth_clouds.texture and technique earth - unitlevel > 2
terminate called after throwing an instance of 'Ogre::ItemIdentityException'
  what():  OGRE EXCEPTION(4:ItemIdentityException): An object of type 'Entity' with name 'SurfaceRightEntity' already exists. in SceneManager::createMovableObject at /home/marcel/Dokumente/ogre_src_v1-7-3/OgreMain/src/OgreSceneManager.cpp (line 6490)

Re: ogre branch ? new attempt from scratch

Posted: Sat Oct 29, 2011 4:59 am
by log0
don't make the things too complicated. :!:
It is the next logical step and should make things easier on the long run.
this evening, i brought up my time in trying to replace every planet in the system at once.
...
also i have seen , that you disabled much stuff.. the sky et. i enabled it and got this.
I've disabled stuff on purpose. You are trying too much at once. First the rendering and the LOD code need to be fixed/tuned. This is also why I am using the simple "white" planet shader without textures. Much stuff makes it more complicated -> "Make It Work Make It Right Make It Nice"

Can you replicate my screenshots?

Re: ogre branch ? new attempt from scratch

Posted: Sat Oct 29, 2011 11:20 am
by strook
i'm getting 2 windows with sdl1.3.

it works, but i get no output and doesn't help much.

i have read, that "currentGlContext" is extra for linux with sdl.

i'll test wether the planets are generated, this evening.

i have a few more additions, so pls have a look on my code.

i used ois already, its on my download site on the release version.

Re: ogre branch ? new attempt from scratch

Posted: Sat Oct 29, 2011 3:10 pm
by log0
Hey strook. I am not sure what you have been doing but

Code: Select all

misc["currentGLContext"] = Ogre::String("True");
with Ubuntu 11.10
Image
Image

This is with the open source ATI driver. :shock:

The game will crash a bit later though trying to load lower LOD lewels, need to test with Catalyst.

Re: ogre branch ? new attempt from scratch

Posted: Sat Oct 29, 2011 5:43 pm
by strook
good :D

i'll upload the code. i think we could use mine additions to create the rocky planets first, so it could be taken into the vs code in a short matter of time.

Re: ogre branch ? new attempt from scratch

Posted: Sat Oct 29, 2011 7:15 pm
by strook
i uploaded my data to vsogre/branches/strook/vs_log0.

i added your patch and the files in data.

i modified:
CMakeLists.txt
vsogre.cpp ,h
cmd/planet.cpp
debug_vs.h
and some OP.. files
in planet.

pls have a look to it.

Re: ogre branch ? new attempt from scratch

Posted: Sat Oct 29, 2011 8:12 pm
by log0
Why not a patch?

svn diff > patch.diff

Re: ogre branch ? new attempt from scratch

Posted: Sat Oct 29, 2011 8:48 pm
by strook
cause i exported the vanilla vs and added the patch.
i have no .svn data from the vs trunk anymore so i can't make a patch against the trunk.

is there any other way?

it was always a problem for me to keep the files in sync with the vs trunk.