Blender Realtime Refraction And Reflection Tutorial
Описание
Hey guys its been a while :P
Anyway in this tutorial I show you how to create a realtime refraction/reflection effect using blender render to texture module! enjoy :)
LINKS:-
Vitorbablio -
http://www.youtube.com/watch?v=iLhnD3X_sWA
Script -
!! SCRIPT HAS BEEN UPDATED TO 2.69 AND WORKS !!
##################################################
### Blender 3D 2.6x Game Engine
### Taken from www.tutorialsforblender3d.com
### Edited by koala_boy166
### Video Texture ImageRender
###################################################
#import bge module
import bge
# get the current controller
cont = bge.logic.getCurrentController()
# get object script is attached to
obj = cont.owner
# check to see variable RenderToTexture has been created
if "RenderToTexture" in obj:
# get renderToTexture
renderToTexture = obj["RenderToTexture"]
# update the texture
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
Рекомендуемые видео






![[Album] Calculator - Kraftwerk Inspired Retro Electro AI Remix](/images/video/2026-07-02/53/b7/53b72a8f8e0adb0d16e751c099fa0a2c.jpg?width=640)












