Jump to content
Eternal Lands Official Forums
Sign in to follow this  
KarenRei

Materials properties patch committed

Recommended Posts

Let me know if you have any other problems. As mentioned at the beginning of the thread, there are certain things that are map and model bugs that didn't show up when EL was as flat as it was, but show up now, and there's nothing I can really do about that. But anything that you suspect might be a bug on my part, just let me know. :P

Share this post


Link to post
Share on other sites

Cute avatar update :hug:

 

If you want, I could grab you some screenies. Not sure if you specifically want Florian to get them for you. Feel free to suggest some things you'd like screenshots of.

Share this post


Link to post
Share on other sites

- http://www.superfloh.dyndns.org/el/elscreen041.png

- http://www.superfloh.dyndns.org/el/elscreen042.png

- http://www.superfloh.dyndns.org/el/elscreen043.png

- http://www.superfloh.dyndns.org/el/elscreen044.png

- http://www.superfloh.dyndns.org/el/elscreen045.png

- http://www.superfloh.dyndns.org/el/elscreen046.png

- http://www.superfloh.dyndns.org/el/elscreen047.png

- http://www.superfloh.dyndns.org/el/elscreen048.png

- http://www.superfloh.dyndns.org/el/elscreen049.png

- http://www.superfloh.dyndns.org/el/elscreen050.png

- http://www.superfloh.dyndns.org/el/elscreen051.png

- http://www.superfloh.dyndns.org/el/elscreen052.png

- http://www.superfloh.dyndns.org/el/elscreen053.png

- http://www.superfloh.dyndns.org/el/elscreen054.png

 

 

 

JPG's:

 

- http://www.superfloh.dyndns.org/el/elscreen041.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen042.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen043.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen044.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen045.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen046.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen047.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen048.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen049.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen050.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen051.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen052.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen053.png.jpg

- http://www.superfloh.dyndns.org/el/elscreen054.png.jpg

Share this post


Link to post
Share on other sites

Oh anyone that can post screenshots would be nice, but please if possible, don't post 1MB+ png's that take forever to load! That drives anyone nuts ;) Keeping them under 150kb is more than adequate.

 

Anyway, I didn't go through all those screenshots above, just a couple(because of the loading time), but I don't see any difference really, except perhaps somethings looking more bright(like self lit) than they should. LIke the pumpkin in the first 2 shots.

Share this post


Link to post
Share on other sites

There currently are shadows and lighting....so I guess you mean improved shadows/lighting? I don't know, I don't see any improvements. Can you pick out a shot or do a side by side comparision?

 

 

In picking on this shot here:

http://www.superfloh.dyndns.org/el/elscreen052.png

 

I notice much dark shadows coming from that plant and on the player character-which looks like he's got patches of black on him, not shadows.

There's also a really awkward shadow line on the side of the house that's closes to the camera. On the corner edge of it, there's like a wavy shadow line.

Share this post


Link to post
Share on other sites

Thank you so much! Hope you don't mind, I edited your post to include the jpg links ;)

 

Ok now that I looked through them all, it looks like you did sort of make comparision shots. One without "new lighting" one with. But the one without new lighting you do not have the shadows turned on so it's not a good comparision really.

The shadows with new lighting look super dark and black. The first 2 shots you have posted, I'd much rather use the first one, because those black shadows on the characters look awful. Granted, the current shadow mapping shadows also look awful on the characters(all very blocky/pixolated), however they aren't as black as these ones. Also the shadows on the ground look too black, for instance the one shot with the bridge, you should actually see the water under the bridge, but in the shot it looks like there's no water, no ground tile, just blackness.

Share this post


Link to post
Share on other sites

1) Player darkness: Changing that merely takes adjusting the material properties of the player model in material_metadata.xml. I'll do that this evening. As stated earlier, the values in there should be tweaked as desired.

 

2) Water shadows in general: Yep, I ought to adjust the material properties on the water a bit, too.

 

