Page 1 of 2

Is it possible to support Normal map textures for units?

Posted: 30 Aug 2007, 22:49
by MR.D
After seeing just how nice some of these Next-gen games look when using low poly geometry and Normal mapped textures, I can't help but wonder if its possible to use this in spring.

It could really add some visual depth, while keeping performance high with these lower poly models.

Would it be a monumental undertaking to add Dx9 support to use this newer technology in spring?

Posted: 30 Aug 2007, 22:52
by Tobi
Yes.

It would probably be much easier to add normal map support using OpenGL.

Posted: 30 Aug 2007, 22:56
by Andrej
obligatory:
"how do i coded spring in dx9 to add normal mapping"
-\(O_o)/-

Posted: 31 Aug 2007, 00:23
by jcnossen
The rendering part is easy. The nasty part is combining it with the exisiting tool chain, because the S3O format is totally not flexible. Best would be a seperate text file that describes how stuff is rendered.
Or better, each model file gets a lua script, executed on load-time, that specifies the rendering and where texture files are.

Posted: 31 Aug 2007, 00:41
by lurker
jcnossen wrote:Or better, each model file gets a lua script, executed on load-time, that specifies the rendering and where texture files are.
And LOD models, etc.

Posted: 31 Aug 2007, 00:55
by jK
It is already possible, iirc.

Cause the lua lod system loads displaylists and not models, so if you add normals to your displaylists ..

You also can add shaders and different types of lighting with it. So it is a lot possible, only nobody used it yet ;)

Posted: 31 Aug 2007, 11:21
by MR.D
This is the kind of normal mapping I'm referring to.

What I did was just a quick 2 models test, there are tons of better reference material by other people, but I made this.

Basically what normal mapping consists of, is creating a high poly model which can be upwards of 500,000 triangles for surface mapping, and applying the surface map to a much lower poly model.

Similar to bump mapping, just that instead of raw height mapping which can't produce Phong type directional real time lighting and smoothing, Normal mapping uses the RGB color channels to measure up/down/left/right Facings of all normals, making real time lighting much more true and pronounced.

There is still a ton that I need to learn about the process, but just as a general basic test, you can see what a 20.000 triangle surface map can do for a 220 triangle in-game model, and this is just surface lighting, I havn't made a real texture for it, just the UVW map for colors.

And the best part, you only have to unwrap the low poly model, as long as it matches closely enough to the edges of the high poly one, you get a pretty nice result.

Image

Image

Image

Posted: 31 Aug 2007, 12:25
by SwiftSpear
Ugly normal map is ugly!

Is anyone here really confused about what a normal map is? We all know it's wrapped the same way a texture map is, right?

Posted: 31 Aug 2007, 14:17
by KDR_11k
<3 normalmaps, even though I'm not good at them either.

Posted: 31 Aug 2007, 14:37
by smoth
ung normal maps.

ok first, who is going to do them? you? Imagine that at least 85% of spring content is not uvmapped in the first place. Ok then you have to take said uvmapped model greeble them up and then maek normals.

it isn't a quick process. Even if the devs implemented it you would mostly not see them except for those speed moders like argh who will do a fast and dirty normal map versus something you would see in a next gen title.

consider that next gen titles have teams larger then say... oh 20 people of PROFFESSIONAL aptitude.. now consider that few of the spring projects have no more then 2 modelers capable of the normal map creation process.

/me grumbles.

Posted: 31 Aug 2007, 14:42
by KDR_11k
Generally it works better to make the highpoly first and then create an approximation in lowpoly that then receives the map. But yeah, that's probably too much work for Spring mod "teams" to get anything done in reasonable time. I think games like Half-Life 2 use a compromise by only normalmapping things that need it.

Posted: 31 Aug 2007, 14:45
by smoth
yeah, working from low poly back is not good.

thing is most players think normal maps are some simple process we can just tack on and make happy time. I wanted to point out what is obvious to us content developers.

Posted: 31 Aug 2007, 23:19
by MR.D
Its actually alot easier than you guys think, the programs that make the normal map itself does most of the work.

I made that test model in 10 minutes, then another 10 minutes to create and unwrap the low poly model, then 5 minutes for the program to extract the normal map of the high model, and match it to the Uv-map on the low.

There are plenty of tools that allow you do create the high poly objects even in these free modeling programs.

All I'm I'm trying to show here is what can be done by geometry for creating the soft shading to be put on a low poly model to make it look extra sexy.

There are also tools that can create a fake normal map from your regular Diffuse texture, and maybe that would be the better option as far as workload and time to create it.

The availability to at least use this newer technology is what is in question here, and the ability to add high ammounts of detail to a very low poly model, which spring pretty much demands to keep performance high when there are tons of units on-screen at any 1 time.

Posted: 01 Sep 2007, 00:06
by smoth
Oh mr d, prove me wrong, take the t61(a low poly unit) and make the proper normal map for it and I will openly admit I was wrong. However, I doubt that it is as quick as you think.

Posted: 01 Sep 2007, 00:26
by trepan
Spring can already use normal mapped models using the LuaRules
Spring.UnitRendering interface (requires that cliients have GL 2.0).
It can also use parallax mapping, relief mapping, displacement mapping,
etc... Basically, you can use custom textures and custom shaders per-unit.

Posted: 01 Sep 2007, 02:27
by Snipawolf
smoth wrote:Oh mr d, prove me wrong, take the t61(a low poly unit) and make the proper normal map for it and I will openly admit I was wrong. However, I doubt that it is as quick as you think.
Heh, that sounds like an all day job to me >___>

Posted: 01 Sep 2007, 07:23
by MR.D
Smoth, show me some references, a model, some pictures, or the texture of it then, don't just ask me to pull stuff out of thin air and expect it to magically appear.

Posted: 01 Sep 2007, 08:53
by REVENGE
With regard to MR. D's example, using normal maps on stuff like treads and surface features sounds good, but anything else and we have ugliness.

Posted: 01 Sep 2007, 11:35
by smoth
MR.D wrote:Smoth, show me some references, a model, some pictures, or the texture of it then, don't just ask me to pull stuff out of thin air and expect it to magically appear.
The t61 is IN gundam, has been for many many many many versions. The model and texture are all there. It is a better reference then the art because it is all there.

since you are in the business of making excuses... here are some references pics because.. well because you think they will help you.

Image
Image
Image

oh wait the model is more detailed and easier to see then the reference pictures!?!? OH NOES!

more images can be found here

Posted: 01 Sep 2007, 12:00
by MR.D
You made it sound like a personal attack that I was making there smoth, lets not act that way?