Page 20 of 21

Re: ogre branch ? new attempt from scratch

Posted: Sun Oct 30, 2011 9:14 am
by strook
gotcha!

Image

:D

with your trunk it works now.

uploaded CMakeLists.txt, so one can generate Project files correctly.

we have to discuss how we handle it with the additions to the trunk.

i want to add my additions for displaying planets in the vs campaign without starting uc.

can you tell me how you modified the mission file for it?

Re: ogre branch ? new attempt from scratch

Posted: Sun Oct 30, 2011 11:00 am
by strook
ah i see. changed the radius from "1282000" to "5310". this is shrinking by factor 241,43126177.

also, we had to shrink all planets by factor 250 ?

on what platform did you test the flight?

i'll test it on my i5 quad core... lets see how fast it is...

maybe we have to shrink all planets first before we have implemented a more complicatd seamless flight solution.

plz have a look here http://yass-engine.de/downloads/thesis.zip

with this we can simulate real sized planets.

Re: ogre branch ? new attempt from scratch

Posted: Sun Oct 30, 2011 11:07 am
by strook
well.. mine is crashing to, when going into the lower LOD levels, after coming very slow.

Re: ogre branch ? new attempt from scratch

Posted: Sun Oct 30, 2011 12:07 pm
by log0
ah i see. changed the radius from "1282000" to "5310". this is shrinking by factor 241,43126177.

also, we had to shrink all planets by factor 250 ?

on what platform did you test the flight?

i'll test it on my i5 quad core... lets see how fast it is...

maybe we have to shrink all planets first before we have implemented a more complicatd seamless flight solution.

plz have a look here http://yass-engine.de/downloads/thesis.zip

with this we can simulate real sized planets.
Look here: http://forums.vega-strike.org/viewtopic ... 25#p126146

I've changed the radius because it had a completely ridiculous value of 1.28 million kilometers. This is not real sized.

OgrePlanet is Anders Lingfors work not mine. I piked it because it is the most promising planet renderer for ogre imho, although incomplete.

