Jump to content
Hash, Inc. Forums
nemyax

Model Plugin: Three-Point Reroute

Recommended Posts

Three-Point Reroute

This plugin redirects the spline flow as indicated by your CP selections. Wherever you want a spline to take a specific route, select three CPs in a row: they will mark the start, middle and end of the route stretch. You can mark multiple such three-CP series at once. Finally, run the plugin: Plugins | 3-Point Reroute.

The UV layout and 5-point patches are preserved by the operation.

Here’s a video of the plugin in action:

https://drive.google.com/open?id=0B___ge5IO2JdaHRLWWpId01Yc0E

The plugin was co-authored by me and Hellraiser. He is a real C++ programmer who had no prior experience with CGI software development, and I’m the reverse. Now we’re both the better for it.

 

Download and Setup

Important: The plugin works only with A:M 18.0p+ and later. 18.0p and earlier are not supported.

For 64-bit A:M (Windows)

For 32-bit A:M (Windows)

To install the plugin, put the correct (either 32-bit or 64-bit) .hxt file in the \HXT folder.

The .hxt files were built with Visual Studio 2015 Community Edition.

There won’t be a MacOS X build. If you want to try and create one, I can provide the sources on request.

 

Notes

  • The API offers no way to detach stacked CPs at this time, so the plugin leaves behind harmless garbage splines in some situations. If the necessary method is added in a future update (see also issue 6689), this might change; whether or not it will depends on how detaching affects decaling.
  • Unlike spline curvature, the UV layout isn’t affected by the operation, so the look of the texture can change. But seeing as the main use case for the plugin is to fix crappy automatic splining of imported geometry, where textures are distorted to begin with, the rerouting will likely improve the decaling rather than ruin it.
  • Hellraiser added a second way to invoke the plugin: the Ctrl+Alt+F3 hotkey. He implemented it because he can (or in the words of robcat2075, It Can Be Done), and even though it’s hardcoded, I don’t think anyone will mind.

 

Credits

Hellraiser

  • Jump-starting me on Visual Studio and the A:M SDK environment setup
  • Valuable C++ advice
  • MFC magic and WinAPI sorcery

nemyax

  • Idea and C++ implementation

 

Share this post


Link to post
Share on other sites

Thanks to both of you!

 

May you have additional collaborations!

 

  • Hellraiser added a second way to invoke the plugin: the Ctrl+Alt+F3 hotkey. He implemented it because he can (or in the words of robcat2075, It Can Be Done), and even though it’s hardcoded, I don’t think anyone will mind.

     

  • Is it possible to make that configurable?

 

 

 

There won’t be a MacOS X build. If you want to try and create one, I can provide the sources on request.

 

 

 

I believe Steffen can do that if he has the code.

Share this post


Link to post
Share on other sites

Thanks!

Installed and operational. :)

Share this post


Link to post
Share on other sites

Very cool and helpful :). Thank you both very much!

 

See you

*Fuchur*

Share this post


Link to post
Share on other sites

Is it possible to make that configurable?

Hellraiser would have the details, but long story short, it would be a lot of work, because a whole new configuration mechanism would have to be knocked together. The cheeky little hack would turn into a giant bullying Hacky McHackfaceski, and it still wouldn't solve the problem of hotkey conflicts.

A good long-term solution would of course be to add hotkey support for plugin calls (not necessarily in the UI; text-editing the main hotkey config file would be fine). In the short term, I can rebuild the plugin with a hotkey that everyone likes better =)

Share this post


Link to post
Share on other sites

 

Is it possible to make that configurable?

 

A good long-term solution would of course be to add hotkey support for plugin calls

 

Add a feature request for that in v19 when v19 begins beta

Share this post


Link to post
Share on other sites

Add a feature request for that in v19 when v19 begins beta

Can I apply for the beta?

Share this post


Link to post
Share on other sites

 

Add a feature request for that in v19 when v19 begins beta

Can I apply for the beta?

 

The beta will be open to everyone.

 

However, I have added the request to V19. Issue 6690

Share this post


Link to post
Share on other sites

Just tested the plugin with a whole lot of different situations and it works perfectly. I wish I already had it for the cow model I had to fix after import from an OBJ a few years ago...

Next time you start earlier with releasing those cool plugins, okay? ;-)

 

I have a small feature request, but if it would not make sense to you, it already is a great, very helpful plugin:

In the images, I show what I am talking about: It would be great, if you could do it in one go with the whole "intentional" spline.

 

See you

*Fuchur*

3p_reroute_01.jpg

3p_reroute_02.jpg

3p_reroute_03.jpg

3p_reroute_04.jpg

3p_reroute_05.jpg

3p_reroute_06.jpg

Share this post


Link to post
Share on other sites

Fuchur

In your example, both routes can be corrected in one go, because there's a CP between them. Just select the two stretches and run the plug.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...