Page 54 of 138

Re: Progress

Posted: Thu Apr 12, 2012 6:00 pm
by Capt. Murphy
Kaks wrote:
http://www.astrobio.net/articles/images ... bymoon.jpg

There are going to be a few more universal settings once we're done with new_planets, and both planetary shadow darkness & edge settings should be in place before 1.77! ;)
Excellent - it was the sudden edge between light and dark that bothered me most. The darkness is a bit strange at first (and a bit too dark for my tastes), but especially if we get the lights of cities etc on populous plants I like it.

Re: Progress

Posted: Mon Apr 16, 2012 12:11 pm
by submersible
Ahruman wrote:
By the way, have you guys played with the PERLIN_3D macro? That mode was intended to be the “real” new planets; as far as I remember it was turned off because I was researching faster 3D noise functions. (3D noise doesn’t have distortion problems towards the poles, and it can be mapped onto cube maps more usefully than the current approach.)
Yes - and it looks very nice. I've also experimented with generating a modified buffer to drive the normal.

http://swarm.perlide.org/static/new_pla ... te-134.png
http://swarm.perlide.org/static/new_pla ... te-135.png
http://swarm.perlide.org/static/new_pla ... te-136.png

Code: Select all

Index: src/Core/Materials/OOPlanetTextureGenerator.h
===================================================================
--- src/Core/Materials/OOPlanetTextureGenerator.h	(revision 4856)
+++ src/Core/Materials/OOPlanetTextureGenerator.h	(working copy)
@@ -28,7 +28,7 @@
 #import "OOTextureGenerator.h"
 #import "OOMaths.h"
 
-#define PERLIN_3D			0
+#define PERLIN_3D			1
 
 @class OOPlanetNormalMapGenerator, OOPlanetAtmosphereGenerator;
 
@@ -65,6 +65,7 @@
 	// Noise generation stuff.
 	float							*fbmBuffer;
 	float							*qBuffer;
+	float							*qxeBuffer;
 	
 #if PERLIN_3D
 	uint16_t						*permutations;
Index: src/Core/Materials/OOPlanetTextureGenerator.m
===================================================================
--- src/Core/Materials/OOPlanetTextureGenerator.m	(revision 4856)
+++ src/Core/Materials/OOPlanetTextureGenerator.m	(working copy)
@@ -407,8 +407,16 @@
 	
 	_info.paleSeaColor = Blend(0.35f, _info.polarSeaColor, Blend(0.7f, _info.seaColor, _info.landColor));
 	float normalScale = 1 << _planetScale;
-	if (!generateNormalMap)  normalScale *= 3.0f;
-	
+	float normalExponent = 1.0f;
+	if (!generateNormalMap) 
+	{
+		normalScale *= 3.0f;
+	}
+	else
+	{
+		normalScale *= 5.0f;
+		normalExponent = 2.0f;
+	}
 	// Deep sea colour: sea darker past the continental shelf.
 	_info.deepSeaColor = Blend(0.85f, _info.seaColor, (FloatRGB){ 0, 0, 0 });
 	
@@ -425,6 +433,8 @@
 	// first pass, calculate q.
 	_info.qBuffer = malloc(_width * _height * sizeof (float));
 	FAIL_IF_NULL(_info.qBuffer);
+	_info.qxeBuffer = malloc(_width * _height * sizeof (float));
+	FAIL_IF_NULL(_info.qxeBuffer);
 	
 	for (y = (int)_height - 1, fy = (float)y; y >=0; y--, fy--)
 	{
@@ -434,6 +444,7 @@
 		for (x = (int)_width - 1; x >=0; x--)
 		{
 			_info.qBuffer[y * _width + x] = QFactor(_info.fbmBuffer, x, y, _width, poleValue, seaBias, nearPole);
+			_info.qxeBuffer[y * _width + x] = pow( _info.qBuffer[y * _width + x ] , normalExponent );
 		}
 	}
 	