3) Bridge shadow: It's black in NEW and OLD, so I don't see the difference.

 

4) Wavy line on house: That's a model problem. I can't do anything about model problems, as I can't edit the models. There are a number model problems that simply didn't show up before because EL was so flat, usually involving objects that have been placed against one another that don't meet with the same slope. When you have a "flat" lighting model, you can't tell that they're different slopes. In this case, you're probably seeing two polygons with different normals occupying the same place, and so the graphics card is switching from one to the other.**

 

5) The shadow of the plant is accurate. Light is coming from almost overhead, just a touch to the right (as you can see from the clock, it's almost midday). The flowers overhang the edge, so they cast straight shadows down at a slight angle moving to the left. The only element that doesn't match with the real world is that the shadows aren't "soft". Unfortunately, "soft shadows" are both difficult to implement and perform slowly.

 

Let me know of any other materials that need to be adjusted, and I'll do so ;)

 

 

** One fundamental error that was made with model design in EL is that all vertices within an object are shared. What having them all use shared vertices tells the graphics card is, "I want this object to look smooth and rounded". So, you make a perfect cube with flat sides, and the graphics card will try and make it look smoothly rounded; it thinks you're trying to make a very poor approximation of a sphere. Facets that you don't want to blend into their neighbors should not share vertices with them.

Edited by KarenRei

Share this post


Link to post
Share on other sites

But the one without new lighting you do not have the shadows turned on so it's not a good comparision really.

NEW_LIGHTING seems to break shadows on my system when new lighting is off ...

Share this post


Link to post
Share on other sites

1) Player darkness: Changing that merely takes adjusting the material properties of the player model in material_metadata.xml. I'll do that this evening. As stated earlier, the values in there should be tweaked as desired.

 

 

 

Ah, that's quite interesting then. Looking forward to see what the tweaks can make it look like :laugh:

 

 

3) Bridge shadow: It's black in NEW and OLD, so I don't see the difference.

Sorry, what I meant by this was the shadow on the water that the bridge creates.

Share this post


Link to post
Share on other sites
Ah, that's quite interesting then. Looking forward to see what the tweaks can make it look like

 

Yeah, that's the big difference between the new version of NEW_LIGHTING and the old version -- every last detail can be tweaked now. You can tweak scenes (ambient, diffuse, specular) and materials (ambient, diffuse, specular, shininess and emission), with materials able to be set on a per-object, per-mesh, or per-texture basis. Can't get much more flexible than that :pickaxe:

Edited by KarenRei

Share this post


Link to post
Share on other sites

Ok I compiled the client to test this stuff out. Overall it looks like it'll be really nice once a lot of stuff is tweaked :)

 

Here are some shots I took:

http://img.photobucket.com/albums/v59/ffle...r/newlight1.jpg

http://img.photobucket.com/albums/v59/ffle...r/newlight2.jpg

 

First, the shadows are just way too black. I realize at this time of day they would be darker, but there is just too much contrast between the shadows and non shadowed ground.

 

Second, the water turns white if you directly face it, more than likely is a result of the sun being reflected? Is there anyway to make the sun be like a circular spot..like in real water? I don't know..but it all turning white for such a big angle range really doesn't look good. I suppose if we get water ripples it might look a lot better.

Here's another shot of it:

http://img.photobucket.com/albums/v59/ffle...r/newlight3.jpg

(goes superb against the ugly buggy blackness beyond..god i hate that bug >.<)

 

 

Can I edit that .xml file to change the blackness on the character's skin? If so what do I have to edit exactly? I don't know what values that'd be...

Share this post


Link to post
Share on other sites

Indeed, the fact that the water becomes white all at once is because the water modelled perfectly flat, and a perfectly flat surface that has specular reflection, as you would guess, acts like a mirror. Unfortunately, OpenGL draws exactly what you tell it to :) The solution is normal maps, which Xaphier is implementing. In water, you would want animated normal maps.

 

