World Machine Community

Sharing => Macros and Plugins => Topic started by: lwiseman on October 04, 2011, 03:55:28 pm

Title: Rotator
Post by: lwiseman on October 04, 2011, 03:55:28 pm
Hey guys, I figured posting here would get more views.

I've generated a series of colormaps and heightmaps for a bunch of objects I wanted to place on terrains, but I wanted their placement to convey a natural appearance and having them all facing the same direction was hindering me. I found Rhalph's clever rotation macro that helped some, but it could only rotate in 90° increments. So I expounded on Rhalph's idea with this (http://www.ocf.berkeley.edu/~fricke/projects/israel/paeth/rotation_by_shearing.html) link to create a plugin that can rotate in arbitrary degrees between 0 and 45 (other angles are achievable in combination with Rhalph's macro).

There's a catch, though. Without trigonometric devices I'm losing edge information (see details here (http://forum.world-machine.com/index.php?topic=1461.0)). I think it's currently good enough for my application (and possibly yours), but if someone could provide a basic trigonometric device or help me with my environment, it could be better.
Title: Re: Rotator
Post by: lwiseman on October 06, 2011, 03:09:51 pm
Thanks to Remnant's help I got this to work correctly.

Before:
(http://i.imgur.com/VwrFi.png)

After:
(http://i.imgur.com/DfrJq.png)
Title: Re: Rotator
Post by: Stephen on October 07, 2011, 01:53:16 pm
good stuff.

one of the things I've wanted to do in mid-term feature planning is introduce the concept of local-space maps and bitmaps that are detached from the world represented in WM. You could then, for example, splat height features around your world according to a distribution map, or do the same for texure features.
Title: Re: Rotator
Post by: WizardExt on May 08, 2012, 05:42:19 am
Sorry for bumping this thread, but I have problem loading this macro in World Machine. "There was an unknown error loading this macro" / "Please select a valid macro device first".

Another question concerning macros. Are they placed in the World Machine Documents folder in My Documents or where the program was installed. Both of the locations have macro folders.

Thanks.
Title: Re: Rotator
Post by: Stephen on May 15, 2012, 03:20:00 pm
Hi there,

your macros are placed in the WM documents folder under your username. The one in the program files directory is the "stock" macro folder that it creates each users repository from.

Regarding the first problem, sometimes macros produced in earlier versions of WM are not loadable. When I have found an incompatible macro I have created the upgrade path so if you can post the offending one here I can see what I can do
Title: Re: Rotator
Post by: jaf on May 16, 2012, 01:21:55 pm
Hi Steven,

I get the "There was an unknown error loading this macro." message with Rotator.  I put the .dev and .dll in     
"C:\GRAPHICS\WorldMachine\WorldMachineDocuments\Macros"
which is the path set in my preferences "Paths" for macro storage.  This is with Beta 2.3 x64.
Title: Re: Rotator
Post by: Stephen on May 16, 2012, 02:47:29 pm
Ah, of course. I'll take a look and see what I get out of it.
Title: Re: Rotator
Post by: Stephen on May 18, 2012, 07:10:18 pm
Jaf,

I'm able to load and use this macro without incident in WM 2.3 B3.
Title: Re: Rotator
Post by: jaf on May 19, 2012, 10:02:55 am
I still get the error but.....

Maybe I didn't install the latest update correctly.  I downloaded it and ran it over the previous beta.  Should I have uninstalled first before installing?
Title: Re: Rotator
Post by: jaf on May 19, 2012, 04:08:04 pm
I used Revo Uninstaller and removed every trace of World Machine.  Then I re-installed WM2 using the the following:

WM2_Professional
WM21_Professional
WM215P_Upgrade
WM22_Professional
WM22_Professional_hotfix1

I set up the Paths as follows:

C:\GRAPHICS\WorldMachine\World Machine Documents\

C:\GRAPHICS\WorldMachine\World Machine Documents\

C:\GRAPHICS\WorldMachine\World Machine Documents\Macros\

C:\GRAPHICS\WorldMachine\World Machine Documents\Presets\

.... and then ran the latest beta...

WM23_Professional_Beta3

I installed the Rotator and .dll file in the  Macros directory
   (C:\GRAPHICS\WorldMachine\World Machine Documents\Macros\)
but still get the error message (get the same error with the x32 verson..)
Title: Re: Rotator
Post by: Stephen on May 19, 2012, 05:51:06 pm
ah, OK, after paying a little more attention here I know what's up.

I was testing the macro in the first post of this thread which works fine -- the followup posted, however, depends upon having the plugin DLL available. WM 2.3 updates the core architecture and renders all previous plugins invalid -- it will have to be recompiled for WM 2.3.

So bottom line -- its just not possible to use this macro at the moment. However, as mentioned the more limited one does work fine.
Title: Re: Rotator
Post by: WizardExt on May 21, 2012, 07:20:08 am
Okay, thanks. I have gotten the macro to load now and also know where to place them. :)
As you said, Remnant, the macro from the first post works.