Groundscar issue

Groundscar issue

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Groundscar issue

Post by Warlord Zsinj »

Currently we are able to give buildings customised groundscars, which is great.

Recently I've been using this in SWS to create certain features under buildings that tie in with geometry, so that you can have pipes that disappear into holes in the ground, generators that have wires leading away from them, construction pits that actually look like blackened pits with mechanical stuff in them, etc, etc.

This works well, the only problem is that currently, if you rotate a building 90 degrees using the built-in ] and [ button functionality, while it rotates the building, it does not similarly rotate the groundscar.

This is ok for generic groundscars (which we are also using), but for a custom groundscar where things you have drawn on the groundscar needs to line up with geometry, this causes clear problems.

I've included an image to demonstrate what I mean:

Here you can see a groundscar that is working fine
Image

This building has been rotated, you can see that things don't line up anymore
Image

A solution would be greatly appreciated.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Groundscar issue

Post by KDR_11k »

Smoth has been annoyed by this for quite some time already.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Groundscar issue

Post by Warlord Zsinj »

If I could at least be informed that a solution is possible, and that it is on the cards to be fixed, that'd help the planning on my end - as it means I can continue to make custom groundscars knowing that in the near future it will be fixed. If there is no likelihood that it will be fixed, or it is impossible, then I can't do specific custom groundscars - which is a pain in the arse, and a shame, but atleast I know so that I won't waste any more time on it.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Groundscar issue

Post by Kloot »

I'll fix it.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Groundscar issue

Post by FLOZi »

We love Kloot!

I meant to fix this ages ago, but when i glanced over the code nothing leapt out at me and i forgot all about it. Oops. :(
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Groundscar issue

Post by Argh »

Yay. I was planning to make use of this, too, and had forgotten to whine about it.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Groundscar issue

Post by KDR_11k »

BTW, can you fix the resizing when a decal is near the edge of the map, too?
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Groundscar issue

Post by Warlord Zsinj »

Thanks, kloot, it is much appreciated :)
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Groundscar issue

Post by Kloot »

Committed a patch for this in r5410. Note that I wrote it with
BA factories as visual aids, so let me know if your SWS decals
line up properly. ;)

@KDR

Any particular reason why you'd want a groundplate to extend
outside of the map area? Other than to avoid some heightmap
boundary checks, the resize logic isn't there by accident. ;)
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Re: Groundscar issue

Post by Gnomre »

Works, thanks Kloot :)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Groundscar issue

Post by smoth »

awesome! Thanks kloot!
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Groundscar issue

Post by Argh »

Er, might need another look, unless major stuff's being done to rendering in general (there's another odd issue at present, with giant black bands at the horizons). The quads aren't being drawn on the ground surfaces, but hey, I always wanted to have green clouds above my trees :lol: The rotation Y is working perfectly, however.

Image

Probably a z-buffering issue. Lemme test 16-bit to 24, see if that resolves this...

<tests>

Nope, the quad's drawn well above the terrain. Sorry Kloot.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Groundscar issue

Post by KDR_11k »

Kloot wrote:Any particular reason why you'd want a groundplate to extend
outside of the map area? Other than to avoid some heightmap
boundary checks, the resize logic isn't there by accident. ;)
I'd want it to retain its aspect ratio but be cut off where it leaves the map. Because this is just fail.
Attachments
edge.jpg
edge.jpg (57.32 KiB) Viewed 1051 times
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Groundscar issue

Post by Kloot »

Argh wrote: Image
Oops, remind me to fix that before the next release.
Post Reply

Return to “Engine”