Halo style Cloaking/Invisibility effect




Is there any way to get this effect in Bge? I know it’s possible to have a mirror texture in blender, but this seems to be the sort of opposite of that, it doesn’t give reflections, rather it lets you see through it but with distortion.

google realtime refraction
e.g. https://www.youtube.com/watch?v=jvfvCURIcT4

You can use HG1’s real time cubemap and invert the images(flip top and bottom nodes). This way you get slower, but more accurate refraction.

With the solution helluvamesh’s presented from video I’m having a problem!



I don’t see how there is a “Indentation error”… Any help? I would ask on the Youtube video, but it was made a year ago, and the person who made it hasn’t replied to the people in the comments with problems exactly like my own.

#######################################################
#    RenderToTexture.py        Blender 2.6
#
#    Tutorial for using RenderToTexture.py can be found at
#
#    www.tutorialsforblender3d.com
#
#    Released under the Creative Commons Attribution 3.0 Unported License.	
#
#    If you use this code, please include this information header.
#
######################################################


#import bge module
import bge


# get the current controller
controller = bge.logic.getCurrentController()
	
# get object script is attached to
obj = controller.owner


# check to see variable RenderToTexture has been created
if "RenderToTexture" in obj:
				
	# update the texture
	obj["RenderToTexture"].refresh(True)


# if variable RenderToTexture hasn't been created
else:
	
	## get current scene
	scene = bge.logic.getCurrentScene()
		
	# get a list of objects in the scene
	objList = scene.objects
	
	# get camera name being used for render to texture
	camName = obj['camera']
	
	# get camera object
	cam = objList[camName]
		
	# get the texture material ID
	matID = bge.texture.materialID(obj, "MA" + obj['material'])
	
	# set the texture
	renderToTexture = bge.texture.Texture(obj, matID)


	# get the texture image
	renderToTexture.source = bge.texture.ImageRender(scene,cam)


	# save RenderToTexture as an object variable
	obj["RenderToTexture"] = renderToTexture
	

And add theese string props to the material with the script on it:
Name: “material” Type: [String] Body:“material_name”
Name: “camera” Type: [String] Body: “camera_name”

Thanks! :smiley: I’ve achieved the Effect!


Nice work guys!

I’m glad that you get it working :slight_smile: