Problem with scaletexture?
Blitz3D Forums/Blitz3D Programming/Problem with scaletexture?
| ||
Hi all. I am trying to build a simple sword in blitz3d using only scaled, positioned, and rotated shapes. Problem is, I went to texture the 1st part of the sword with a gradient texture, and for some reason, it only textures PART of the mesh, while leaving the other part of the texture black, making PART of the mesh appear black... i want it to be perfectly aligned to the mesh, no matter what. Here's the code: Thank you to all who help! :) |
| ||
Question first. What does this do? If CHANGE VertexTexCoords s, v, VertexU( s, v ) * ScaleU , VertexV( s, v ) * ScaleV |
| ||
It's supposed to scale the texture correctly. problem is. some of the mesh's texture is still black >< |
| ||
Global objtex=DrawGradientSurface(mytex,102,102,255,68,207,252,0,0,imgwidth#,imgheight#) |
| ||
THANK you Krischan. That was driving me CRAZY! O_O |
| ||
Ugh! Now another problem.... Why does this texture make the object appear to have a "dent" in it? |
| ||
This is just a guess, (Because I dont have the texture), but possibly its designed to make it look like it has a dent in it? Thun, have you got any screen shots of your project you could post, Im quite interested in seeing what you have got done so far |
| ||
No. its designed to be a gradient. because im the 1 who coded the design into it using the gradient code u see before u. Now, here's some screenshots of it. 1 with wireframe, and 1 without wireframe: Wireframe: ![]() No Wireframe: ![]() |
| ||
You're gonna have a hard time removing that. It's a "feature" of spherical mapping, there's gotta be a seam somewhere (as you're trying to map a rectangular area onto a spherical one). Have you tried loading that texture with the Spherical Environment flag? it'll hide the seam at the cost of three-dimensionality (you'll always see the gradient at front). Otherwise you can map a sphere in a modelling program to view in real-time and then tweak the texture in your favourite image-editing program until it looks acceptable. Then proceed to use it in your game. |
| ||
Rotate the gradient 90 degrees. |
| ||
You could try a cubemap. |
| ||
I tried rotating the texture 90 degrees. that ALMOST worked. there's a little spot where it still looks like a "dent", when it should look like a blue marble. Problem: ![]() |
| ||
Have you tried setting it to use vertex shading instead with Fullbright on? |