hello
when using "generated" TexCoords in a MaterialTexture, is it possible to have it map the sides of a mesh, the way it does in "ModelDefined" mode?
reason being, i want separate control of the mesh scale and the texture scale, so the texture isnt squashed with the mesh, but rather the mesh surfaces are windows over the texture, if that makes sense. (it works this way in "generated" mode, but the sides are looking like licorice allsorts )
thanks
texture coords
Moderator: Moderators
texture coords
- Attachments
-
- texturemapping.zgeproj
- (363.24 KiB) Downloaded 570 times

You can counter that by setting the Texture Scale. It's a little more work then simply using generated texture coordinates, but it's the easiest way to prevent the "licorice" sides. Attached is a example ..
K
- Attachments
-
- Scale.zgeproj
- (1.47 KiB) Downloaded 594 times

is this something i would be better off learning how to do using shaders?
this is my first foray into 3d (and coding for that matter) so i am kind of prioritizing what i learn by what obstacle ive hit, hehe. i appreciate all your help

Ah,
Ok, I think I understand what effect you're after now .. like this right?
http://www.youtube.com/watch?v=iGxdV2SuyJE
You're going to need 3D texture coordinates to do that. Unfortunately ZGE only supports 2D texture coordinates ( at the moment ), even though the TexCoord property on MeshExpression is actually a Vector3f. So, either if your mesh is very simply, you can generate it with the proper texture coordinates every frame, or as you said use Shaders / OpenGL calls.
K
Ok, I think I understand what effect you're after now .. like this right?
http://www.youtube.com/watch?v=iGxdV2SuyJE
You're going to need 3D texture coordinates to do that. Unfortunately ZGE only supports 2D texture coordinates ( at the moment ), even though the TexCoord property on MeshExpression is actually a Vector3f. So, either if your mesh is very simply, you can generate it with the proper texture coordinates every frame, or as you said use Shaders / OpenGL calls.
K
Hi pond,
If you haven't watched this video already, start here ..
http://www.youtube.com/watch?v=ZVWTL7S0o0Y
Then pretty much all the information you need is in the OpenGL manual and the OpenGL thread on our own forum
K
If you haven't watched this video already, start here ..
http://www.youtube.com/watch?v=ZVWTL7S0o0Y
Then pretty much all the information you need is in the OpenGL manual and the OpenGL thread on our own forum

K
Hi pond,
Depends on your preference. If you take the OpenGL-route, you can't use the Mesh component. If you take the Shader-route you can use the Mesh, but you still can't use the Texture Coordinates of the Mesh.
Personally I'd make that decision based on whether you want to support older hardware ( that doesn't support Shaders ) or not.
K
Depends on your preference. If you take the OpenGL-route, you can't use the Mesh component. If you take the Shader-route you can use the Mesh, but you still can't use the Texture Coordinates of the Mesh.
Personally I'd make that decision based on whether you want to support older hardware ( that doesn't support Shaders ) or not.
K