WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-22-2011, 08:40 AM
tjwjtj tjwjtj is offline
Member
 
Join Date: Jul 2011
Posts: 3
Question possibility to set multiple projectors in Vizard 4.0?

Hi,

I have a 3d model loaded in Vizard 4.0. I want to project high-resolution texture images onto the 3D model in order to get more details of the surface.

Vizard 4.0 works fine with only one image projected onto the 3d model using camera yaw, pitch, roll value and camera positions. Is it possible to project multiple images onto the 3d model at the same time? and how to implement?

Thanks in advance!
Reply With Quote
  #2  
Old 07-25-2011, 12:36 PM
bennett145 bennett145 is offline
Member
 
Join Date: May 2011
Posts: 2
Mutliple Projectors

I have the same question. We would like to have several projectors running at once. Does anyone have any ideas?
Reply With Quote
  #3  
Old 07-25-2011, 03:44 PM
TarkaDahl TarkaDahl is offline
Member
 
Join Date: Mar 2010
Posts: 59
Hi

I take it you are doing something similar to the example here.

http://docs.worldviz.com/vizard/vizProjector.htm

In which case could you add something like this.

Code:
projectorTwo = projector.add(viz.add('BALL.JPG'))
projectorTwo.setEuler([0,90,0])

projectorTwo.affect(ground,textureNum=2)
projectorTwo.affect(ball,textureNum=2)

projectorTwo.ortho(0.25,0.15)

projectorTwo.setPosition([0,1,3])
projectorTwo.addAction( vizact.spin(0,0,1,90))
Is that what you want to do?

Thanks

TarkaDahl
Reply With Quote
  #4  
Old 07-26-2011, 06:26 AM
bennett145 bennett145 is offline
Member
 
Join Date: May 2011
Posts: 2
Prefect!

Thanks! This textureNum argument was what we were missing. Thanks for the help!
Reply With Quote
  #5  
Old 07-27-2011, 01:53 PM
tjwjtj tjwjtj is offline
Member
 
Join Date: Jul 2011
Posts: 3
Hi TarkaDahl,

Thanks for the help. Do you know if there is any limit in the number of texture maps to be projected. I have ~27 textures. It seems I can only project 7 each time. The rest of the textures have error of "before Glyph::subload(): detected OpenGL error: invalid operation" when loaded.
Reply With Quote
  #6  
Old 07-28-2011, 10:04 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
There is a limit to how many textures you can apply to an object in OpenGL using the fixed-function pipeline. It looks like the limit is 8 in your drivers. If you need to use more, then you will have to write a custom fragment shader that computes the effect of all the projectors on each pixel.
Reply With Quote
  #7  
Old 07-28-2011, 02:15 PM
tjwjtj tjwjtj is offline
Member
 
Join Date: Jul 2011
Posts: 3
Hi farshizzo,
You are right. The limit is 8. Is there any sample code I can follow? Do you think it is worth to write a custom fragment shader for projecting all the 27 textures? Or maybe create a single combined texture model will make things easier? Thanks!
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vizard 4 Beta Testing farshizzo Announcements 0 02-01-2011 10:46 AM
Vizard 4 Beta Testing farshizzo Vizard 0 02-01-2011 10:46 AM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 11:13 AM
Multiple Viewports in Vizard, Utilizing keyboard callback shivanangel Vizard 2 02-21-2006 04:56 PM
running multiple vizard scripts from python exhale Vizard 1 05-09-2005 05:35 AM


All times are GMT -7. The time now is 07:04 AM.


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