CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 03-02-2013, 03:46 AM   #1
CG3DOpifex
Veteran
portfolio
Derik
USA
 
Join Date: Aug 2012
Posts: 36
gw.Marker, Disable Draw On Top?

Is it possible to disable draw on top when using gw.Marker, or is there another method to use, to display something similar?

I'm trying to make sure it doesn't show over objects, polygons, ect. when its position is behind them from the current p.o.v.

Also I noticed it really drops fps in viewport, is there anyway to make it faster, or something similar that is faster?

Thanks for any information you can share.

Edit:
I tried doing this...
Code:
RenderLims = gw.getRndLimits () append RenderLims #backcull gw.setRndLimits RenderLims

but it didn't help, I guess what I thought that should do, isn't what it does.

Last edited by CG3DOpifex : 03-02-2013 at 03:50 AM.
 
Old 03-02-2013, 09:43 AM   #2
Klunk
Lord of the posts
 
Klunk's Avatar
portfolio
Klunk
United Kingdom
 
Join Date: Sep 2005
Posts: 701
how important is a constant screen size ?
 
Old 03-02-2013, 10:15 AM   #3
CG3DOpifex
Veteran
portfolio
Derik
USA
 
Join Date: Aug 2012
Posts: 36
Quote:
Originally Posted by Klunk
how important is a constant screen size ?


Fairly important, but I'm willing to find out anything even if its not.
 
Old 03-02-2013, 10:22 AM   #4
Klunk
Lord of the posts
 
Klunk's Avatar
portfolio
Klunk
United Kingdom
 
Join Date: Sep 2005
Posts: 701
 
Old 03-02-2013, 12:09 PM   #5
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,623
Send a message via ICQ to denisT
Quote:
Originally Posted by Klunk
how important is a constant screen size ?

you can make a scripted helper with custom mesh and constant size. that's what getScreenScaleFactor for...
 
Old 03-02-2013, 12:22 PM   #6
Klunk
Lord of the posts
 
Klunk's Avatar
portfolio
Klunk
United Kingdom
 
Join Date: Sep 2005
Posts: 701
I know, but don't you have to rebuild the mesh every time the viewport changes ?
 
Old 03-02-2013, 12:31 PM   #7
Klunk
Lord of the posts
 
Klunk's Avatar
portfolio
Klunk
United Kingdom
 
Join Date: Sep 2005
Posts: 701
op on an other issue #backcull would only disable back face culling try #zbuffer instead.

Last edited by Klunk : 03-02-2013 at 02:46 PM.
 
Old 03-02-2013, 02:20 PM   #8
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,623
Send a message via ICQ to denisT
Quote:
Originally Posted by Klunk
I know, but don't you have to rebuild the mesh every time the viewport changes ?

you don't have to rebuild... only scale or make transform.
 
Old 03-02-2013, 09:39 PM   #9
CG3DOpifex
Veteran
portfolio
Derik
USA
 
Join Date: Aug 2012
Posts: 36
Ok I tried what Denis mentioned, but I'm having an issue.

I made a standard dummy box, and gave it a custom param, and gave that a controller point3 script.

Here's the Expression I'm using,
Code:
--BoxHelper = the dummy box node theboxsize = ( (getScreenScaleFactor BoxHelper.pos) * 0.01) BoxHelper.boxsize = [theboxsize, theboxsize, theboxsize]


The only issue is, it's only updating the boxsize set from the expression when I move the Dummy Box.

Anyway to get it to update also when zooming / rotating / panning the view?
 
Old 03-02-2013, 09:44 PM   #10
CG3DOpifex
Veteran
portfolio
Derik
USA
 
Join Date: Aug 2012
Posts: 36
Quote:
Originally Posted by Klunk
op on an other issue #backcull would only disable back face culling try #zbuffer instead.


Also not sure what this was meant to do, all this gw is new to me, but it didnt stop the markers from drawing on top of everything.
 
Old 03-02-2013, 10:19 PM   #11
Klunk
Lord of the posts
 
Klunk's Avatar
portfolio
Klunk
United Kingdom
 
Join Date: Sep 2005
Posts: 701
I didn't think it would work on the marker I was just pointing out the correct flag to use (though it doesn't always work in the sdk either). As for the constant size thing just use a Point helper instead of the dummy and check the constant screen size.
 
Old 03-02-2013, 11:33 PM   #12
CG3DOpifex
Veteran
portfolio
Derik
USA
 
Join Date: Aug 2012
Posts: 36
Quote:
Originally Posted by Klunk
I didn't think it would work on the marker I was just pointing out the correct flag to use (though it doesn't always work in the sdk either). As for the constant size thing just use a Point helper instead of the dummy and check the constant screen size.


Ah can't believe I overlooked the point helper....
How can i get it to always be facing the camera though, I figure a lookat constraint, but what can I use to get the proper lookat value to constrain to?
 
Old 03-03-2013, 12:01 AM   #13
CG3DOpifex
Veteran
portfolio
Derik
USA
 
Join Date: Aug 2012
Posts: 36
Just found viewport.getTM() in the maxscript help, so I guess using the inverse of that for the rotation would make it always face the camera.

But I'm getting the same problem as with the boxsize of the other expression, its only updating when moved....

I'm using a scripted rotation controller of
Code:
inverse (viewport.getTM())


What am I missing?
 
Old 03-03-2013, 12:13 AM   #14
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,623
Send a message via ICQ to denisT
use manipulator... it updates on every redraw
 
Old 03-03-2013, 12:28 AM   #15
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,623
Send a message via ICQ to denisT
Quote:
Originally Posted by denisT
use manipulator... it updates on every redraw


btw... it also has built-in 'constant screen size' option
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:54 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.