Page 4 of 11

Re: About planets

Posted: Sun Mar 25, 2012 9:10 am
by Kaks
I suppose we can call the shorelines a special case of city lights! :)

But illumination maps would definitely allow special one-off glowing ( highly volcanic? recently bombarded? ) planets/moons! :D

Re: About planets

Posted: Sun Mar 25, 2012 9:45 am
by SandJ
Kaks wrote:
But illumination maps would definitely allow special one-off glowing ( highly volcanic? recently bombarded? ) planets/moons! :D
Illumination ideas...

Aurora on Jupiter: http://www.mssl.ucl.ac.uk/www_plasma/vi ... aurora.jpg

Aurora on Earth: http://upload.wikimedia.org/wikipedia/c ... 050911.jpg

Lava flow on Earth, but might be bright red on a less sleepy planet: http://www.universetoday.com/wp-content ... 80x580.jpg

Mars ice cap: http://lightsinthedark.files.wordpress. ... =600&h=450

Re: About planets

Posted: Sun Mar 25, 2012 10:39 am
by cim
Wow! Even at this early stage, these are looking great.

Re: About planets

Posted: Sun Mar 25, 2012 5:01 pm
by Cmd. Cheyd
Submers-
Could you compile it for me and post somewhere? I am on the road 90% of the time now, and can't install the stuff I'd need to build from source onto my laptop. Or would someone else be kind enough?

Re: About planets

Posted: Sun Mar 25, 2012 11:45 pm
by submersible
Cmd. Cheyd wrote:
Submers-
Could you compile it for me and post somewhere? I am on the road 90% of the time now, and can't install the stuff I'd need to build from source onto my laptop. Or would someone else be kind enough?
Happy to try - what OS are you running ? I'm building on ubuntu 686 and have never attempted cross compiling.

Re: About planets

Posted: Wed Mar 28, 2012 11:25 am
by submersible
Eric Walch wrote:
submersible wrote:
One thing is fairly apparent - PlanetEntity/Drawable look like prime candidates for refactoring into several implementations of the same interface. Not my goal right now :)

Wish me luck
Just one thing: its is not PlanetEntity that handles the new_planet stuff, but OOPlanetEntity. I am completely unaware how all the classes are linked, but when the new-planets were active in the trunk builds, two years ago, I noticed they rotated around the wrong axis. Rotation axis was not through the poles. It must always have been wrong, but without white poles, you just never noticed it. I fixed that but was badly surprised that in the following Oolite release version, the rotation was wrong again. For the release, the new_planet stuff was disabled again and planets used PlanetEntity instead of OOPlanetEntity were I made my fixes. In current oolite those rotational fixes are copied to PlanetEntity.

Well I have not tracked it down yet - but there do appear to be some issue with orientation and/or normals - I'm really not sure. The F7 screen lighting for NEW_PLANETS is all wrong, 90degrees wrong on one axis I think . The problem appears with or without my materials hacks. I am unsure if the issues I am having with lighting effects in synthesised materials / shaders is related to this. Geometry problem perhaps ? Interestingly (still trying to confirm) - when using the jump drive there is a 'clunk' and the lighting of the planet shifts - weird.

Some quick previews
http://www.youtube.com/watch?v=Kh11bKLunYE
http://www.youtube.com/watch?v=GEqfZDs2Mu8

Re: About planets

Posted: Wed Mar 28, 2012 11:46 am
by submersible
Kaks wrote:
Well, I couldn't resist the challenge, and I did get the code to compile with NEW_PLANETS set to 1.
Still, though the seas are better than I remembered (Ahruman did some extra work on the seas which I didn't notice at the time), all the NEW_PLANETS land portion is very much featureless now, so we can't see the 3D mountain ranges anymore...

I'll look some more into the matter, hopefully I'll figure out what happened between then (2 years - & change - ago) and now.

PS: Yes, bug #5254 seems to be a typo, can't quite figure out what bug Ahruman was referring to.

PPS: The NEW_PLANETS stuff now compiles in rev4805, so if you really, really want to you can start playing with that code now! :)
Oddly - regarding mountains , with debug build - I do see that a normal map is generated. Why those are not displayed I am unsure and still picking through the code.

Re: About planets

Posted: Wed Mar 28, 2012 12:36 pm
by submersible
submersible wrote:
Kaks wrote:
Well, I couldn't resist the challenge, and I did get the code to compile with NEW_PLANETS set to 1.
Still, though the seas are better than I remembered (Ahruman did some extra work on the seas which I didn't notice at the time), all the NEW_PLANETS land portion is very much featureless now, so we can't see the 3D mountain ranges anymore...

I'll look some more into the matter, hopefully I'll figure out what happened between then (2 years - & change - ago) and now.

PS: Yes, bug #5254 seems to be a typo, can't quite figure out what bug Ahruman was referring to.

PPS: The NEW_PLANETS stuff now compiles in rev4805, so if you really, really want to you can start playing with that code now! :)
Oddly - regarding mountains , with debug build - I do see that a normal map is generated. Why those are not displayed I am unsure and still picking through the code.
A bunch of material defaults and shaders were removed.

