Mesh Combiner

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Lonesome Ducky wrote:Ok, here's the updated code. It doesn't completely get rid of black lines, but it makes them far less noticeable. I think the black lines are inevitable with a texture atlas.

http://dl.dropbox.com/u/4241114/NewMeshCombiner.zip
Thanks, I'll try it out soon (bad tummy ache, can't concentrate at all :| ).
Working on game: Marrbles (Currently stopped).
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Okay, I've just tried it out, and now it looks even worse:

Image

also the fps is down a lot, from ~2100 to ~1400

sticking to the version with black lines looks more attractive.
Working on game: Marrbles (Currently stopped).
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

It being cut off is because your camera doesn't have a high enough far value I think. But from what's visible, it seems to look much better. Try messing with the lodbias value it sets for the material too to prevent it from looking so sharp.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Lonesome Ducky wrote:It being cut off is because your camera doesn't have a high enough far value I think. But from what's visible, it seems to look much better. Try messing with the lodbias value it sets for the material too to prevent it from looking so sharp.
It doesn't look better at all when in motion, If I move cam it looks like its a TV noise effect just in more colors, and as I said the fps is a lot lower :?

what about not using texture atlases?
Working on game: Marrbles (Currently stopped).
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

The fact that it's so sharp is an effect of the LODBias change. Find it in the combine code and either delete it or make it a smaller value. As for not using a texture atlas, it's not really an option :lol: Without it, I'd have to switch textures on the graphics card and could not batch the meshes, defeating the speedup of the class.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

tried -10000,-1000,-100,-10,-8,-1,-0.1,-0.01,1,8,10,100,1000,10000 and without any. All looked the same to me :/
Working on game: Marrbles (Currently stopped).
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Hmm, beyond that the code shouldn't be doing anything to make the texture look so sharp. Could you perhaps try it with the original test project and see if it causes the same problem? Here's what it looks like for me: http://i117.photobucket.com/albums/o73/Azail/view.png
Tried with all renderers and I can't reproduce the effect you're having.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Here's what I've got from that sample with your textures:
Image

It looks better when different textures are used, though when I use the old texture in that sample the output looks kind of the same as before.

I think I could get away with this using some kind of post processing :)
Working on game: Marrbles (Currently stopped).
Max_Eden
Posts: 2
Joined: Sat Feb 26, 2011 2:57 pm

Post by Max_Eden »

Nice baking machine! Thanks a lot..
BUUUUUUT!
Looks like it doesn't works with some meshes.
It turns my pretty garden
Image
into this
Image
Here is example
http://www.mediafire.com/file/d6krs6hgc ... mbiner.zip
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Hi,

first of all: nice project, gives a real performance boost in my case. I tried to integrate it into my RandomForestGenerator demo project yesterday, and it shifts the framerate from 13 to about 180 by combining 1010 trees into 1 mesh. I just have a Z-Buffer problem (I guess). Here's an image:

Image

The trees are all about equal in size, and they are shown in the wrong order. OK, the image doesn't show the problem that well, so I uploaded a zip file to show the problem:

http://bulletbyte.de/download/combine_problem.zip

I hope someone can help. Otherwise I'd have to write my own Combiner ;)
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Post by REDDemon »

shouldn't this be a Material problem? certain materials requires Z sorting of nodes before rendering. I think it will work correctly only using meshes wich have just the same material with different textures. And will not work for materials that requires Z sorting.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Use the ALPHA_REF material for leaves, otherwise you will get these problems. Meshes are not sorted internally, so rendering in the wrong order can happen in huge meshes.
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

hybrid wrote:Use the ALPHA_REF material for leaves, otherwise you will get these problems. Meshes are not sorted internally, so rendering in the wrong order can happen in huge meshes.
That change fixed it. I'm still impressed with the performance boost, I have updated my RandomForest plugin demo. I hope it's OK that I included the snippet in the code and download version.

Now I think I'll go my "normal way": wrap this code up in a scene node and create a plugin for IrrEdit. I prefer to have as much as possible configurable from the editor instead of the actual code.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

A month later, sure! It's no problem to use it in your code download. I wrote this code to help people, not for recognition; so if it helps you help people, that's even better!
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Lonesome Ducky wrote:A month later, sure! It's no problem to use it in your code download. I wrote this code to help people, not for recognition; so if it helps you help people, that's even better!
Heh, I made my own combiner using your's just that mines doesn't use texture atlas and thus I don't have any more of those mip map glitches :)
Working on game: Marrbles (Currently stopped).
Post Reply