tweak tool highlighting performance

General discussion about 3D DCC and other topics
Post Reply
User avatar
origin
Posts: 619
Joined: 09 Jun 2009, 11:59
Location: warsaw

tweak tool highlighting performance

Post by origin » 05 Feb 2012, 02:02

I wonder if somebody could do a simple test for me

get a cube
select all polygons and subdivide them (ctrl+d) to, say, 20k polys
zoom in to cube so you will see only few polygons covering whole view
activate tweak tool

how many FPS do you have?

because here it drops to even 2 fps and highlighting is very slow, and I'm wondering if its my computer...

User avatar
bottleofram
Posts: 355
Joined: 17 Aug 2010, 11:21

Re: tweak tool highlighting performance

Post by bottleofram » 05 Feb 2012, 02:28

Same here. Now we know why we dont have pre-selection highlighting on regular selection tools.

User avatar
origin
Posts: 619
Joined: 09 Jun 2009, 11:59
Location: warsaw

Re: tweak tool highlighting performance

Post by origin » 05 Feb 2012, 02:31

hehe ;)
thanks for confirmation
I made small (lame) patch in my extrude tool and now its highlighting up to 60x faster then tweak tool

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: tweak tool highlighting performance

Post by rray » 05 Feb 2012, 21:49

Same fps here. No idea why, but the tweak tool doesn't seem to use the component id buffers (the ones you can see by accident when antialiasing is on in the display driver settings, see attachment).

Maybe it's because it would need all 3 buffers (for polygons, edges and points), which would use a lot of video ram. Then again video ram is usually pretty big nowadays.
Attachments
pass.gif
pass.gif (62.19 KiB) Viewed 1393 times
softimage resources section updated Jan 5th 2024

User avatar
origin
Posts: 619
Joined: 09 Jun 2009, 11:59
Location: warsaw

Re: tweak tool highlighting performance

Post by origin » 05 Feb 2012, 22:38

dunno..actually picking in custom tool is quite fast (4 picks for object, points, edges and faces takes up to 40ms on 2 million poly mesh)
and since tweak tools gets slower on faces selection, I believe it's picking in similar way as custom tool picking.

btw: http://www.opengl.org/resources/faq/tec ... ection.htm

glreadpixels was raped on geforces cards by nvidia some time ago to milk cash on quadros...

and http://www.opengl.org/wiki/Common_Mista ... dback_Mode
A modern OpenGL program should not use the selection buffer or feedback mode. These are not 3D graphics rendering features yet they have been added to GL since version 1.0. Selection and feedback runs in software (CPU side). On some implementations, when used along with VBOs, it has been reported that performance is lousy.
A modern OpenGL program should do color picking (render each object with some unique color and glReadPixels to find out what object your mouse was on) or do the picking with some 3rd party mathematics library.
run tweak tool = 1 core is maxed out.

anyway, I managed, with this weird piece of code, get huge performance boost (way faster than tweak tool, for example 0.1 fps(tweak) vs 10fps(my), or 4 fps vs 100fps)
I wonder if there are any drawbacks with this 'method' and WHY is it working. Basically you slow down refreshing and you get...better performance.

Code: Select all

#define MOUSE_MOVE_TIME_DELAY = 3; //0-10..or whatever number (miliseconds)
...
CStatus MouseMove( ToolContext& in_ctxt )
	{
		CStatus l_status;
		in_ctxt.GetMousePosition( m_mouseX, m_mouseY);
		clock_t now=clock()-m_tooltime;	
		if (now>MOUSE_MOVE_TIME_DELAY) {
			l_status=GetPickData(in_ctxt,m_mouseX,m_mouseY,m_pickedSubcompPos);
			in_ctxt.Redraw(false);
			m_tooltime=clock();
		};
		return CStatus::OK;
	}

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests