WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-10-2013, 01:51 PM
Zhi Zhi is offline
Member
 
Join Date: Mar 2011
Posts: 49
How to apply texture on an on-the-fly 3d object

This question may be naive. But I could not find the answer in the forum or from the vizard help file.

I used vizshape.addCylinder() to create an on-the-fly cylinder. Then, I used <3d_node>.texture to add a texture on it. But, the texture does not appear on the top and the bottom circular faces of the cylinder. What shall I do?

Here is my code:
Code:
	tex = viz.addTexture('wood.jpg') 
	tex.wrap(viz.WRAP_R,viz.REPEAT)
	tex.wrap(viz.WRAP_T,viz.REPEAT)
	tex.wrap(viz.WRAP_S,viz.REPEAT)

	circle = vizshape.addCylinder(height=0.15, radius=0.5)
	circle.texture(tex)
Reply With Quote
  #2  
Old 10-11-2013, 10:40 AM
Zhi Zhi is offline
Member
 
Join Date: Mar 2011
Posts: 49
I think the problem is probably related to the texture wrapping. Because I can see texture on the side surface of the cylinder, but there is no texture on the top and bottom surfaces of the cylinder. However, the color of the top and bottom surfaces changed to the closest color to that of the texture I applied.
Reply With Quote
  #3  
Old 09-01-2014, 01:15 PM
Notch Notch is offline
Member
 
Join Date: Jan 2014
Posts: 15
Did you ever find a solution to this? I'm trying to color an on-the-fly cylinder but am unable to get the color to appear on the top and bottom of the cylinder.
Reply With Quote
  #4  
Old 09-09-2014, 04:42 AM
Notch Notch is offline
Member
 
Join Date: Jan 2014
Posts: 15
I think this might have been a lighting issue; without a specific light source, Vizard can make objects appear very dark in some situations. It's possible that the object was coloured, but I couldn't see the colour.
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
How to render a texture of the transparent object and then blur it whj Vizard 1 09-25-2012 03:15 PM
how to apply two textures to one 3D object? sqwiggily Vizard 3 03-15-2012 07:39 PM
How to apply shader and render texture to an object whj Vizard 0 04-23-2010 12:23 PM
Applying texture or colour to an on-the-fly object tomo_the_third Vizard 1 06-22-2009 11:12 AM
Move texture from one object to another Johannes Vizard 2 02-09-2005 03:55 PM


All times are GMT -7. The time now is 12:41 PM.


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