Simple material renders differently on simulator and device

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
simedj
Goblin
Posts: 262
Joined: Fri Nov 18, 2011 6:50 pm
x 3

Simple material renders differently on simulator and device

Post 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:
Simulator
Simulator
Screen Shot 2012-12-10 at 12.02.53.png (51.1 KiB) Viewed 1830 times
iPad 2
iPad 2
Screen Shot 2012-12-10 at 12.02.54.png (72.5 KiB) Viewed 1830 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!
Looking to find experienced Ogre & shader developers/artists. PM me with a contact email address if interested.
mannam
Halfling
Posts: 45
Joined: Tue Feb 15, 2011 7:23 am

Re: Simple material renders differently on simulator and dev

Post by mannam »

Is skull_diffuse.jpg in power-of-2 dimension?
simedj
Goblin
Posts: 262
Joined: Fri Nov 18, 2011 6:50 pm
x 3

Re: Simple material renders differently on simulator and dev

Post 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.
Looking to find experienced Ogre & shader developers/artists. PM me with a contact email address if interested.
mannam
Halfling
Posts: 45
Joined: Tue Feb 15, 2011 7:23 am

Re: Simple material renders differently on simulator and dev

Post 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.
simedj
Goblin
Posts: 262
Joined: Fri Nov 18, 2011 6:50 pm
x 3

Re: Simple material renders differently on simulator and dev

Post 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.
Looking to find experienced Ogre & shader developers/artists. PM me with a contact email address if interested.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: Simple material renders differently on simulator and dev

Post by masterfalcon »

Check the case. By default OS X uses a case insensitive filesystem but on iOS it's the opposite.
Post Reply