WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   possibility to set multiple projectors in Vizard 4.0? (https://forum.worldviz.com/showthread.php?t=3846)

tjwjtj 07-22-2011 08:40 AM

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!

bennett145 07-25-2011 12:36 PM

Mutliple Projectors
 
I have the same question. We would like to have several projectors running at once. Does anyone have any ideas?

TarkaDahl 07-25-2011 03:44 PM

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

bennett145 07-26-2011 06:26 AM

Prefect!
 
Thanks! This textureNum argument was what we were missing. Thanks for the help!

tjwjtj 07-27-2011 01:53 PM

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.

farshizzo 07-28-2011 10:04 AM

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.

tjwjtj 07-28-2011 02:15 PM

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!


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

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