Material and Texture
5 posters
Material and Texture
I'm sure this shows my lack of knowledge of Blender. I have a cube. I have assigned a material that is solid red but it shows up white in the app. Is there something I need to do in blender to make the cube show up red in the app?
Thanks,
Chris
Thanks,
Chris
cgriffin- Posts : 5
Join date : 2008-10-09
Re: Material and Texture
Did you use: sio2ResourceBindAllMaterials? I think you should first read the code in the tutorials and watch the videos (when available). And then try to reproduce yourself every tutorial 1 by 1... That'll make your life more easy for now and in the future
Re: Material and Texture
cgriffen
did you get any success? I am having a similar problem, my models only get the material color applied not the texture. I have tried through tutorial 3 and 4
non of the textures i apply appear when run through the simulator.
within my .sio2 file the image dir has my under 1024 divisble by 2 image and the material reads:
material( "material/Material" )
{
tflags0( 1 )
tex0( "image/smallNGC-5866.tga" )
diffuse( 0.998 0.998 0.998 )
specular( 1 1 1 )
alpha( 1 )
shininess( 12 )
friction( 0.5 )
}
and my cube shows the material name linked
n_vgroup( 1 )
vgroup( "null" )
mname( "material/Material" )
n_ind( 36 )
ind( 0 1 2 )
I dont see where the disconnect is...
I have stepped through the code and it seems that everything is binding correctly during the
sio2ResourceResetState();
sio2ResourceBindAllImages( sio2->_SIO2resource );
sio2ResourceBindAllMaterials( sio2->_SIO2resource );
sio2ResourceBindAllMatrix( sio2->_SIO2resource );
steps
did you get any success? I am having a similar problem, my models only get the material color applied not the texture. I have tried through tutorial 3 and 4
non of the textures i apply appear when run through the simulator.
within my .sio2 file the image dir has my under 1024 divisble by 2 image and the material reads:
material( "material/Material" )
{
tflags0( 1 )
tex0( "image/smallNGC-5866.tga" )
diffuse( 0.998 0.998 0.998 )
specular( 1 1 1 )
alpha( 1 )
shininess( 12 )
friction( 0.5 )
}
and my cube shows the material name linked
n_vgroup( 1 )
vgroup( "null" )
mname( "material/Material" )
n_ind( 36 )
ind( 0 1 2 )
I dont see where the disconnect is...
I have stepped through the code and it seems that everything is binding correctly during the
sio2ResourceResetState();
sio2ResourceBindAllImages( sio2->_SIO2resource );
sio2ResourceBindAllMaterials( sio2->_SIO2resource );
sio2ResourceBindAllMatrix( sio2->_SIO2resource );
steps
Blamm!- Posts : 23
Join date : 2008-11-18
Re: Material and Texture
1. Have you assigned some UV in the UV Image Editor and Link the Image?
2. Did you link the Image in the first (or second) texture channel of the material?
2. Did you link the Image in the first (or second) texture channel of the material?
Re: Material and Texture
so it must be how i create the image....as I use your fire.tga and that texture applies fine to a cube. If I use an image that i made, 512x320 saved as a targa 32 bit non RLE the tutorial03 cube only shows up with white(the material color). If I use fire.tga, it does the write uv mapping and all that, looks great.
thanks for all the help, must be im making the texture image wrong.
thanks for all the help, must be im making the texture image wrong.
Blamm!- Posts : 23
Join date : 2008-11-18
Re: Material and Texture
Images used for uv texturing must be powers of 2. 2 4 8 16 32 64 128 256 512 1024. So make sure the pixel sizes are a power of two. The image you gave as an example isn't working for that reason.
Don't feel bad it took me like a week before I figured that out:-)
Good luck
Don't feel bad it took me like a week before I figured that out:-)
Good luck
JonPru- Posts : 16
Join date : 2008-11-14
Re: Material and Texture
ahh power of two not divisible by two gotcha.
Blamm!- Posts : 23
Join date : 2008-11-18
Re: Material and Texture
When you say images must be a power of 2, do you mean size in bytes?
aputman- Posts : 11
Join date : 2009-03-16
Similar topics
» Draw font to texture or render to texture possible?
» Glass Material
» sio2ObjectDuplicate loses material?
» Best Practice for an Object with Variable Material Properties
» Material colors and lighting
» Glass Material
» sio2ObjectDuplicate loses material?
» Best Practice for an Object with Variable Material Properties
» Material colors and lighting
Permissions in this forum:
You cannot reply to topics in this forum