How to mask the front of object and render the back?

I need to mask the front half of an object ( a sphere in this case) and have the back half render. I can almost get the effect by putting the cameras’ start point in the middle of the sphere ( as shown in right half of image), but I need the view to split on Z axis.
What material properties can I put on the cube ( shown on left side) to make only the back half render?

Attachments


did you try to make the material Zinverted ?it works for me it renders the back side of sphere

Ya. I think I’ve tried every combination of Z transparent, Ray transparent, Zinvert, Alpha, Env, and Emit. ( yes, toying with emit was a grasp at straws… :cool: )
Btw, the attached image shows what I’m after if that helps ( I just removed verts. Useless for the animations I need.)
And here’s the .blend too: http://members.shaw.ca/pamric/MaskTest.blend

Attachments


you could use multiple materials, and make the material in front alpha 0.

thanks, but the images I’ll be making will be a mix of meshes and particle emitters, usually spinning, so splitting the material wont help.
I guess I should explain.
These are are for spell effects for a game. ( No announcement until release :rolleyes: )
They need to surround the game sprites, so half the animation will run at a lower depth than the sprite,and half will run on top at a higher depth.
If this can’t be done I’ll just adjust the shape and use camera start distances.

how bout if you just animate a ring of halos revolveing aorund a post. Then, when you alphaover that animation in the scene, the spell charms (halos) will appear to disappear when they go behind the sprite (which was a post).

Right train of thought, but the post leaves a sharp outline that doesn’t match whatever sprite is getting hit.
I also made a mask with a blend type texture that masked smoothly to Env at center.
Anyhow, the bosses of the game coded it to run 2 a sequence at different depths for this perpose. I guess I shoudl take advantage of it :wink:

oic. make sure you taper the outsides of the front stripe so it gives a depth illusion, to appear coming toward the camera in the center, and then away from the camera as it goes off to the right, like a ring would look.

ps-I thought Z-offset was for this, to make two surfaces, who are at the same position, force one to be slightly in front of the other. In your case, I thought you would duplicate the mesh, and make one material with a zoffset of -0.010 to put it in front, and slightly alpha so that the one with a bigger Z shows thru.

I’m not quite sure what you need, so sorry if this is useless, but why not use a cube and the difference/intersection modifier to cut all behind the Z plane?

That can be used for any mesh, but I don’t think it’ll work with particles. Though I’m sure you can use the particle settings to stop them going beyond Z=0.

why not use the difference/intersection modifier?

Interesting idea, but I can’t seem to find any documentation on that. Do you have a link about how to use that?

I thought Z-offset was for this.

That sounds promising too, but I haven’t gotten the results I need from that (yet)

Interesting idea, but I can’t seem to find any documentation on that. Do you have a link about how to use that?

Look in the modifier stack, it’s there.

I’ve just realised though that it won’t work really though. DOH!

Ah well, you can still use materials.

Blend material
colourband
0alpha to 1alpha with a sudden change
material alpha to 0
ztransp on
set the texture mapping to glob (global)
set the “map to” to alpha

Bada boom bada bing.

EDIT - doesn’t work on particles though, sorry

Nice idea to use colorband that way… I’d have tried it the hard way.
I’m adapting it to use the camera start point to do it, but I’ve leart a bit. Thanks guys:)