A couple questions concerning textures...
A couple questions concerning textures...
I have set up textures successfully by creating a RGBA texture and applying it to the faces of my model programatically by using this syntax and intializing all relevant variables to get this working...
vGrp->_SIO2material->_SIO2image[SIO2_MATERIAL_CHANNEL0] = vGrpTexture;
Also I am diffusing the material to tint it various shades, by using diffuse and color blend mode.
All of the above works, but I have come across a couple questions in the process.
First, are the Texture face (twoside) properties from blender stored in the material? Logically to me it would seem like that would be a property of the face (or model) itself and not of the material being applied to the face. However if I set it in blender (like in tutorial04) then export I still can't see the faces on the backside of the model through the transparent faces on the front. So, my first thought is... OK, I wiped out the material and I'm building that from scratch, so I must have wiped out that property with it. If it is stored on the material, how do I set the twosided property programatically? If it is actually stored on the model, I will continue to dig and look for where I messed up.
Second, how do I get a square texture to apply to two triangles programatically? I have a 128x128 which is being distorted to fit on a single triangle (which I think is the expected default behavior), but I want that 128x128 to be projected on a square face consisting of two triangles.
Any help would be greatly appreciated.
vGrp->_SIO2material->_SIO2image[SIO2_MATERIAL_CHANNEL0] = vGrpTexture;
Also I am diffusing the material to tint it various shades, by using diffuse and color blend mode.
All of the above works, but I have come across a couple questions in the process.
First, are the Texture face (twoside) properties from blender stored in the material? Logically to me it would seem like that would be a property of the face (or model) itself and not of the material being applied to the face. However if I set it in blender (like in tutorial04) then export I still can't see the faces on the backside of the model through the transparent faces on the front. So, my first thought is... OK, I wiped out the material and I'm building that from scratch, so I must have wiped out that property with it. If it is stored on the material, how do I set the twosided property programatically? If it is actually stored on the model, I will continue to dig and look for where I messed up.
Second, how do I get a square texture to apply to two triangles programatically? I have a 128x128 which is being distorted to fit on a single triangle (which I think is the expected default behavior), but I want that 128x128 to be projected on a square face consisting of two triangles.
Any help would be greatly appreciated.
mordenkaim- Posts : 21
Join date : 2009-05-19
Re: A couple questions concerning textures...
Well I answered the second question.. there was a problem with my UV mapping which is now fixed. Apparently I had mapped the texture to one face and since I hadn't selected it I didn't realize it. Now that I've mapped it properly it looks like I expected. I still can't see the "hidden" geometry but I am continuing to look into it.
mordenkaim- Posts : 21
Join date : 2009-05-19
Similar topics
» Just a couple of nonsense... bugs?
» Couple of doubts regarding camera
» Couple problems with 1.3 tutorials
» Need help with multiple textures
» Problem with materials/textures
» Couple of doubts regarding camera
» Couple problems with 1.3 tutorials
» Need help with multiple textures
» Problem with materials/textures
Permissions in this forum:
You cannot reply to topics in this forum