FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Material and Texture

5 posters

Go down

Material and Texture Empty Material and Texture

Post  cgriffin Thu Oct 16, 2008 11:36 am

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

cgriffin

Posts : 5
Join date : 2008-10-09

Back to top Go down

Material and Texture Empty Re: Material and Texture

Post  sio2interactive Thu Oct 16, 2008 4:32 pm

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 Wink
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Material and Texture Empty Re: Material and Texture

Post  Blamm! Tue Dec 16, 2008 10:34 pm

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

Blamm!

Posts : 23
Join date : 2008-11-18

Back to top Go down

Material and Texture Empty Re: Material and Texture

Post  sio2interactive Wed Dec 17, 2008 4:07 pm

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?
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Material and Texture Empty Re: Material and Texture

Post  Blamm! Fri Dec 19, 2008 10:46 pm

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.

Blamm!

Posts : 23
Join date : 2008-11-18

Back to top Go down

Material and Texture Empty Re: Material and Texture

Post  JonPru Sat Dec 20, 2008 12:21 am

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

JonPru

Posts : 16
Join date : 2008-11-14

Back to top Go down

Material and Texture Empty Re: Material and Texture

Post  Blamm! Sat Dec 20, 2008 8:01 am

ahh power of two not divisible by two Smile gotcha.

Blamm!

Posts : 23
Join date : 2008-11-18

Back to top Go down

Material and Texture Empty Re: Material and Texture

Post  aputman Mon Mar 16, 2009 11:30 pm

When you say images must be a power of 2, do you mean size in bytes?

aputman

Posts : 11
Join date : 2009-03-16

Back to top Go down

Material and Texture Empty Re: Material and Texture

Post  sio2interactive Mon Mar 16, 2009 11:33 pm

no in width and height...

such as:

16x512

or 128x128 etc...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Material and Texture Empty Re: Material and Texture

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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