A couple questions concerning textures...

View previous topic View next topic Go down

A couple questions concerning textures...

Post  mordenkaim on Mon Sep 21, 2009 8:58 am

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. Smile

mordenkaim

Posts : 21
Join date : 2009-05-19

View user profile

Back to top Go down

Re: A couple questions concerning textures...

Post  mordenkaim on Tue Sep 22, 2009 11:01 am

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

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum