Page 1 of 1

Inverted height with blueprint in springlobby

Posted: 10 Jul 2012, 19:27
by Funkencool
Title pretty much sums it up, basically all my heightmaps get inverted when I play/test my blueprint maps in springlobby.
Anyone know of a solution?

Re: Inverted height with blueprint in springlobby

Posted: 10 Jul 2012, 20:07
by smoth
Blueprint had a sloppy bit of logic for inverted I cannot acess my file right now to tell you the fix though.

Re: Inverted height with blueprint in springlobby

Posted: 10 Jul 2012, 22:38
by Funkencool
o cool, though I should probably also mention that it happens with or without the map option selected. Maybe I should just try getting rid of it completely for now?

Re: Inverted height with blueprint in springlobby

Posted: 10 Jul 2012, 23:50
by smoth
Nah, it is a minor thing to fix like I said, I just cannot grab the fix at the moment

Re: Inverted height with blueprint in springlobby

Posted: 11 Jul 2012, 02:03
by Funkencool
cool, much appreciated whenever you do get a chance

Re: Inverted height with blueprint in springlobby

Posted: 11 Jul 2012, 02:32
by smoth
--------------------------------------------------------------------------------------------------------
-- Inverted Heightmap
--------------------------------------------------------------------------------------------------------

if (Spring.GetMapOptions().inv == "0" or Spring.GetMapOptions().inv == nil) then
return
end


--if (Spring.GetMapOptions().inv == true) then
--if mapinfo.smf.minheight and mapinfo.smf.maxheight then

local min,max = mapinfo.smf.minheight, mapinfo.smf.maxheight
mapinfo.smf.minheight = max - 600
mapinfo.smf.maxheight = min - 600
--end
--end

local cfg = {
lighting = {
sunDir = {0, 1.0, -2.0},
},
}
return cfg
does yours look like the red part?

Re: Inverted height with blueprint in springlobby

Posted: 11 Jul 2012, 02:41
by Funkencool
----------------------
-- Inverted Heightmap
----------------------

if (not Spring.GetMapOptions().inv) then
return
end

if mapinfo.smf.minheight and mapinfo.smf.maxheight then
local min,max = mapinfo.smf.minheight, mapinfo.smf.maxheight
mapinfo.smf.minheight = max
mapinfo.smf.maxheight = min
else
Spring.Echo("Error mapinfo.lua: InvertedHeightmap selected but smf.minheight and/or smf.maxheight are unset!")
end
not really

Re: Inverted height with blueprint in springlobby

Posted: 11 Jul 2012, 02:44
by smoth
then try it.

Re: Inverted height with blueprint in springlobby

Posted: 11 Jul 2012, 03:05
by Funkencool
---------------------------------
-- Inverted Heightmap
---------------------------------

if (Spring.GetMapOptions().inv == "0" or Spring.GetMapOptions().inv == nil) then
return
end

if mapinfo.smf.minheight and mapinfo.smf.maxheight then
local min,max = mapinfo.smf.minheight, mapinfo.smf.maxheight
mapinfo.smf.minheight = max
mapinfo.smf.maxheight = min
else
Spring.Echo("Error mapinfo.lua: InvertedHeightmap selected but smf.minheight and/or smf.maxheight are unset!")
end
Thanks :-) , I ended up with that but it works flawlessly.

I'm guessing you had that lighting so your preshaded maps wouldn't be borked?

Re: Inverted height with blueprint in springlobby

Posted: 11 Jul 2012, 03:08
by smoth
yeah, had to set the sun dir to be the right angle.

glad to help, if you need anything else hit me up.

Re: Inverted height with blueprint in springlobby

Posted: 06 Sep 2012, 16:21
by enetheru
has this been pushed upstream? the blueprint I was working from for cooper hill had this problem.. I didn't think about it overly much

Re: Inverted height with blueprint in springlobby

Posted: 06 Sep 2012, 17:01
by Funkencool
No I've been lazy I meant to talk with jk about it, but haven't. For now though you can just replace the inverted height code with the code a couple posts up. I've also been messing with the blueprint a bunch so if you want an updated one (I plan on updating jk's if hes alright with it) just download my Small Supreme Battlefield revisited v0 map and take what you need/delete what you don't.