...LIGHTING IDEA!!!

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Rai López
Posts: 2244
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

...LIGHTING IDEA!!!

Post by Rai López »

Uf... :idea: Definitely thit is my best! :roll: Pay attention and I'll treat to explain me... ejem... Well, everybody knows that Gradient Effect has animatable parameters, isn't? (I've put "animatable" in italic cause it doesn't create keyframes... a weird thing, but doesn't matter in this case, a little unusefull for that in other purposes, but well...) HERE I GO! What about an embedded script that can change that parameters a long the time?? The trick it'll be in create a certain Gradient Style called Lighting (i.e) with semitransparent write in "Color 1" box and semitransparent black in "Color 2" box that we could animate in the time for intensity/ ambient, temperature or direction... and, here is the more important thing, the gradient Angle could be animated in base of the position of a certain layer called Light (i.e) ...Maybe with the interactuation of several lights with diferents Styles (Lighting Style 1, 2, 3...) and diferent Light Layers (Light 1, 2, 3...) You could apply that Lighting Styles to that shapes that you want to be affected by the Light and animate the Light Layer for LIGHTING SIMULATION! :D (maybe too applicable to Shadow /Shading Layer Effects) ...Yes, I know that all this would be a "UN-preview" function (maybe best for preview frame rate), but anyway I think that can be a USEFULL and AWESOME feature that could help a lot in the ambient recreation and more rich final end animation... now Moho has the tools (Animatable Styles, Animatable Gradient parameters and Embedded Scripts), only need a script writer that like the idea and can write this difficult (I suppose) script... Well, now you are free to coment or add/rectify all that you want of the idea, THANKS in advance if anybody try to make it and :arrow: CIAO!
User avatar
Hiddicop
Posts: 250
Joined: Sun Nov 07, 2004 4:18 pm
Location: Sweden

Post by Hiddicop »

I've tried to find many different solutions to the lighting-"problem", also this idea. But it dosen't work.

Look at these to images:

1. Here the light source (the pinkish circle) is further away from the camera than the "wall". This works fine.

Image

2. Here the light source is placed at the same distance from the camera as the center of the "wall". Now we need a radial gradient. But what happens if isn't in the middle of the wall, but a litte closer, or a little further away? Radial gradient works only from the center.

Image

Also this won't interact with objects, causing no shadows to appear. It's a good idea, but it won't work. Not so well anyway. But keep coming up with ideas, cause there must be something that works to fix lighting with!
User avatar
Rai López
Posts: 2244
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

Well, I know about the Radial Gradient center limitation... cause of this I thought more in a Lineal Gradient, this is, light coming right, left, down or above, because direction and angle can change in the time... I know that possible results never will can be compared with the "real" lighting features of any other programs, yes... but some like this can help meantime we don't have a features like this... Anyway I'm very happy to know that there are some people here that are working about all of this! :D ...I know about the difficult, but I hope that you or other (or all together) can get something that can be a help in this lighting issue... THANKS for your point of view & interest/experiments! We must go on thinking!!! CIAO!
User avatar
bupaje
Posts: 1175
Joined: Fri Nov 12, 2004 5:44 pm
Location: California
Contact:

Post by bupaje »

I have thought of the lighting a lot and I don't think there is one easy universal solution -unless you consider asking LM to create some sort of whizbang solution easy (easy for us anyway ;) ).

One left field idea I just had was if you could export your layers as a 3D scene mapped to simple planes, light it in your 3D program and then grab this 'shadow map' and apply it as a layer in your scene. This might work well with static objects.
[url=http://burtabreu.animationblogspot.com:2gityfdw]My AnimationBlogSpot[/url:2gityfdw]
User avatar
Hiddicop
Posts: 250
Joined: Sun Nov 07, 2004 4:18 pm
Location: Sweden

Post by Hiddicop »

Okay, I might have an idea here, but I need the answer on a couple of questions:

1. Is there any way to, using LUA, calculate the distance between one object and another?

2. Is there any way to create an object at every, let say 20 pixles on every layer in a project? If I have a square and want a circle to appear at every 20 pixles on this square, creating a sort of pattern with circles - is that possible?

If the answer is yes on these two questions, then the problem might be solved. If I have a layer called "Light Source" and put it anyware. Then I could have a script that creates small and blury circles on every layer. All the circles have an alpha-value depending on their distance to the light source. If i also have a black square that covers everything and that's uneffected by camera movements, then I can simply mask the black square so that the small circles are subtracted from the mask.
User avatar
Hiddicop
Posts: 250
Joined: Sun Nov 07, 2004 4:18 pm
Location: Sweden

Post by Hiddicop »

Or, thinking twice, this might be easier doing by hand. It might get messy otherwise.
Post Reply