WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-05-2013, 07:44 AM
iva iva is offline
Member
 
Join Date: Mar 2013
Posts: 10
Okay, I cannot edit my message, but I solved the problem and here is my code:

Code:
import viz

viz.go()
view=viz.MainView
viz.MainView.setPosition(-1.5,2.5,-6)
viz.MainView.setEuler(0,10,0)
viz.fov(70)

scene=viz.add("piazza.osgb")



WALL_SCALE = [1.6, 1.87, 1]

wall = viz.addTexQuad(size=1.87)
wall.setPosition( [-2, 0, 0] )
wall.zoffset(1) #avoid zfighing, make wall appear behind pictures
wall.setScale( WALL_SCALE )


wallL = viz.addTexQuad(size=1.87)
wallL.setPosition( [-3.5, 0, -1.5] )
wallL.setEuler(-90,0,0)
wallL.zoffset(1) #avoid zfighing, make wall appear behind pictures
wallL.setScale( WALL_SCALE )

wallR = viz.addTexQuad(size=1.87)
wallR.setPosition( [-0.5, 0, -1.5] )
wallR.setEuler(90,0,0)
wallR.zoffset(1) #avoid zfighing, make wall appear behind pictures
wallR.setScale( WALL_SCALE )




male = viz.add('vcc_male.cfg')
male.setPosition([-2, 0,-1.5])
male.state(9)

logo = viz.add('logo.ive',pos=(0,3,6))
logo.addAction(vizact.spin(0,1,0,45))
logo.scale(0.5, 0.5, 0.5)
# Create render texture
tex = viz.addRenderTexture()
texL = viz.addRenderTexture()
texR = viz.addRenderTexture()

# middle cave wall
cam = viz.addRenderNode()
cam.setSize(512,512)
cam.setInheritView(False)
cam.setPosition([0.0, 2.0, 0])
cam.lookAt([0,2,33])
cam.setFov(60,1.0,0.1,100)
cam.setRenderTexture(tex)
cam.setRenderLimit(viz.RENDER_LIMIT_FRAME)
wall.texture(tex)

# left cave wall
camL = viz.addRenderNode()
camL.setSize(512,512)
camL.setInheritView(False)
camL.setPosition([0, 2.0, 0])
#camL.setEuler([-90,0,0])
camL.lookAt([-19,2,11])
camL.setFov(60,1.0,0.1,100)
camL.setRenderTexture(texL)
camL.setRenderLimit(viz.RENDER_LIMIT_FRAME)
wallL.texture(texL)

# right cave wall
camR = viz.addRenderNode()
camR.setSize(512,512)
camR.setInheritView(False)
camR.setPosition([0.0, 2, 0])
camR.lookAt([19,2,11])
camR.setFov(60,1.0,0.1,100)
camR.setRenderTexture(texR)
camR.setRenderLimit(viz.RENDER_LIMIT_FRAME)
wallR.texture(texR)
I was trying to have a mini-cave inside of my scene, this is good enough
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Texture Coordinate Generation (TexGen) using Shader goro Vizard 1 05-31-2013 02:44 AM
How to render a texture of the transparent object and then blur it whj Vizard 1 09-25-2012 04:15 PM
Avatar texture swaping sleiN13 Vizard 5 06-24-2011 01:48 AM
How to apply shader and render texture to an object whj Vizard 0 04-23-2010 01:23 PM
Copying Scene? Brett Lindberg Vizard 0 08-29-2009 12:56 AM


All times are GMT -7. The time now is 02:38 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC