Mesh Combiner

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Postby jaeg » Tue Sep 14, 2010 7:47 pm

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 ===|
Computer Science Major - Ball State University
jaeg
 
Posts: 52
Joined: Thu Jun 28, 2007 11:20 pm

Postby Eigen » Tue Sep 14, 2010 7:52 pm

You have to change all >> to > > (with a space between).

Like this:

irr::core::array<irr::core::rect<irr::u32> >
User avatar
Eigen
Competition winner
 
Posts: 375
Joined: Fri Jan 27, 2006 2:01 pm
Location: Estonia

Postby _ph_ » Wed Sep 15, 2010 7:20 am

Thanks Lonesome Ducky for your cool special scene node!

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

Image

_ph_
_ph_
 
Posts: 8
Joined: Tue Aug 24, 2010 10:38 am

Postby jaeg » Wed Sep 15, 2010 2:28 pm

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?
Computer Science Major - Ball State University
jaeg
 
Posts: 52
Joined: Thu Jun 28, 2007 11:20 pm

Postby pepeshka » Wed Sep 15, 2010 7:37 pm

Awesome work Ducky, thanks!
pepeshka
 
Posts: 29
Joined: Wed Jul 02, 2008 8:42 pm

Postby DGENXP » Mon Sep 20, 2010 3:24 pm

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?
Someone once said A Jack of all trades is a master of none.

Join the Community at the RB3D Forums:

http://www.rpbuilder.org/forum
User avatar
DGENXP
 
Posts: 124
Joined: Tue Dec 27, 2005 2:49 am

Postby slavik262 » Mon Sep 20, 2010 4:41 pm

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.
User avatar
slavik262
 
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Postby DGENXP » Mon Sep 20, 2010 5:02 pm

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??
Someone once said A Jack of all trades is a master of none.

Join the Community at the RB3D Forums:

http://www.rpbuilder.org/forum
User avatar
DGENXP
 
Posts: 124
Joined: Tue Dec 27, 2005 2:49 am

Postby slavik262 » Mon Sep 20, 2010 5:30 pm

Dumb question, but do you have vsync enabled?
User avatar
slavik262
 
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Postby Lonesome Ducky » Mon Sep 20, 2010 9:03 pm

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.
User avatar
Lonesome Ducky
Competition winner
 
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Postby barakatx2 » Tue Sep 21, 2010 4:48 pm

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
barakatx2
 
Posts: 14
Joined: Tue Aug 24, 2010 7:00 am

Postby pepeshka » Tue Sep 21, 2010 8:10 pm

barakatx2,

I had a similar problem - are you changing your camera's near value? If so, try leaving it default.
pepeshka
 
Posts: 29
Joined: Wed Jul 02, 2008 8:42 pm

Postby barakatx2 » Tue Sep 21, 2010 8:17 pm

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?
barakatx2
 
Posts: 14
Joined: Tue Aug 24, 2010 7:00 am

Postby Lonesome Ducky » Tue Sep 21, 2010 9:04 pm

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.
User avatar
Lonesome Ducky
Competition winner
 
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Postby barakatx2 » Tue Sep 21, 2010 9:11 pm

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.
barakatx2
 
Posts: 14
Joined: Tue Aug 24, 2010 7:00 am

PreviousNext

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest