PDA

View Full Version : Color edges?


kogen
10-02-2009, 02:05 PM
Hi folks,

I'm currently thinking about coloring a couple of edges in a mesh. In fact I'd like to have it the same way that is used to highlight edges in red when selecting them, or in green (UVW) or blue (Pelt UVW).

Does anybody have an idea about how one could achieve that via MXS?

Thanks in advance.

SyncViewS
10-02-2009, 02:15 PM
Hi Mirko,
as far as I know it's not possible to assign color to edges. The workaround is to use gw functions, in particular gw.polyline feeding it with an array of edges vertexes. Warning, this is a painful trip, as you will almost always get flickering issues.

See "Viewport Drawing Methods", "Viewport Redraw Callback Mechanism" in MaxScript Reference.

- Enrico

kogen
10-02-2009, 03:52 PM
Salve Enrico,

thanks for your feedback. I've already thought of Viewport drawing methods, but wasn't sure about that. I think I'll give it a try, just to see it won't work well. :(

Bobo
10-02-2009, 03:58 PM
Salve Enrico,

thanks for your feedback. I've already thought of Viewport drawing methods, but wasn't sure about that. I think I'll give it a try, just to see it won't work well. :(

There is an alternative - you can create a Manipulator (which manipulates nothing) and use its drawing functions (which are a lot more stable than gw) to draw your lines.

I had some examples in the Siggraph Master Class 2008 but I don't think that one is out.

JohnnyRandom
10-02-2009, 04:26 PM
I had some examples in the Siggraph Master Class 2008 but I don't think that one is out.

It is posted in the Learning Section of the Subscription center :)

Scripting and API:
The Secret World Of Autodesk 3ds Max: Scripted Manipulators

I had been waiting for this to come out, as I was slightly hung over when I first saw it:blush:

CGTalk Moderation
10-02-2009, 04:26 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.