Sure, you can change the lighting for yourself :( First off, open up material_metadata.xml. There's a comment at the top that explains what you're looking at. For the characters, I made it so that their heads are made of either the material "Matte skin" (search for Matte skin to see that material) or "Shiny skin" (likewise, just search for that to find it). I arbitrarily decided to make orchan and draegoni heads shiny, and human, elf, dwarf, and gnome heads matte. Of course, you're the graphics gal, so you decide how you want everything :) I assigned the rest of all of the bodies to be the material "Matte cloth". To lighten up the shadowy parts of the clothing, raise the ambient level until it looks how you want. You can also lower the diffuse. To recap terms:

 

Emission: Illumination on the material that shows even when there's no ambient light in the scene

Ambient: Illumination on the material that shows when the object is in shadow, but requires scene ambient to be visible.

Diffuse: Illumination on the material that shows when the object is in direct light, but isn't "shining"

Specular: The reflective shine of the material. A little specular goes a long way.

Shininess: How "tight" the shine is. A low shininess makes a broad, weak shine, while a high shininess makes a tight, bright shine.

 

Now, for adjusting shadows in general: not only can materials have properties, but scenes can as well. Let's assume that you're in contmap1.elm. If you search for contmap1.elm, you'll find that it's in a scene properties section called "Grass and trees". Since grass and trees aren't very reflective, the ambient lighting in these scenes is lower than, say, in a snowy scene. The ambient is also a touch greener than it would be otherwise to simulate radiosity (http://en.wikipedia.org/wiki/Radiosity). All scenes have a bit of extra blue in the ambient because of the sky. So, if you want to make the shadows in this type of scene look less dark, you simply need to turn up the scene ambient. As you'll see, there are three types of ambients, three diffuses, and three speculars: one of each for day, one of each for dawn, and one of each for night. I.e., you can set how it's going to look at night, and as the sun rises, it'll blend into your dawn colors, and then as the sun keeps going up, it'll blend into your day colors, then back down to your dawn colors in the evening, and then back to your night colors.

 

Any problems or questions that you have, by all means, let me know. :)

 

 

Ed: Oh, and feel free to play around. For example, take the skin textures and, say, make them bright green with a strong specular shine, or whatnot. Have fun, play around, and get a hang on what different types of material properties look like.

Edited by KarenRei

Share this post


Link to post
Share on other sites

BTW, Xaphier is working at a material system too (different than yours), which will be mainly used at a texture level, rather than groups of textures/objects.

 

So one day we should go together in game and talk about their interoperability and stuff.

Share this post


Link to post
Share on other sites

Ok I played with the settings and changed some stuff in this file. You can take my version here:

http://www.eternal-lands.com/misc/material_metadata.xml

 

It's looking better, definetly not as black now, but I'm just experimenting right now too.

Just for clarification what do the numerical values stand for? I assumed it is R, G, B, Alpha, in that order left-right.

 

 

Also you mentioned that the way our 3d objects are everything is set to being smooth...but on the character models it looks anything but smooth, the shadows look horrible(always was like this with the shadow mapping) :devlish:

http://img.photobucket.com/albums/v59/ffle...appyshadows.jpg

 

Why aren't the normals smoothed? Is it just that it needs a lot more polygons to be smooth? Can't it be made smooth somehow? It's so bad that if you zoom in you have to turn off the shadows if you want to take a nice screenshot or just look good at all.

Share this post


Link to post
Share on other sites

Sorry for the delay -- Christmas vacation and all. Plus, I went and got my eyes lasered :blush:

 

Yes, the order is R, G, B, A.

 

This patch doesn't change the shadowing system -- only material properties. If shadows looked bad before, they're still going to look bad.

 

What lack of smoothing are you referring to? Is it something that you see with shadows off or not? If you only see it with shadows on, it's a shadow mapping problem. If it shows up when shadows are off, then it would seem that the facets of the objects in question have disjoint vertices, and I'll need to investigate further.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×