Summary
I want to be able to look through an outer sphere - BlueSphere, and see another sphere inside - RedSphere
This is the target goal I'm trying to get to:
Issues
Here is what I have tried, and the problems I'm having:
1)
If I set the spheres transparency alpha values to 0.75 - then the inner RedSphere does not take on its "true" colour and shows as blue instead of red.
2)
If I set the spheres transparency alpha to lower values of 0.5
- the spheres lose their crispness which I don't want
- and the inner RedSphere still does not take on its "true" colour
{ can't paste a 3rd sample - need more reputation points }
Background
I am animating two spheres, one inside the other, superimposed about a common origin.
At the start:
- the outer BlueSphere is at full radius
- the inner RedSphere is at zero radius
As time progresses:
- the outer BlueSphere shrinks
- the inner RedSphere expands
So what happens is the expanding inner RedSphere "bursts through" the contracting outer BlueSphere.
So the effect I am looking for is to see the RedSphere appearing as Red as it expands inside the BlueSphere.
Thinking/Logic
So I figure that transparency is not the way to go.
The transparency settings are behaving correctly - as one would expect, in a "real world" situation - the inner sphere (Red) takes on the colour of the outer sphere (Blue) seeing as we are looking through a (transparent) Blue material.
Any ideas on what approach to take ?
It's almost as if I should be "removing" the part of the BlueSphere that the RedSphere "occupies" so that we see the RedSphere directly without any BlueSphere between us and the RedSphere.
Some sort of masking ??
Advice, comments, suggestions welcome. Thanks.
[requested edit]
Using internal render.
[ My End Solution - Thanks for the guidance ]
Right, so here is the way I got to my final result:
1) I created python drivers for each sphere
- I used the frame_current scene property for input
- Passed that to a scripted expression which used sin() as the scaling factor
- Used some if / elif conditionals against frame_current to make the spheres visible only when I needed them
2) I created 3 layers
On Layer-1 - background
- I put RedSphere AND BlueSphere
- with drivers driver_Outer_RedSphere() & driver_Outer_BlueSphere()
- limiting the display of each sphere to show only where each radius > halfway
On Layer-2 - foreground-1
- I put RedSphere ONLY
- with driver driver_Inner_RedSphere()
- limiting the display of RedSphere to show only where its radius <= halfway
On Layer-3 - foreground-2
- I put BlueSphere ONLY
- with driver driver_Inner_BlueSphere()
- limiting the display of BlueSphere to show only where its radius <= halfway
3) I rendered each layer to .PNG sequence [RGBA] (alpha channel for transparency)
Render Layer-1 - background
- background : [sky]
Render Layer-2 - foreground-1
- background : [transparent]
Render Layer-3 - foreground-2
- background : [transparent]
4) I brought all 3 sequences into the Video Sequence Editor
Strip-1 - background
- blend [cross]
- opacity [1.00]
Strip-2 - foreground-1
- blend [alpha-over]
- opacity [0.50]
Strip-3 - foreground-2
- blend [alpha-over]
- opacity [0.50]
5) Rendered the 3 layer final sequence to H.264
So the "aha moment" struck me right at the end when I was in the Video Sequence Editor:
- "Don't try to make the Outer Spheres transparent, and see through to the Inner Spheres"
- "Instead overlay the Inner Spheres over the Outer Spheres, and limit the opacity of the Inner Sphere overlay"
So now I see my Inner Spheres in their true colours, but the colours are muted due to the .75 opacity - and hence it gives the visual impression that the Inner Spheres are in fact inside the Outer Spheres.
Thanks all for the input - it got me going in the right direction.