Jump to content
Eternal Lands Official Forums
KarenRei

-DNEW_ALPHA bugs

Recommended Posts

A few bugs from -DNEW_ALPHA

 

1. Leaves on deciduous trees are abnormally sparse.

 

Old:

http://www.daughtersoftiresias.org//progs/...rency_tree2.jpg

 

New:

http://www.daughtersoftiresias.org//progs/...arency_tree.jpg

 

2. Some plants have unusual borders aroung their leaves:

 

Old:

http://www.daughtersoftiresias.org//progs/...cy_borders2.jpg

 

New:

http://www.daughtersoftiresias.org//progs/...ncy_borders.jpg

 

3. Haystacks are translucent.

 

New:

http://www.daughtersoftiresias.org//progs/...parency_hay.jpg

 

 

List more as you come to them; I will as well.

Share this post


Link to post
Share on other sites

A few bugs from -DNEW_ALPHA

 

1. Leaves on deciduous trees are abnormally sparse.

 

Old:

http://www.daughtersoftiresias.org//progs/...rency_tree2.jpg

 

New:

http://www.daughtersoftiresias.org//progs/...arency_tree.jpg

 

2. Some plants have unusual borders aroung their leaves:

 

Old:

http://www.daughtersoftiresias.org//progs/...cy_borders2.jpg

 

New:

http://www.daughtersoftiresias.org//progs/...ncy_borders.jpg

 

3. Haystacks are translucent.

 

New:

http://www.daughtersoftiresias.org//progs/...parency_hay.jpg

 

 

List more as you come to them; I will as well.

Yes, some of the models have changed their looks, part of that will have to be addressed in the models.

 

If you are going to be looking at -DNEW_ALPHA make sure you do NOT use -DNEW_LIGHTING in any of the new or old screenshots.

 

Also, those screen shots look like messed up shadows as well? Maybe thats related to the shadow problems that have recently crept in?

Share this post


Link to post
Share on other sites

And what Learner said, let's not use ANY option that is not supposed to be in this update, we are already late with this release.

Share this post


Link to post
Share on other sites

Don't worry about the "tiled" look -- that's due to this laptop's funky video card. It's always been that way. It doesn't happen on my other computer with a more normal vid card. All that matters is the transparency.

Share this post


Link to post
Share on other sites

Default plus NEW_LIGHTING. But, as I mentioned, it's always looked like this, even before I started coding here. As long as shadows are on, you get the tiling effect on this card.

Share this post


Link to post
Share on other sites

Well, like I said, let's not try options that are not going to make it in this update. So can you compile without that and see if it works?

Share this post


Link to post
Share on other sites

Another thing that we can notice on the screenshots, especially on the last one with the translucent haystacks is that the triangles are not displayed in the good order. But as sorting triangles according to the Z distance is quite heavy to do, some objects have to be modified in order to sort at least the triangles from the ground to the sky. I don't know if such a thing is scheduled or not so I say it just in case...

BTW, the objects have to be sorted according to the Z distance because sometimes you can have close objects that are displayed before far objects and if the closer objects have some transparency, the result will be bad...

I can't do it now but I'll try to catch the problem by a screenshot this evening.

Share this post


Link to post
Share on other sites

Yes, the problem you described happens a lot with semi transparent objects. Not only that they flicker with themselves, but with others as well. So to do it properly, all the vertices in the scene must be sorted each time the camera moves/rotates, which is not so practical..

Share this post


Link to post
Share on other sites

This happens on both my systems, with any set of compile options. Besides, the lighting only affects lighting, not translucency. I just leave it on because it's so much prettier than the flat default and how reliable it is (in comparison to NEW_ALPHA and NEW_WEATHER)

Edited by KarenRei

Share this post


Link to post
Share on other sites
Yes, the problem you described happens a lot with semi transparent objects. Not only that they flicker with themselves, but with others as well. So to do it properly, all the vertices in the scene must be sorted each time the camera moves/rotates, which is not so practical..
Sorting all the vertices/faces is too time consuming, you'll see the framerate collapse. But at least the objects should be sorted which should be very fast and will already remove a lot of problem.

 

Then about the triangles inside a same object, the best way I see is to sort the faces using several criteria:

  • the first triangles in the list should be the ones that have no alpha blending
  • then the blended triangles should be sorted in a way in order that they will always display in the good order despite of the point of view:
    • First method: as we view the scene always from the top, the triangles can be sorted from the ground to the sky. This will remove some of the problems but not all of them and it will not work when the objects are rotated along X and Y axis.
    • Second method: store the 3 sorts according to the 3 axis then chose the best one according to the point of view and the rotation of the object. :icon13: It will take a bit more memory but I think it's the best way to do it. And BTW, it will also work for all other fully transparent objects.