No I do not plan to implement a new planet renderer from scratch(http://yass-engine.de/downloads/thesis.zip contains no source code).

The crashing is new, wasn't there before. I am looking into it.

Re: ogre branch ? new attempt from scratch

Posted: Sun Oct 30, 2011 1:14 pm
by strook
i implemented multiple planet creation, but it is still buggy.

maybe you take a look into it in /branches/strook/vs_log0

changed:
branches/strook/vs_log0/src/cmd/planet.cpp
branches/strook/vs_log0/src/planet/OPPlanet.cpp
branches/strook/vs_log0/src/planet/OPPlanet.h
branches/strook/vs_log0/src/vsogre.cpp

Re: ogre branch ? new attempt from scratch

Posted: Sun Oct 30, 2011 1:52 pm
by log0
maybe you take a look into it in /branches/strook/vs_log0
Why don't you checkout http://vegaogre.svn.sourceforge.net/vie ... rike_log0/ apply your local changes and post a patch. Having to jump from one branch to another and diffing the files is not that effective.

Re: ogre branch ? new attempt from scratch

Posted: Sun Oct 30, 2011 7:45 pm
by pheonixstorm
If you want source for seamless to look at try Pioneer or Simerge Both have source releases and look decent though still in an early life cycle.

Re: ogre branch ? new attempt from scratch

Posted: Sun Oct 30, 2011 8:03 pm
by strook
i'm updating it... i'll use Ogre::Real = double precision.

we should use this i think vegastrike uses double precision, too (i'm not shure)

just change OGRE_DOUBLE_PRECISION in OgreConfig.h to 1 and recompile ogre.

i'll implement a variable length test, if neccessary.

Re: ogre branch ? new attempt from scratch

Posted: Sun Oct 30, 2011 8:54 pm
by strook
ok, here is the patch.

it includes also a modification in CMakeLists.txt that is needed by the Planetrenderer. i dunno why it compiled on the old platform (i updated ubuntu to 10.10).

it is a patch derived from log0 version 247 in the trunk.

the planets won't be rendered by the planetengine , i don't know were the error is in the moment.

Re: ogre branch ? new attempt from scratch

Posted: Sun Oct 30, 2011 9:15 pm
by log0
Thanks strook, will check it.

Re: ogre branch ? new attempt from scratch

Posted: Sun Oct 30, 2011 9:57 pm
by strook
we should use ogre at double precision cause we need the large values.

i'll write an addon that ensures this.

also there is a new branch in /branches/strook/mine_vs_log0.

it is my development branch derived from revision 247.

Re: ogre branch ? new attempt from scratch

Posted: Mon Oct 31, 2011 2:13 am
by strook
i added basic multiple planet support to the trunk, which is not enabled cause of a bug at generating the planets: if we put a unique name to the materials, the procedural generation will no longer generated.

you must compile ogre with double precision to compile this.

Re: ogre branch ? new attempt from scratch

Posted: Mon Oct 31, 2011 12:05 pm
by strook
@pheonixstorm: i think we got a pretty good algorytm, which is slow cause it is not parallel programmed and not optimized.

also we can make it faster if we use the optimisations and techniques shown in the thesis from the downloads section in the yass page.

this is how a good seamless rendering algorytm should look like.

Re: ogre branch ? new attempt from scratch

Posted: Mon Oct 31, 2011 3:27 pm
by strook
Image

atlantis will now be procedurally displayed.

other planets follow.

Re: ogre branch ? new attempt from scratch

Posted: Mon Oct 31, 2011 4:35 pm
by log0
Good work strook. A few rematks from my side.

The Impl was actually a Pimpl to hide the implementation details and especially ogre headers from vegastrike code. Here more info: http://www.gamedev.net/page/resources/_ ... impl-r1794

I would prefer to keep it private and access it through a abstract interface(CreatePlanet, UpdatePlanet, ...) if possible.

Do we really have to switch to doubles already? Vegastrike worked without them and OpenGL is restricted to floats anyway. It would also complicate the build process. Afaik no linux distribution I know of is offering Ogre with double support.

Re: ogre branch ? new attempt from scratch

Posted: Wed Nov 02, 2011 8:28 am
by Hicks
i am assuming when ogre is working, and we have seamless flight, we will be able to model planets in a lot more detail, even down to terrain contours and adding buildings? Any idea what type of files we would need to model the planets/objects? what format things need to be in?

Re: ogre branch ? new attempt from scratch

Posted: Wed Nov 02, 2011 5:48 pm
by pheonixstorm
Thing is, we don't need ogre to be able to do that. We need to make seamless work with VS and VSOgre, especially if we want to have both games connecting and running in multiplayer. The work being done on this is wonderful though. Maybe one of these days I can split this thread up into multiple topics since this IS the VS Ogre forum ;)

Re: ogre branch ? new attempt from scratch

Posted: Fri Nov 04, 2011 2:28 pm
by log0
I've pushed a fix for the crashing on surface approach(silly bug introduced by me while fixing compilation on linux). To be honest now having had a closer look into the patch code I think it is overly complicated for the job it is doing. I'd tend to simplify/rewrite it.

@Hicks:
I see no problems adding this features. But it is way too early to even think about it imho.I'd prefer to move the remaining vegastrike graphics implementation to ogre after having the planets working before adding more new features.

Btw ogre is just a graphics engine, although a fancy one. It is a high level wrapper of all the stuff needed to be done to draw things on screen. Vegastrike for example is missing such an abstraction, doing it the hard low level way.

Re: ogre branch ? new attempt from scratch

Posted: Tue Nov 08, 2011 6:20 pm
by log0
I've had some time for testing. The jerky motion while approaching "Landing Paradise" is a precision issue. We are subtracting two large numbers(3E10) close to each other (planet position - camera position) which causes serious issues when getting close to the surface(50km).

Re: ogre branch ? new attempt from scratch

Posted: Tue Nov 08, 2011 8:25 pm
by log0
OK. It is not the subtraction. The camera position jumps by a value of 2048m every few seconds on x and z axes . Given the messy code I am not sure if I'll be able to figure out why.

Re: ogre branch ? new attempt from scratch

Posted: Tue Nov 08, 2011 11:13 pm
by log0
Position issue resolved :) Will start to refactor planet code to properly support multiple planets.

Re: ogre branch ? new attempt from scratch

Posted: Wed Nov 09, 2011 12:42 pm
by log0
Hey guys. I've been wondering how much of the planet configuration should be exposed. The height data source is modular and rather flexible.

Current configuration(I've collapsed scale, scalebias modules to simplify it):

Code: Select all

highlands
type = ridgedmulti
octaves = 12
scale = 0.8
bias = 0.2
scalex = 250
scaley = 250
scalez = 250

lowlands
type = billow
octaves = 7
scale = 0.2
bias = -0.8
scalex = 250
scaley = 250
scalez = 250

mountains_select
type = perlin
octaves = 12
scalex = 10
scaley = 10
scalez = 10

mountains
type = select
control = mountains_select
source1 = highlands
source2 = lowlands
lowerbound = 0.5
falloff = 0.1
scale = 0.5
bias = 0.5

continents_select
type = perlin
octaves = 12
frequency = 1
lacunarity = 2
persistence = 0.625

ocean
type = constant
value = -1.0

continents
type = select
control = continents_select
source1 = ocean
source2 = mountains
lowerbound = 0.0
falloff = 0.1
The select module blends source1 and source2 based on the control and falloff value(falloff = 0 no blending).

Re: ogre branch ? new attempt from scratch

Posted: Mon Nov 21, 2011 1:37 am
by log0
OK this one took a bit longer than anticipated. The planet code support multiple instances now. Currently it will replace all planets(stars) in the system, the only parameter atm is planet radius.

Todo:
Camera setup. Light source setup. Working on planet lod(quite visible lod switches). Performance optimizations(we are vertex heavy 30k-170k). More planet parameters, replace current simplistic shader with the complex one.

Features:
It is multi-threaded and will require multiple(2) cores to run smoothly. The implementation requires shader support. I don't think there is a way to avoid this, we will need linear z depth. The integration into vegastrike source requires changing about a dozen lines of code in three files. I think it can be merged into vs and run conditionally if desired.

@pheonixstorm what would be your minimum requirements to consider the code to be ready for inclusion?

Btw would be great if someone else tried to build/run it, not sure if strook is still around.

Re: ogre branch ? new attempt from scratch

Posted: Mon Nov 21, 2011 2:13 am
by pheonixstorm
Get it ready and I will add it to my branch. I can compile for linux and windows. Will probably have to add in a setup config so that those with low end cpus can opt out and use the normal routines. If you think its ready i'll add it to my branch. We can work out all the bugs as we go. I really want to see how this looks in VS proper :) :D :o 8)

Re: ogre branch ? new attempt from scratch

Posted: Mon Nov 21, 2011 11:12 am
by log0
Cool. I'll add camera, light source interface and create a patch against your branch.