I solved all my problmes,
there was a little stupid little issues during the copy of my Vertex
and CoordTexture on the buffers...
Thanks lot however, the theory I read is a good exercise for the next
time!
Bye!
On 28 Dic, 01:52, Robert Green rbgrn@gmail.com wrote:
Well said Kostya.
But normal.x what is it?
Is the abs(x) ?
On 23 Dic, 20:41, Robert Green rbgrn@gmail.com wrote:
UV unwrapping/mapping is standard practice in 3d games. It's how the
artist lines up the textures onto the skin/model.
You're doing UV coordinate generation, which is similar but is
Pedro,
A normal is a unit vector (length == 1) that is perpendicular to the
surface. Normals are used for shading, so don't worry about them too
much for now.
Texture coordinates, as was already pointed out here, are in 2D space,
i.e. two coordinates. The reason is that textures are
Well said Kostya.
Pedro - I defined the formula to get your normal above. A normal is a
unit vector (a 3D vector of length 1.) Each vertex must have a normal
for proper shading, as that's how light is calculated. The normal of
a vertex of a sphere is a easy to calculate. Think of it as the
Thanks a lot,
especially at Robert Green for his very good explanation!
The absurd thing is that the code which I posted above is 100% right
in a iPhone iOS, but when I port the same code on the Android platform
I have these issues.
I will try to do what you are talking about normals and I let
What do you think about it?
http://en.wikipedia.org/wiki/UV_mapping
On 23 Dic, 09:19, pedr0 pulsarpie...@gmail.com wrote:
Thanks a lot,
especially at Robert Green for his very good explanation!
The absurd thing is that the code which I posted above is 100% right
in a iPhone iOS, but when
UV unwrapping/mapping is standard practice in 3d games. It's how the
artist lines up the textures onto the skin/model.
You're doing UV coordinate generation, which is similar but is
mathematically specified instead of placed by a 3D modeling
application.
On Dec 23, 12:37 am, pedr0
pedro,
your problem has nothing to do with android. I think you may need a
3D refresher to solve it. Normals are not UVs. Your UVs will depend
on how you want to map, but the easiest way to do it is to map from
the sphere center out using angles, like this. Since GL has 2D
texture coordinate
Also I should add that your sphere normal should be (sphereCenter -
point).Normalize() and will be a 3D vector. Normals are 3D, UVs are
2D.
On Dec 22, 9:09 am, pedr0 pulsarpie...@gmail.com wrote:
Please see the link and reply inside this post if you have not an
account on OpenGL forum, the
Oh here is a faster method - http://www.mvps.org/directx/articles/spheremap.htm
For each point (Assuming Y=up):
3DVec normal = (sphereCenter - point).normalize();
float U = asin(normal.x)/PI + 0.5
float V = asin(normal.y)/PI + 0.5
for z=up:
float U = asin(normal.x)/PI + 0.5
float V =
On 22 Dez., 20:42, Robert Green rbgrn@gmail.com wrote:
3DVec normal = (sphereCenter - point).normalize();
3DVec normal = (point - sphereCenter).normalize();
Or your world will be upside down. Unless my brain is totally
borked :) (could well be, 4am here...)
--
You received this message
11 matches
Mail list logo