Share this post


Link to post
Share on other sites

Yes, but what will you do when two objects are crossing eachothers bounding boxes? Which one has priority? No matter how you sort them, you'll still have flickers.

Share this post


Link to post
Share on other sites

Yes of course. After, it's just a matter of choice between performance and quality...

I'm not a specialist in 3D visualisation but such problems interest me so I'll try to search on the web to see how people generally solve this. But I doubt that they sort all the triangles of the scene. They should use special structures to avoid this...

Share this post


Link to post
Share on other sites

I'll be very interested if you find a way to do so..

I think other games solve this problem simply by not having many semi transparent stuff in the game :)

Share this post


Link to post
Share on other sites

A few bugs from -DNEW_ALPHA

 

...

 

2. Some plants have unusual borders aroung their leaves:

 

Old:

http://www.daughtersoftiresias.org//progs/...cy_borders2.jpg

 

New:

http://www.daughtersoftiresias.org//progs/...ncy_borders.jpg

 

...

 

 

I was just going to post just this one, as I sit alot by the toadstools in SRM I see a plant there always having this effect, very clearly so I could get a better screenshot but that doesn't solve the problem.

 

Maybe this is of interest:

http://www.devmaster.net/forums/archive/in...php/t-4696.html

 

A quote of interest: "Most rendering systems do not correctly handle intersecting transparent objects; as roel mentioned, depth peeling is the way to do this, but it is relatively slow and it is not easy to detect when it should be applied. Ordinarily z-sorting is enough and that is all that most graphics engines do.

 

In other words, if your users make transparent objects intersect and don't split them into enough sub-components for z-sorting to work, it's their own fault :)"

 

Which seems to mean that this guy is refering to major rendering engines actually using z-sorting, so maybe there is a solution for it that isn't that super CPU demanding. And that the win for fixing the problem period is futile as it becomes too big performance loss, with "depth peeling".

 

Also this:

http://www.gamedev.net/reference/articles/article883.asp

 

Old and maybe you all have a clue about it allready but well, maybe a good read.

 

And:

http://www.gamedev.net/reference/list.asp?categoryid=129

http://en.wikipedia.org/wiki/Painter%27s_algorithm

Edited by Beaverhunter

Share this post


Link to post
Share on other sites

Thank you for the references Beaverhunter. I didn't know the depth peeling technique so I searched over the internet and found a good article from nVidia that explain it. It's very interesting but unfortunately (like the other guy said) it's way too slow because you have to draw the scene several times in order to get all the different transparency layers.

 

So the z-sorting technique is still the best one it seems and from what I read on the web, people sort all their triangles according the 3 axis when they have static scenes and then look for the best direction while rendering. BUT, most of the time, all the triangles they sort are quite similar and they have the same texture (grass field for example) so they don't lose time making OpenGL calls to switch textures and such things. And as you said Ent, most of the time, they also avoid to do too much transparency! :D

 

If we look what we have in our case, we have a lot of triangles which belong to different objects with different rotation/translation matrices and different textures. So even if we sort all the triangles in the scene, we'll lost a lot of time switching matrices and textures for each triangles so this method has to be forgotten IMO.

 

So as a conclusion:

  • for a perfect rendering, use depth peeling which will also handle collisions between triangles but which will also be very long because it requires a lot of passes.
  • for a good rendering that take care of objects collision but not triangles collisions, use a z-sorting on all the scene but it will be very slow because of too many OpenGL calls.
  • for an acceptable rendering in quality and speed that don't handle any collisions but that deals well with objects at different depths and triangles inside each objects, use z-sorting on objects at each render pass and a static sorting of triangles inside each objects.

Share this post


Link to post
Share on other sites

Related to this alpha bug, I've noticed that if you are near some bushes that are one into another and rotate the camera, it will flicker a lot.

Share this post


Link to post
Share on other sites

Well, two of the three alpha bugs that I reported don't require any of this :lipssealed: The haystack should simply be made non-translucent, and the deciduous tree leaves need to be made denser so that they don't look like trunks with a thin dusting of leaves around them.

Share this post


Link to post
Share on other sites

(originally posted in the wrong spot, sorry :P)

 

Noticed something odd on IotF. See the picture here:

 

http://picasaweb.google.com/Julia.R.Taylor...035605652548114

 

You can see thru the first teepee, see the teepee past it, and thru that one to the snow pile behind it, but you can't see the black tent in between the two tee-pees.

 

I was using the most resent CVS compiled by Blackthorne on April 29th, and this screenshot was taken just after the server update.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×