Page 2 of 9

Posted: Tue Sep 14, 2010 7:47 pm
by jaeg
The examples performance is amazing but I'm having trouble compiling it with Code::Blocks. I've got the dependencies right so I'm guessing it's the incompatibilities between languages.
I'm getting errors like:

C:\Users\John\Downloads\Mesh Combiner\CMeshCombiner.h|23|error: `rects' was not declared in this scope|
C:\Users\John\Downloads\Mesh Combiner\CMeshCombiner.h|23|error: `&' cannot appear in a constant-expression|
C:\Users\John\Downloads\Mesh Combiner\CMeshCombiner.h|23|error: `>>' should be `> >' within a nested template argument list|
C:\Users\John\Downloads\Mesh Combiner\CMeshCombiner.h|23|error: `packed' was not declared in this scope|
C:\Users\John\Downloads\Mesh Combiner\CMeshCombiner.h|23|error: `&' cannot appear in a constant-expression|
C:\Users\John\Downloads\Mesh Combiner\CMeshCombiner.h|23|error: `>>' should be `> >' within a nested template argument list|
C:\Users\John\Downloads\Mesh Combiner\CMeshCombiner.h|54|error: `rectangles' was not declared in this scope|
C:\Users\John\Downloads\Mesh Combiner\CMeshCombiner.h|54|error: `>>' should be `> >' within a nested template argument list|
||=== Build finished: 8 errors, 0 warnings ===|

Posted: Tue Sep 14, 2010 7:52 pm
by Eigen
You have to change all >> to > > (with a space between).

Like this:

irr::core::array<irr::core::rect<irr::u32> >

Posted: Wed Sep 15, 2010 7:20 am
by _ph_
Thanks Lonesome Ducky for your cool special scene node!

This is what i get with 50*50 (so 2500) dwarf :

Image

_ph_

Posted: Wed Sep 15, 2010 2:28 pm
by jaeg
Thanks Eigen. I should probably learn to take a closer look at the error messages. I thought at first it wanted me to turn all >> into just > and well that just made an even bigger mess. I got it working now thanks. :)

This will prove very helpful for my city I've been working on. I've been having a terrible time with all the segments I've been using to form the roads slowing things down this will make things so much easier.

EDIT

I have a question. Can I do my collision detection the same as before or is there a why to do the detection with the combined mesh?

Posted: Wed Sep 15, 2010 7:37 pm
by pepeshka
Awesome work Ducky, thanks!

Posted: Mon Sep 20, 2010 3:24 pm
by DGENXP
This is potentially a great piece of code but i find when i compile and run it i get no FPS Boost whatsoever though i tried the examples and they clearly did is there something specific i have to do to get this running at the optimal speed because i fail to see it?

Posted: Mon Sep 20, 2010 4:41 pm
by slavik262
Combining meshes just reduces overhead if there's a large number of meshes, since drawing each individually wastes time. If you have a relatively small number of meshes or a fast processor, the boost may be negligible.

Posted: Mon Sep 20, 2010 5:02 pm
by DGENXP
I understand the concept of this the problem is however the source code does not increase the frame rate on my computer - the pair of exe files shows the difference clearly 24FPS on the Scene node 700+ on the combiner file but the code does not seem to increase the frame rate, it is like the scene node one - is there something I need to change in the code to get the Frame rate boost or a button to press to activate it??

Posted: Mon Sep 20, 2010 5:30 pm
by slavik262
Dumb question, but do you have vsync enabled?

Posted: Mon Sep 20, 2010 9:03 pm
by Lonesome Ducky
Less than ~800 nodes will not be a significant speed increase.

For testing it out from the source, there should be a line:

Code: Select all

bool useMeshCombiner = false
set it to true to use it, and vice versa.
jaeg wrote: I have a question. Can I do my collision detection the same as before or is there a why to do the detection with the combined mesh?
It can be done the same way, although it would be wise to turn it into an OctreeMesh to make collision detection faster.

Posted: Tue Sep 21, 2010 4:48 pm
by barakatx2
This is an awesome library! It saved me a huge headache but I am having one problem with it. I think this might be because I'm combining grids of cubes into one mesh. Can you take a look at this and see if you recognize why there are lines between the tiles? I have tried adjusting the texture padding but the lines do not go away.

Image

Posted: Tue Sep 21, 2010 8:10 pm
by pepeshka
barakatx2,

I had a similar problem - are you changing your camera's near value? If so, try leaving it default.

Posted: Tue Sep 21, 2010 8:17 pm
by barakatx2
pepeshka wrote:barakatx2,

I had a similar problem - are you changing your camera's near value? If so, try leaving it default.

Code: Select all

scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS(0,50.0f,0.1f);
cam->setPosition(core::vector3df(0.0f,10.0f,0.0f));
That's all I've done with the camera for the screenshot I took. I checked what the near value is for that camera and it is 1.0. Is that the problem?

Posted: Tue Sep 21, 2010 9:04 pm
by Lonesome Ducky
Try using the tiling texture padding technique, and set the texture padding to a very large amount. This problem haunted me the whole time, and tiling with huge texture padding is the only solution I could find, sorry :cry: . I'll take a look at my code again and see if I can find a better solution, but that's all I can think of for now.

EDIT: If irrlicht has a way of changing MipMap bias, you can change it to a further value as well.

Posted: Tue Sep 21, 2010 9:11 pm
by barakatx2
Lonesome Ducky wrote:Try using the tiling texture padding technique, and set the texture padding to a very large amount. This problem haunted me the whole time, and tiling with huge texture padding is the only solution I could find, sorry :cry: . I'll take a look at my code again and see if I can find a better solution, but that's all I can think of for now.

EDIT: If irrlicht has a way of changing MipMap bias, you can change it to a further value as well.
Actually, I just tried this without combining all the nodes and just having the nodes separate, and it has the same visual problem. So this has nothing to do with your combiner, sorry! I would still like to figure out why it is doing that though. I will make a new post in the beginner's help section.