[fixed] [patch] - EDS_NORMALS debug

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

[fixed] [patch] - EDS_NORMALS debug

Post by pc0de »

Patch: 2838269 - Fix for EDS_NORMALS debug

This patch fixes EDS_NORMALS debug visual for CMeshSceneNode & CAnimatedMeshSceneNode.cpp. It replaces the arrow mesh with a 3D line. It also allows setting the debug normal Length & Color through ISceneNode.

Before:
Image

After: (with default normal color)
Image
Image
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

I agree, the arrow mesh is a bad way to do normals, it's too slow and covers most of the screen. Let's see what the other devs think before adding it though
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

i think its awesome btw. much better than those arrows and the options make it a win.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I like the simplicity of the line call, but the two additional parameters with members and getters/setters seem to be overkill.
Nox
Posts: 304
Joined: Wed Jan 14, 2009 6:23 pm

Post by Nox »

Hmm why? I think that these parameters may be interesting for someone. Especially the linelength.
twilight17
Posts: 362
Joined: Sun Dec 16, 2007 9:25 pm

Post by twilight17 »

Looks much better! :D
Post this userbar I made on other websites to show your support for Irrlicht!
Image
http://img147.imageshack.us/img147/1261 ... wernq4.png
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Nox wrote:Hmm why? I think that these parameters may be interesting for someone. Especially the linelength.
New functions are considered bad by default, feature creep is our enemy!
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

hybrid wrote:...but the two additional parameters with members and getters/setters seem to be overkill.
The ability to set/get the color isn't all that important to me personally, but I think having the ability to set the length has some merit. The default length of 1 looks a bit small in "09.MeshViewer.exe":

Image
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Maybe it could be a scene parameter instead?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Normals aren't all necessarily normalized so the length would be determined by the normal itself. You can have a "length mutiplier" though to adjust the length if you desire.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Steel Style
Posts: 168
Joined: Sun Feb 04, 2007 3:30 pm
Location: France

Post by Steel Style »

I think that a good thing I use to have this kind of problem while I was working on loader the arrow was too short.
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

bitplane wrote:Maybe it could be a scene parameter instead?
I like this better - saves having to update each node to a length other than the default.
BlindSide wrote:Normals aren't all necessarily normalized so the length would be determined by the normal itself
Yes, forgot about that:

Code: Select all

driver->draw3DLine(v->Pos, v->Pos + (v->Normal * DebugNormalLength), DebugNormalColor);

// replaced with:

normalizedNormal = v->Normal;
normalizedNormal.normalize();

driver->draw3DLine(v->Pos, v->Pos + (normalizedNormal * DebugNormalLength), DebugNormalColor);

pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

Updated patch (debugnormals2.patch):

1. Extract debug normal length & color from SceneManager Parameters.
2. Use normalized normal.
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

Thanks FuzzYspo0N and everyone else for the input.
Post Reply