PDA

View Full Version : [MACRO] Working on a Directional Spread(directSpread) macro



doen
March 2nd, 2006, 05:55 AM
Hi there!

I've been baking my noodle about this for quite a while now. It is sort of a volumetric light kind of thing. Basicly it produces light rays emiting from a certain distance behind the point of origin (let's say you bind the origin to a tracked lightbulb) and are always oriented towards a point, which you can move around. So basicly you can control the direction of your rays.

It's still in development, so it's not really optimized yet. And also is missing some Onscreen controls for the points. There are a lot of things to be worked out still, but I wanted you guys to look at it and maybe share some ideas on how to improve it (you'd be really helpful, if you'd help me figure out how to make those darn onscreen controls).

There are quite a lot of parameters, that you can adjust:

spreadSource (X,Y) - the origin of the rays

direction (X,Y) - the direction point

spreadCenterOffset - the offset of the rays origin (this one is one of the more important ones)

spreadLum - Luminance Contrast of the rays

Color - these parameters are a bit weird. They'll probaby work right only for values larger than 1

alpha - adjusts the transparency level of the rays

oRadius - determines how long the rays will be (needs to be fixed with a softer edge)

spreadQuality - the quality of the rays... default is 1... the more the better, although slower :D


I also included a test render, where I linked the spreadSource point to a light origin (some random image). The white dot is the direction point.

Comments are welcome

Pnagle
March 2nd, 2006, 09:54 AM
The OSC's are easy to include, it just depends on what type of controls you want, if you want simple controler with no hassle just re-name your spreadSourceX to xCenter and spreadSourceY to yCenter, there are other types of controler that are in the manuel and are easy to implement, just take a look in the macros section.
Same goes with directionX you could just change it to xOffset and it will just make a OSC for you


Also give your Ui Higher settings than just 1, like for width and height maybe just give them some values like 720, 576 in the UI so when you click it just doesnt change it to 1

hope that helps

doen
August 20th, 2006, 10:03 PM
Hi there!

I've been working on this macro some more (it's still in development) cause I couldn't sleep, when I started thinking about it.

What I had so far, was the option to have the "shine" directed at a point. So that it was defined by 2 points and used an offset to position the source of the shine for a desired amount of pixels behind the starting point (in the oposite direction of the second point) and so directing the shine towards the point.

I've now added a function which (when enabled) calculates the relative distance between the 2 points and in that same way makes the offset relative (the closer the 2 points are, more spread the rays are...). Also there is a slider, to control the quotient of the relativity.

I've attached a sample movie and would like to hear some opinions, so I can polish the macro some more and then put it out for grabs.

Thanks.

doen
August 22nd, 2006, 07:03 PM
Ok... I've polished the Macro so it should work perfectly now. So, here it is.

I've also included a markerDot macro, which simply creates a 8pixel white colored circle, that you can move around. I used it for testing the macro (it was the source of the rays).

Any feedback welcome.

timWalker
May 13th, 2007, 06:39 PM
First of nice macro!!

I gave it a whirl today but started getting some nasty recursive evaluation errors when the macro was being used in a pretty simple tree. I took a look at your internals and found some loose nodes floating around unconnected which i believe were the cause of these errors. I tweaked your macro so that return was a select macro with the loose nodes connected to the extra inputs.

You should have a look at this when you have a chance

cheers
Tim Walker.