WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Tiling a texture on a plane (https://forum.worldviz.com/showthread.php?t=3727)

FreakyT 04-27-2011 01:43 AM

Tiling a texture on a plane
 
1 Attachment(s)
This seems like it should be easy, but it's not working for me, so perhaps someone could figure it out.

Anyway, I'm trying to create a large plane with a "grass" looking texture on it. (Pretty simple!) The plane is a VRML file (attached) containing an IndexedFaceSet. (I found that Vizard's physics engine didn't work right on objects with small numbers of triangles, so I had to tesselate the "plane" a lot)

However, I can't get the plane to get a texture! I figure maybe it's getting one but really stretched out, however I can't seem to get it to tile a scaled down version of the texture, either. Any ideas on how to do this?

Thanks!

Jeff 04-27-2011 12:45 PM

It maybe your model does not have texture coordinates. Was it exported without a texture?

farshizzo 04-27-2011 05:34 PM

Also, make sure the wrap mode on the texture object is set to viz.REPEAT.
Code:

texture = viz.addTexture('grass.jpg',wrap=viz.REPEAT)


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

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