Code: Select all

svn merge  -c -4363 svn://svn.berlios.de/oolite-linux/trunk .
Still looking, but reverting this appears to create materials/shaders for NEW_PLANETS

Re: About planets

Posted: Wed Mar 28, 2012 1:03 pm
by Eric Walch
submersible wrote:
when using the jump drive there is a 'clunk' and the lighting of the planet shifts - weird.
Something is also happening with the current planets. At a ceirtain distance to the planet, you see a small color change. Then, when flying back it jumps back at the same distance. I never investigated deeper as its hardly noticeable, but it might be more pronounced with shaders.
submersible wrote:
Oddly - regarding mountains , with debug build - I do see that a normal map is generated. Why those are not displayed I am unsure and still picking through the code.
Probably because it is just unfinished work. Ahruman and Kaks put a lot work in it, but than stopped because we needed a 1.74 release and it was apparent that this works would never be ready in time. And than with a feature freeze for 1.75, work was also postponed.

Re: About planets

Posted: Wed Mar 28, 2012 1:12 pm
by submersible
Eric Walch wrote:
submersible wrote:
when using the jump drive there is a 'clunk' and the lighting of the planet shifts - weird.
Something is also happening with the current planets. At a ceirtain distance to the planet, you see a small color change. Then, when flying back it jumps back at the same distance. I never investigated deeper as its hardly noticeable, but it might be more pronounced with shaders.
Could be a LOD thing? I wonder if LOD is dropped when travelling under jump drive.

Re: About planets

Posted: Wed Mar 28, 2012 10:17 pm
by Kaks
Eric Walch wrote:
submersible wrote:
Oddly - regarding mountains , with debug build - I do see that a normal map is generated. Why those are not displayed I am unsure and still picking through the code.
Probably because it is just unfinished work.
However, in this particular case, restoring the vertex & fragment shaders that were removed in rev4363 does display the generated normal maps & I reckon it's got us back to at least 90% of what we had before 1.74! Those files are in trunk - once again - and the NEW_PLANETS are more or less just as I remembered them!

Thank you submersible, very nice find! :)

Re: About planets

Posted: Thu Mar 29, 2012 10:37 am
by another_commander
Not sure if this has been done already, has submersible's code on the previous page been tested by anyone yet? If it is working and does not cause problems, maybe we can include it in the mainline and add one more contributor to the list? Kaks, you seem to be the one overlooking the planets code right now, shall we go ahead?

Re: About planets

Posted: Thu Mar 29, 2012 10:43 am
by submersible
another_commander wrote:
Not sure if this has been done already, has submersible's code on the previous page been tested by anyone yet? If it is working and does not cause problems, maybe we can include it in the mainline and add one more contributor to the list? Kaks, you seem to be the one overlooking the planets code right now, shall we go ahead?
I have tested using materials and shaders keys in planetinfo.plist with my patches and can confirm it is still rather broken, also probably very inefficient as the dynamic generation still occurs in spite of the successful creation of an OOMaterial OOShaderMaterial via this mechanism.

I must admit to being utterly out of my depth here too.

Kaks has asked me to supply the patches for review. I will do so once I have a reference OXP for a planet with "materials" dictionary and "shaders" dictionary.

The very curious and impatient can probably make do with the patch posted previously - if you're prepared to generate your own diffuse/specular/emission/normal+parallax maps.

Re: About planets

Posted: Thu Mar 29, 2012 10:45 am
by submersible
Kaks wrote:
Eric Walch wrote:
submersible wrote:
Oddly - regarding mountains , with debug build - I do see that a normal map is generated. Why those are not displayed I am unsure and still picking through the code.
Probably because it is just unfinished work.
However, in this particular case, restoring the vertex & fragment shaders that were removed in rev4363 does display the generated normal maps & I reckon it's got us back to at least 90% of what we had before 1.74! Those files are in trunk - once again - and the NEW_PLANETS are more or less just as I remembered them!

Thank you submersible, very nice find! :)
Most welcome. I think part of the missing 10% would be to sort out which 'surface' is bumpy and which is shiny. To my eye - sometimes the ocean coloured parts are bumpy - with shiny land , other times it is the opposite.

Re: About planets

Posted: Thu Mar 29, 2012 10:57 am
by Smivs
I quite like the idea of 'bumpy' oceans :D