Loading ASE files
I have created a model loader that loads ASE files into OpenGL the only problem is that the values loaded are huge. How do I scale these down and what to. In 3d exploration it exports CPP code find but it has an option to scale down to only have a number at the most at 1 how does this work
Cheers
Steve
Hello, i show you two ways:
1.
in your render function add to all vertex point that your rendering /scaleValue for example:
glVertex3f( pnt.x / scaleValue , pnt.y / scaleValue ,pnt.z / scaleValue );
2.
you can alosw put some lines in your load function after that model loaded that scale all the vertices. for example:
for (int v=0; v{
vertex[v].x = vertex[v].z / scaleValue
vertex[v].y = vertex[v].y / scaleValue
vertex[v].z = vertex[v].z / scaleValue
}
and then render it.
that''s works for me.
i hope this help you , bye..
1.
in your render function add to all vertex point that your rendering /scaleValue for example:
glVertex3f( pnt.x / scaleValue , pnt.y / scaleValue ,pnt.z / scaleValue );
2.
you can alosw put some lines in your load function after that model loaded that scale all the vertices. for example:
for (int v=0; v
vertex[v].x = vertex[v].z / scaleValue
vertex[v].y = vertex[v].y / scaleValue
vertex[v].z = vertex[v].z / scaleValue
}
and then render it.
that''s works for me.

i hope this help you , bye..
orenk2k
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement