WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-14-2015, 01:11 PM
gerardo697 gerardo697 is offline
Member
 
Join Date: May 2015
Posts: 10
Adding Images to Objects

I was wondering if there is a better approach when trying to add an image onto a wall. I have created the following quadrilateral, and when I run the program it just shows a brown square. How can I fix this?

import viz
viz.setMultiSample(8)
viz.fov(60)
viz.go()

viz.startLayer(viz.QUADS)
viz.vertex(0,0,15)
viz.vertex(10,0,15)
viz.vertex(10,10,15)
viz.vertex(0,10,15)
myQuad = viz.endLayer()
texture = viz.add( 'duck.jpg' )
myQuad.texture( texture)
Reply With Quote
  #2  
Old 07-17-2015, 06:27 AM
gerardo697 gerardo697 is offline
Member
 
Join Date: May 2015
Posts: 10
One way to do this

I found out that the following works with any kind of picture extension.

pic = viz.addTexture( '20150716_113030.jpg' )
quad = viz.addTexQuad()
quad.setPosition([x,z,y])
quad.setSize([width,height])
quad.setEuler([270,0,0])
quad.texture(pic)


The setEuler() part is if you want to turn the picture around.
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
Adding objects bobbin_93 Vizard 1 07-16-2014 05:15 PM
Adding Objects to all Scenes jassel41 Vizard 1 11-29-2010 02:35 AM
Semi-circle array containing target and distractor objects ptjt255 Vizard 3 08-04-2009 03:09 AM
adding new objects gina Vizard 4 11-29-2006 11:01 AM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 11:01 AM


All times are GMT -7. The time now is 11:35 AM.


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