@@ -450,10 +461,10 @@
 		for (x = (int)_width - 1; x >= 0; x--)
 		{
 			q = _info.qBuffer[y * _width + x];	// no need to use GetQ, x and y are always within bounds.
-			yN = GetQ(_info.qBuffer, x, y - 1, _width, _height, widthMask, heightMask);	// recalculates x & y if they go out of bounds.
-			yS = GetQ(_info.qBuffer, x, y + 1, _width, _height, widthMask, heightMask);
-			yW = GetQ(_info.qBuffer, x - 1, y, _width, _height, widthMask, heightMask);
-			yE = GetQ(_info.qBuffer, x + 1, y, _width, _height, widthMask, heightMask);
+			yN = GetQ(_info.qxeBuffer, x, y - 1, _width, _height, widthMask, heightMask);	// recalculates x & y if they go out of bounds.
+			yS = GetQ(_info.qxeBuffer, x, y + 1, _width, _height, widthMask, heightMask);
+			yW = GetQ(_info.qxeBuffer, x - 1, y, _width, _height, widthMask, heightMask);
+			yE = GetQ(_info.qxeBuffer, x + 1, y, _width, _height, widthMask, heightMask);
 			
 			color = PlanetMix(&_info, q, nearPole);
 			

Re: Progress

Posted: Mon Apr 16, 2012 12:16 pm
by Cody
Those planets are looking pretty cool, sub!

Re: Progress

Posted: Mon Apr 16, 2012 12:32 pm
by submersible
El Viejo wrote:
Those planets are looking pretty cool, sub!
Praise goes to Ahruman and kaks and cim for the NEW_PLANETS code revival. I'm just picking away at the edges. They do look cool though - I completely agree.

Re: Progress

Posted: Mon Apr 16, 2012 1:22 pm
by Eric Walch
and I am still amazed at the speed of generating those maps. Om my fast computer there is no noticeable delay. Map generation already starts in the background when you select a system on the short or long range chart and usually is finished by the time I press the F7 key to view the planet.

Re: Progress

Posted: Mon Apr 16, 2012 1:45 pm
by cim
submersible wrote:
Praise goes to Ahruman and kaks and cim for the NEW_PLANETS code revival. I'm just picking away at the edges. They do look cool though - I completely agree.
My contribution to NEW_PLANETS so far has essentially been going alternately "Ooh, pretty" and "Hey, where'd my FPS go" :)

Re: Progress

Posted: Mon Apr 16, 2012 2:02 pm
by Gimi
cim wrote:
My contribution to NEW_PLANETS so far has essentially been going alternately "Ooh, pretty" and "Hey, where'd my FPS go" :)
Well, your implementation of frustum culling made me go, HEY, who upgraded laptop without telling me. At least I think it was frustum culling that did it. Deserves a mention here anyway. (And just to make it clear, I had NO clue what frustum culling was before I googled it.)

Re: Progress

Posted: Tue Apr 17, 2012 3:00 pm
by Eric Walch
I added the AI command 'performLandOnPlanet' as a better alternative for the old 'landOnPlanet' that still will stay working. The later just let the ships disappear in mid-air, what could look buggy when examining from close to the planet. The new command initiates a landing performance that lets the ship stop, turn and sink slowly into the planet. (Sorry, only vertical landings. I didn't want to bother in writing code to differentiate between vertical and horizontal landing)

When completely landed a shipLandedOnPlanet event is send with the planet as parameter. This event is send, both with the new and the old command.

For exact syntax and use see the wiki pages.

Probably only 50% of the players ever noticed a shuttle or escape-capsule landing, but the new planets code brought the way shuttles land under the attention again.

Re: Progress

Posted: Sun Apr 22, 2012 4:51 pm
by Capt. Murphy
Kaks wrote:
And my question is: Capt Murphy, how did you get a main planet without atmosphere? :)

