Page 1 of 1

Simple material renders differently on simulator and device

Posted: Mon Dec 10, 2012 1:14 pm
by simedj
For some reason my whitish skeleton renders a weird yellow color on my iPad, but works fine on the simulator. Also, lighting appears messed up:
Screen Shot 2012-12-10 at 12.02.53.png
Simulator
Screen Shot 2012-12-10 at 12.02.53.png (51.1 KiB) Viewed 1136 times
Screen Shot 2012-12-10 at 12.02.54.png
iPad 2
Screen Shot 2012-12-10 at 12.02.54.png (72.5 KiB) Viewed 1136 times
The material is just a dead-simple fixed-function one, fed into RTSS:

Code: Select all

material MatSkull
{
	technique
	{
		pass
		{
			ambient 0.34902 0.34902 0.34902 1
			diffuse 0.631373 0.631373 0.631373 1
			specular 0.31 0.31 0.31 1 25

			texture_unit
			{
				texture skull_diffuse.jpg
			}
		}

	}
}
skull_diffuse.jpg is a simple 512x512 image.

This problem has always been present from XCode 3 / iOS4 through XCode 4.5/iOS6. I imagine it's something simple, but I don't know where to look - suggestions please!

Re: Simple material renders differently on simulator and dev

Posted: Wed Dec 12, 2012 4:24 am
by mannam
Is skull_diffuse.jpg in power-of-2 dimension?

Re: Simple material renders differently on simulator and dev

Posted: Wed Dec 12, 2012 9:43 am
by simedj
skull_diffuse.jpg is a simple 512x512 image.
I might try testing without the texture in the material though, to see if that is the problem.

Re: Simple material renders differently on simulator and dev

Posted: Wed Dec 12, 2012 10:52 am
by mannam
It looks like texture error. Ogre "sometimes" show yellow+black colour on texture loading error.

You may also check if there is another file named skull_diffuse.jpg in other directory.

Re: Simple material renders differently on simulator and dev

Posted: Sun Jan 13, 2013 10:45 pm
by simedj
OK I got round to re-testing this on the device through XCode and got this in the logging for several textures:
Error loading texture skeleton_diffuse.jpg. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource skeleton_diffuse.jpg in resource group General or any other group.
Since it runs on the simulator, I'm wondering how the file is missing... or if perhaps the file is there but not loading instead?

Is there an easy way to view the contents of the application package which has been installed on the device... it seems the copy produced by XCode on disk is correct.

Re: Simple material renders differently on simulator and dev

Posted: Mon Jan 14, 2013 9:26 am
by masterfalcon
Check the case. By default OS X uses a case insensitive filesystem but on iOS it's the opposite.