WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-18-2010, 06:28 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Red face re: render nodes and scenes

Hi, I'm trying to render to contents of a second scene to a texture and apply that to a TexQuad, is this possible because if I had any hair I would have started to pull it out - here's an example of the method I have been trying so far:
Code:
viz.go()
viz.clearcolor(.9,.9,1)

#Add something to scene 2
viz.add('panorama.ive',scene=2)

renderTexture = viz.addRenderTexture() #Create render texture

#Create render node
renderNode=viz.addRenderNode(scene=2)
renderNode.attachTexture(renderTexture)
renderNode.setInheritView(False)

#Add and set Position of in-world-screen
screen = viz.addTexQuad()
screen.setPosition([-.2,1.6,2.5])
screen.setEuler([178,0,0])
screen.texture(renderTexture)
Am I missing something or is this not possible??

As usual I will be VERY grateful for any help with this issue
Reply With Quote
  #2  
Old 10-18-2010, 08:54 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Your example code is adding the render node to scene 2. Instead, you should add the render node to the main scene and have it render scene 2. The following change should do this:
Code:
renderNode=viz.addRenderNode()
renderNode.setScene(2)
Reply With Quote
  #3  
Old 10-18-2010, 01:14 PM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
thank you, I couldn't see the wood for the trees

While I'm here I'd like to check whether it's possible to use or even trap the mouse / cursor in a scene other than the first one?
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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


All times are GMT -7. The time now is 05:31 AM.


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