Zach Lehman
12-19-2010, 01:58 AM
Warm Gun is looking to "mobilize" our game and naturally we're running into all sorts of fun combinations of material setups. While running through our UPKs I've noticed a few issues. The title of this thread says 'Complex' but I don't think all our issues will be considered very complicated or unique. It also says 'Tips' but it's 2am and I'm too tired to add our tips into this thread tonight. I'll be updating the thread with things we've found to work well though.
In the mean time, here are some fun problems/oddities we've encountered and haven't (in the past 48 hours) found the solution for:
1. Opacity maps. Fixed: Suck it up and export the diffuse so you can add your opacity map to the alpha and re-import.
It looks like the opacity works if you have it built into the alpha of the diffuse texture, but what if you have a separate opacity map? Does it have to be built into the diffuse to work on mobile?
https://dl.dropbox.com/u/11781734/Img01.jpg
2. If statements for AO Fixed: Use switch statements instead. Also don't forget to check the mobile info on the material instances as well as the material itself.
The image shows we have an AO map with three separate bakes (one in each of the RGB slots). This is a single material built to handle three different types of junk pile meshes. When we load the first junk pile mesh onto the iPad it renders fine but piles 2 and 3 render out like an acid trip (they look like the RGB texture sample in the image). Any thoughts on this?
https://dl.dropbox.com/u/11781734/Img02.jpg
3. Materials showing on iPad but not hooked up
We have materials that are applied to BSP that show up (and look amazing) on the iPad, but when you look at them in the material editor they have nothing set up in the mobile tab. It's set up in the expression window, but we were under the impression if you didn't hook up the textures in the mobile tab it wouldn't show. A lot of materials are like this.
https://dl.dropbox.com/u/11781734/Img03.jpg
4. Specular Fixed: "Spec is turned off on the iPad in the ini, you can tun it back on but be careful about performance." - Taken from a post by ShaneC (Post #8 in this thread).
We can't seem to get specular to work at all. It looks great in editor but once transferred to iPad it loses all spec. The image shows the setup for this rock wall, and in the Mobile tab we've tried a ton of different combinations. We opened Citadel for a reference check and we noticed that bronze statue had a bump offset combo very similar to this setup. They applied the offset texture in the Masking tab, the Diffuse and the Normal in their respective tabs, and checked the Bump Offset tab and set values. Additionally for the spec they checked Use Mobile Specular and Use Mobile Pixel Specular and set the MSM to be MaskTextureRGB. We've tested with a spotlight and a directional light.
Edit: We have gotten specular to work on a much simpler asset. Oddly enough it's now even more confusing. We did some tests and found that we could hook a diffuse texture up to the diffuse slot and break all other connections in the expression editor. We then removed everything from the Mobile tab and just enabled spec ('Use Mobile Specular' AND 'Use Mobile Pixel Specular') and set it as MSM_DiffuseRed. We were under the impression this couldn't work without a normal map, but somehow this setup works and my setup in the above image doesn't.
https://dl.dropbox.com/u/11781734/Img04.jpg
We welcome anyone who brings answers, but help from Epic guys or Chair/Trendy guys would be hugely appreciated. These issues are only a snippet of all the problems we're having with our materials, but if we can better understand these concepts I think we can apply them to a lot of other similar occurrences. I'll follow up later with tips and more questions as we get them.
Thanks!
In the mean time, here are some fun problems/oddities we've encountered and haven't (in the past 48 hours) found the solution for:
1. Opacity maps. Fixed: Suck it up and export the diffuse so you can add your opacity map to the alpha and re-import.
It looks like the opacity works if you have it built into the alpha of the diffuse texture, but what if you have a separate opacity map? Does it have to be built into the diffuse to work on mobile?
https://dl.dropbox.com/u/11781734/Img01.jpg
2. If statements for AO Fixed: Use switch statements instead. Also don't forget to check the mobile info on the material instances as well as the material itself.
The image shows we have an AO map with three separate bakes (one in each of the RGB slots). This is a single material built to handle three different types of junk pile meshes. When we load the first junk pile mesh onto the iPad it renders fine but piles 2 and 3 render out like an acid trip (they look like the RGB texture sample in the image). Any thoughts on this?
https://dl.dropbox.com/u/11781734/Img02.jpg
3. Materials showing on iPad but not hooked up
We have materials that are applied to BSP that show up (and look amazing) on the iPad, but when you look at them in the material editor they have nothing set up in the mobile tab. It's set up in the expression window, but we were under the impression if you didn't hook up the textures in the mobile tab it wouldn't show. A lot of materials are like this.
https://dl.dropbox.com/u/11781734/Img03.jpg
4. Specular Fixed: "Spec is turned off on the iPad in the ini, you can tun it back on but be careful about performance." - Taken from a post by ShaneC (Post #8 in this thread).
We can't seem to get specular to work at all. It looks great in editor but once transferred to iPad it loses all spec. The image shows the setup for this rock wall, and in the Mobile tab we've tried a ton of different combinations. We opened Citadel for a reference check and we noticed that bronze statue had a bump offset combo very similar to this setup. They applied the offset texture in the Masking tab, the Diffuse and the Normal in their respective tabs, and checked the Bump Offset tab and set values. Additionally for the spec they checked Use Mobile Specular and Use Mobile Pixel Specular and set the MSM to be MaskTextureRGB. We've tested with a spotlight and a directional light.
Edit: We have gotten specular to work on a much simpler asset. Oddly enough it's now even more confusing. We did some tests and found that we could hook a diffuse texture up to the diffuse slot and break all other connections in the expression editor. We then removed everything from the Mobile tab and just enabled spec ('Use Mobile Specular' AND 'Use Mobile Pixel Specular') and set it as MSM_DiffuseRed. We were under the impression this couldn't work without a normal map, but somehow this setup works and my setup in the above image doesn't.
https://dl.dropbox.com/u/11781734/Img04.jpg
We welcome anyone who brings answers, but help from Epic guys or Chair/Trendy guys would be hugely appreciated. These issues are only a snippet of all the problems we're having with our materials, but if we can better understand these concepts I think we can apply them to a lot of other similar occurrences. I'll follow up later with tips and more questions as we get them.
Thanks!