Edit: and are shaders on at all? :P
Sorry Kaks, missed that question. Full Shaders, and there is an atmosphere, but on the way in from the witchpoint it kind of pops in to view about 1/3 of the way there (a slight graphical change in planets like this is something I've always noticed not just with the new code, and not just with this hardware).

This one looks much nicer (lasts nights trunk).

http://s18.postimage.org/66irojyl5/oolite_003.png

And a few more atmosphere present and correct.

http://s13.postimage.org/sf8svksmf/oolite_004.png
http://s13.postimage.org/c7beofu93/oolite_006.png

Re: Progress

Posted: Mon Apr 23, 2012 3:01 pm
by another_commander
Hoping that I have not borked something completely, tomorrow's nightly build for Windows and Linux should have built-in gamma control support. Check your gameoptions screen, it should be pretty clear how it works.

Re: Progress

Posted: Mon Apr 23, 2012 5:47 pm
by Capt. Murphy
another_commander wrote:
Hoping that I have not borked something completely, tomorrow's nightly build for Windows and Linux should have built-in gamma control support. Check your gameoptions screen, it should be pretty clear how it works.
On a quick 5 minute test it works. But oddly (or not?) screenshots don't show the effects, whether taken in Oolite or by Windows. Nebulae look very odd at a Gamma setting of 4.0.

Switching between windowed and full screen seems to bork around with it a bit as-well (if you go back to options and change the value a notch it works in both though).

Anyway enough of that Oolite has always looked fine as it is to me...

Re: Progress

Posted: Mon Apr 23, 2012 7:40 pm
by SandJ
another_commander wrote:
tomorrow's nightly build for Windows and Linux should have built-in gamma control support.
Image

Re: Progress

Posted: Mon Apr 23, 2012 9:13 pm
by pagroove
I tried the latest build. Like what I see :). Although the contrast dark/light is very strong on the planets.

Re: Progress

Posted: Tue Apr 24, 2012 6:07 pm
by Zireael
SandJ wrote:
another_commander wrote:
tomorrow's nightly build for Windows and Linux should have built-in gamma control support.
Image
I agree completely with you, SandJ!

Re: Progress

Posted: Sat May 19, 2012 1:16 pm
by cim
A bunch of AI changes in trunk seem to be working fairly smoothly at the moment
- most AIs now try to run away from live Q-mines
- Thargoids make more sensible use of their omni-directional laser in combat
- ships with point defense weapons (turrets, thargoid lasers) will now track multiple hostile targets with them, if appropriate
- missile damage is now much less dependent on frame rate, and missile AI (especially on hardheads) deals better with unusual situations
There are two threads in the testing forum giving more details of these changes, which are not entirely finished: https://bb.oolite.space/viewtopic.php?f=3&t=11911 and https://bb.oolite.space/viewtopic.php?f=3&t=11868 - your thoughts on game balance would be welcome.

There are also a lot of new scripting and AI properties available in trunk (many of them mentioned briefly in the scripting requests thread, but here's a quick list for reference).
New AI commands: addPrimaryAggressorAsDefenseTarget, addFoundTargetAsDefenseTarget, findNewDefenseTarget, clearDefenseTargets, storeTarget, recallStoredTarget
New AI events: CASCADE_WEAPON_DETECTED
New equipment.plist properties: damage_probability / EquipmentInfo.damageProbability
New ship properties: ship.boundingBox, ship.beaconCode now read-write, ship.dataKey, ship.defenseTargets, ship.pitch, ship.roll, ship.yaw, ship.*Weapon now read-write
New ship methods: ship.dealEnergyDamage(amount,range,shaping), ship.setBounty(amount,reason), ship.clearDefenseTargets, ship.addDefenseTarget(ship)
New playership properties: player.ship.laserHeatLevel, player.ship.price, player.ship.serviceLevel, player.ship.weaponFacings
New player method: player.replaceShip(key)
New ship script events: shipBountyChanged(delta,reason)
New world script events: equipmentRepaired, playerBoughtCargo, playerSoldCargo, shipScoopedFuel