are the code snippets exactly the same as you use in your prog ???
then there is an error with the material name/variable !!!
you declare a var named material:
3) Vertex data is calculated dinamically ... the uv coords ... hm ... which parameter contains these?
4)
Acki wrote:are the code snippets exactly the same as you use in your prog ???
then there is an error with the material name/variable !!!
you declare a var named material:
3) Vertex data is calculated dinamically ... the uv coords ... hm ... which parameter contains these?
video::S3DVertex::TCoords
If you did not set them you will not get texture displayed correctly.
Also you need to set MaterialType parameter of SMaterial to use transparent texture else with default one, transparent pixels will not be rendered transparent. You probably want to set it to EMT_TRANSPARENT_ALPHA_CHANNEL.
You should set all vertex attributes to render them properly ...position, UV, normal, color. Also make sure you set lighting for your node properly. If you are not using any light source ...turn it off else everything will be black.
arras wrote:You did not set Normal ...this may be ok if you disabled lighting but if lighting is on you might get weird results.
I'm working on it!
I'm trying to make a sun ... I've calculated positions and it's work just fine ... now the normals should be the vector:
(sunpos - cam_pos).normalized();
I think ...
//later
And I have two more problems ... I have trying to draw some debug info ... for example all sun positions like this:
now the normals should be the vector:
(sunpos - cam_pos).normalized();
I think ...
Most of the time not! Normaly you want normal to be perpendicular to the surface it belongs to. Of course you may want to to "smooth" them in order that your mesh does not show too much edges. Normal is independent on light source.
As for your other questions, I have no idea. Somebody else might help..
arras wrote:Most of the time not! Normaly you want normal to be perpendicular to the surface it belongs to. Of course you may want to to "smooth" them in order that your mesh does not show too much edges. Normal is independent on light source.
As for your other questions, I have no idea. Somebody else might help..
(sunpos - cam_pos).normalized(); it is perpendiculary on the "sun" because I orientate the texture to be perpendicular to (sunpos - cam_pos).normalized(); so the camera will always see it as a circle (or something).
But the direction (sunpos - cam_pos).normalized(); is not quite good! the correct one is (sunpos + cam_pos).normalized(); ... so the normals be directioned to the camera.
I hope my english is understanable...
Answers to the other questions will help me very much ...