SM3 - Page 4

SM3

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
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: SM3

Post by Kloot »

rts/Map/SM3/Plane.h wrote: typedef float3 Vector3;
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: SM3

Post by hoijui »

doh! :D
thanks Kloot!
i was looking for these:

Code: Select all

class Vector3
struct Vector3
typedef Vector3
i forgot how typedefs work again :D
just did not yet use them often enough.
User avatar
IllvilJa
Posts: 90
Joined: 08 Sep 2008, 00:01

Re: SM3

Post by IllvilJa »

I realize that you guys are about to take a bold step, entering dangerous terrain of hard labor, suffering and fear by doing the coding needed to make SM3 become reality. At least it seriously looks like that is happening.

I can only express my great gratitude over your fearless journey into the unknown and give you a sincere...

GOOD LUCK!!

(You may need it!)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: SM3

Post by AF »

It may be of note that jelmer originally built SM3 in a standalone application so eh could test without meddling with the mess that is spring rendering. This may explain some quirks such as the above.

One of the reasons he put forth for buggyness and slow progress was that porting the code over was annoying in that lots of rendering code in spring did not preserve state among other issues.
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: SM3

Post by Master-Athmos »

Considerung Kloot's efforts here and on making the engine handle over all needed input for normal mapping & stuff for models is there any way we could get an option for the new map format which would allow us to use normal or even parallax mapping with decals for some nice looking ground scars?
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: SM3

Post by Kloot »

Such an option wouldn't need to be exclusive to any new format. Decals (explosion scars, building plates, etc) are rendered as overlays independent of the map's type (SMF, SM3), adding normal + parallax mapping support could be done right now with a bit of work.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: SM3

Post by AF »

IIRC tobi or maybe trepan/lurker, someone, posted a reply to the last time someone foolishly asked for parallax mapping, demonstrating how you get to use a huge tonne of your system resources, for no observable gain under most conditions.

Parallax mapping in conclusion, is worthless and hogs resources apparently. The post had pictures and explanations though, maybe someone should re-post it.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: SM3

Post by Kloot »

You're probably referring to this, but misremembering it slightly. Basic PM is as cheap as it gets, and the "no observable gain" part is somewhat overstated.
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: SM3

Post by Master-Athmos »

While it's one of the most performance eating techniques it also depends a bit on which exact method you use as "parallax mapping" in fact is a quite broad term. In the end it's up to a general request anyway to apply a custom shader to the decals so you can do all the things you want from animating stuff (like doing a strange distortion so it looks like molten) or doing some normal mapping lighting fake or do a displacement mapping (-> parallax style) to get some real geometry for a stronger and perspective safe effect...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: SM3

Post by AF »

you could link to the infinity universe website too, but thats probably what the guy who complained about paralax request linked to too
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

So far as I can tell, whoever posted that rant is an idiot. I can't even tell that they implemented a true shader there.

Parallax mapping + normals + specularity control (which I've already implemented into my Unit shader) looks spectacular, and while it's not free, it's certainly cheap, and with a SMF++ format, it would be pretty efficient.

We "just" need a SMF format that loads a second DDS DXT5 set of tiles, and a MapConv that does two sets of tiles- one for the diffuse texture, and the other one for the normalmap / depthmap.

Maps would get quite a bit bigger, filesize-wise, but that's the only serious disadvantage. The resulting geometry only has to be sent to the shader once. And if the shader is GLSL and you can specify what shader you can use... well... that would make a lot of things possible. You could use the alpha channel for glowmaps, reflectivity, etc. (assuming that we were able to get access to the cubemaps, that is).

And yeah, using normalmaps on groundscars, at least the LUPS variety, is very easy, I just haven't had time to implement it yet, and won't have time until I finish moving my content into the modern age.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: SM3

Post by Pxtl »

I think he's just saying that the Parallax part is unnecessary - the rest of the shader stuff (normals + specularity) is almost-as-good and cheaper. I can't speak to the cheapness, but I see his point on the other stuff.

Either way, his screenshots show that it is good for a landscape, which is what we're talking about here. It may be wasted on unit skins, but it's definitely a good thing for the map itself.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: SM3

Post by AF »

The guy who originally posted that rant thats just been linked to is the guy who wrote the infinity universe engine, who knows MASSES more graphics kung foo than you do argh, this is the guy who has kilometer long spaceships taking off of planets going into orbit seamlessly, and dealing with multiple shadow systems and immense scales, aswell as procedurally generating graphics and objects on the fly.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: SM3

Post by Pxtl »

I do have to point out that I think his conclusions may not apply to Spring's landscape, though. He's quite right - space is a terrible environment for parallax mapping.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Here is a demonstration of why parallax is cool.

1. When not to use parallax: object is mainly very flat planes, and we don't want to create new geometry via shader:

Image As you can see, if you compare to my earlier shots, it's pretty much the same as a normalmap, but with a (very small) difference in performance.

2. Parallax is Ok, for minor details- resulting accuracy vs. lighting is better, and it's practically free:

ImageHere, the bumps stick out and feel more natural and detailed. Pretty worthless at a distance, though.

3. Parallax is awesome, if you want to create whole surface geometry from your bitmaps and are deliberate about it. This was an accident with CrazyBump, but it serves as a good example- in the ARB shader, those "awnings" that are noticeably swollen outwards with parallax are flat- that entire section of the model is... two triangles.

Image



Any other questions? Anybody else still not getting it? That guy is testing parallax, concluding it's worthless, and he obviously has no clue how to use it, or why it's fundamentally different than normalmaps. Parallax is what you use, when you want to auto-LOD meshes with incredible details, guys. And it's what you want to use when you want to, say, have a map's drawn geometry conform to the true-resolution heightmap, instead of an approximation.

But the key thing here is that it is different, requires a different approach to get the best use out of it, and it's really not expensive at all, assuming that it's just parallax, and not the giant bells-and-whistles of what I'm trying to do with Unit shaders.

It's just another tool, basically.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: SM3

Post by trepan »

http://en.wikipedia.org/wiki/Parallax_mapping
and he obviously has no clue how to use it, or why it's fundamentally different than normalmaps
Are you talking silly shit again, Argh? It's just a minor adjustment
to the texcoords based on incident angle and a texture sampled
height at the original texcoords.
oliveoil
Posts: 10
Joined: 02 Jun 2009, 13:25

Re: SM3

Post by oliveoil »

On my computer (with ubuntu, 9600gt and restricted nvidia drivers) SM3 has been reliably crashing since couple of weeks ago. I made a small patch here:
http://github.com/oliveoil/spring/commi ... bb350f89e1

Can someone with access push this upstream please?

I know about one more crash at the moment, when terraforming is done. Will try to look into that as well.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: SM3

Post by Kloot »

Thanks, done and fixed.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: SM3

Post by smoth »

anyone else getting these dark shadows?

Image
Attachments
screen023.jpg
(410.57 KiB) Downloaded 116 times
User avatar
nixtux
TechA Developer
Posts: 100
Joined: 01 Mar 2009, 15:36

Re: SM3

Post by nixtux »

yeah me also

Image
Post Reply

Return to “Engine”