Inverted height with blueprint in springlobby

Inverted height with blueprint in springlobby

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Inverted height with blueprint in springlobby

Post 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?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Inverted height with blueprint in springlobby

Post by smoth »

Blueprint had a sloppy bit of logic for inverted I cannot acess my file right now to tell you the fix though.
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: Inverted height with blueprint in springlobby

Post 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?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Inverted height with blueprint in springlobby

Post by smoth »

Nah, it is a minor thing to fix like I said, I just cannot grab the fix at the moment
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: Inverted height with blueprint in springlobby

Post by Funkencool »

cool, much appreciated whenever you do get a chance
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Inverted height with blueprint in springlobby

Post 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?
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: Inverted height with blueprint in springlobby

Post 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
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Inverted height with blueprint in springlobby

Post by smoth »

then try it.
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: Inverted height with blueprint in springlobby

Post 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?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Inverted height with blueprint in springlobby

Post 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.
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Inverted height with blueprint in springlobby

Post 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
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: Inverted height with blueprint in springlobby

Post 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.
Post Reply

Return to “Map Creation”