Page 1 of 1

info about "Space map"

Posted: 21 Nov 2017, 01:07
by daryl
hello all,
I would like make a "space map" like "AstroTurf" and i did some test:
Image

So I used

Code: Select all

voidWater = true,

into mapinfo.lua

it's ok but I see:
1) blast on invisible water surface: it's possible to shut off water? i would like don't see blasts on invisible surface.
2) it's possible to hide borders??

Thank you!
bye!!

Re: info about "Space map"

Posted: 21 Nov 2017, 01:21
by Floris
2) /mapborder 0

Re: info about "Space map"

Posted: 21 Nov 2017, 01:32
by The Yak
Not sure about (1), but it may be fixed by using voidground instead of voidwater. Or maybe use both. See maps Violet Rampart and Core Platform for example usage of voidground. Springboard also can paint voidground.

Consider a darker space skybox. Nice ones are available in my maps Sever (blue stars) and Zed (red stars).

Re: info about "Space map"

Posted: 20 Dec 2017, 13:25
by [Fx]Doo
This is merely something that i put together to check the possibilities of 3d models as terrain:

https://youtu.be/OdQ2tVs3aTo

Uses a gadget to spawn the units, and LUS to to alter terrain height according to the unit model.
Also features a modified version of the "void" gadget found in Violet Rempart...

I will probably use this knowledge to make either a Space Station map, or try applying it to non fully void maps to model cliffs and buildings.

Note that this is still y = f(x,z), so it still isn't possible to make a bridge (unless gadgetry that handles moving units across a bridge with move ctrl for exemple).

Re: info about "Space map"

Posted: 20 Dec 2017, 18:29
by The Yak
Looking awesome! Loving the meteors, all the asteroids, and the giant moho propeller.

Re: info about "Space map"

Posted: 20 Dec 2017, 19:33
by daryl
[Fx]Doo wrote:This is merely something that i put together to check the possibilities of 3d models as terrain:

https://youtu.be/OdQ2tVs3aTo

Uses a gadget to spawn the units, and LUS to to alter terrain height according to the unit model.
Also features a modified version of the "void" gadget found in Violet Rempart...

I will probably use this knowledge to make either a Space Station map, or try applying it to non fully void maps to model cliffs and buildings.

Note that this is still y = f(x,z), so it still isn't possible to make a bridge (unless gadgetry that handles moving units across a bridge with move ctrl for exemple).
very very interesting!!
at the moment i'm working as standard map, but I like your project.
this is my WIP:
Image

so, i'm interested to your project, so, what is LUS ??? can I see an example map ??

Re: info about "Space map"

Posted: 20 Dec 2017, 20:27
by [Fx]Doo
LUS are Lua Unit Scripts, they basically gave me easier access to Spring.LevelHeightMap() functions when units where created.
This is the LUS that controls the heightmap under the circular platforms in the corner, the metal patch in the center aswell as the beam weapon that was used.

As the terrain is actually a unit rendered under an invisible ground, that allows me to give it animations. I could even take it further and make it destroyable, and apply another height change in Script.Killed() aswell as an animation in order to make the ground destroyable-like.

Code: Select all

local base, center, zaxis = piece("base", "center", "zaxis")

function script.Create()
cx, cy, cz = Spring.GetUnitPiecePosDir(unitID, 2)
zx, zy, zz = Spring.GetUnitPiecePosDir(unitID, 3)
x, y, z = zx - cx, 0, zz - cz
radius = 768 -- Should be = math.sqrt(x^2 + z^2) for compatibility with similar circular platforms of different sizes.
Spring.SetUnitBlocking(unitID, false, false, false, false, false, false, false)
Spring.SetUnitRadiusAndHeight(unitID, 50,0)

Spring.MoveCtrl.Enable(unitID)
Spring.MoveCtrl.SetPosition(unitID, cx, 780,cz)
for px = -radius/16, radius/16 do
	for pz = -radius/16, radius/16 do
		if math.sqrt(px^2 + pz^2) <= 768/16 then
			Spring.LevelHeightMap(cx + px*16, cz + pz*16, cx + px*16 + 15, cz + pz*16 + 15, 782)
		end
	end
end
for i = -1,2 do
for j = -1,2 do
Spring.SetMetalAmount((cx/16)+i, (cz/16)+j, 255 * 0.076 * 20)
end
end
Move(center, 2, 3)
Move(zaxis, 2, -768)
Move(zaxis, 3, -768)
Spring.SetUnitTarget(unitID, cx,cy+5000,cz, false, false, 1)
end

function script.AimWeapon()
return true
end

function script.AimFromWeapon(num)
if num == 1 then
return center
else
return zaxis
end
end

function script.QueryWeapon(num)
if num == 1 then
return center
else
return zaxis
end
end
Basically, i tried to use maths as much as possible to generate a height map that would bring the highest fidelity to the models used.
I've set up pieces in the model corresponding to key points (ie, a rectangle's corners, or a circle's radius) in order to have minimal input needed and have compatibility with different models. I still have to work out the different shapes that can be interesting.
Once this is done, I'll be able to fully generate the hightmap ingame rather than have to generate it before hand and adapt models to it.

In the end, it takes a huge amount of time to load, so the next step, after setting up the height map ingame, would be to extract the heightmap after gamestart (i understand some widgets can do it) and recompile the map using this extracted heightmap (hoping there isn't too much quality loss in the process). Doing that will then significantly reduce load times as the only things that will remain will be the model animations themselves.

This is still very BETA, i try to go as far as I can with experiments and get a hang of it. :)

Re: info about "Space map"

Posted: 24 Dec 2017, 01:54
by PicassoCT
Needs a diffrent background
Image

Re: info about "Space map"

Posted: 24 Dec 2017, 19:02
by The Yak
Please leave the superbright space backgrounds to hollywood movies. No one will play a map that hurts their eyes.

Re: info about "Space map"

Posted: 25 Dec 2017, 00:51
by PicassoCT
Well do it the jw way then, add a dark overlaying object- like a gasgiant below.
Or any planet with a nightside would do..

But add a point of reference, that shows the scale of things.
Bonuspoints for units that show up as little ships below the station, doing backgroudntraffic.
Or use asteroids.

viewtopic.php?f=21&t=28408&p=525047&hil ... id#p525047

viewtopic.php?t=35961