View topic - Inverted height with blueprint in springlobby



All times are UTC + 1 hour


Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: 10 Jul 2012, 18:27 
User avatar

Joined: 02 Dec 2011, 22:31
Location: North Dakota, US
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?


Top
 Offline Profile  
 
PostPosted: 10 Jul 2012, 19:07 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
Blueprint had a sloppy bit of logic for inverted I cannot acess my file right now to tell you the fix though.


Top
 Offline Profile  
 
PostPosted: 10 Jul 2012, 21:38 
User avatar

Joined: 02 Dec 2011, 22:31
Location: North Dakota, US
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?


Top
 Offline Profile  
 
PostPosted: 10 Jul 2012, 22:50 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
Nah, it is a minor thing to fix like I said, I just cannot grab the fix at the moment


Top
 Offline Profile  
 
PostPosted: 11 Jul 2012, 01:03 
User avatar

Joined: 02 Dec 2011, 22:31
Location: North Dakota, US
cool, much appreciated whenever you do get a chance


Top
 Offline Profile  
 
PostPosted: 11 Jul 2012, 01:32 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
Quote:
--------------------------------------------------------------------------------------------------------
-- 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?


Top
 Offline Profile  
 
PostPosted: 11 Jul 2012, 01:41 
User avatar

Joined: 02 Dec 2011, 22:31
Location: North Dakota, US
Quote:
----------------------
-- 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


Top
 Offline Profile  
 
PostPosted: 11 Jul 2012, 01:44 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
then try it.


Top
 Offline Profile  
 
PostPosted: 11 Jul 2012, 02:05 
User avatar

Joined: 02 Dec 2011, 22:31
Location: North Dakota, US
Quote:
---------------------------------
-- 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?


Top
 Offline Profile  
 
PostPosted: 11 Jul 2012, 02:08 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
yeah, had to set the sun dir to be the right angle.

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


Top
 Offline Profile  
 
PostPosted: 06 Sep 2012, 15:21 
User avatar

Joined: 11 Jun 2010, 06:32
Location: Adelaide, Australia
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


Top
 Offline Profile  
 
PostPosted: 06 Sep 2012, 16:01 
User avatar

Joined: 02 Dec 2011, 22:31
Location: North Dakota, US
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.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Funkencool and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.