Forum Discussion
agentdark64
10 years agoExplorer
How do i make textures more 3d with the VR?
Hi,
If you try the demo Gear VR example - Dreadhalls and you look behind when you start, you see a 3d stone wall with part of the walls popping out at you. With unity, regardless of if I use a heightmap and normal map, I can't get it to look that 3d! Do I need to use something like blender to build a mesh (the texture will sit on this) based on a heightmap to get it to look that 3d? What's the trick to making it this 3d? My textures still look flat with the VR on even with a heightmap applied.
If you try the demo Gear VR example - Dreadhalls and you look behind when you start, you see a 3d stone wall with part of the walls popping out at you. With unity, regardless of if I use a heightmap and normal map, I can't get it to look that 3d! Do I need to use something like blender to build a mesh (the texture will sit on this) based on a heightmap to get it to look that 3d? What's the trick to making it this 3d? My textures still look flat with the VR on even with a heightmap applied.
12 Replies
Replies have been turned off for this discussion
- vrdavebOculus StaffIf I recall correctly, Dreadhalls uses parallax mapping, not just normal mapping. Unity has some simple built-in shaders for this (http://docs.unity3d.com/Manual/shader-N ... ffuse.html), but they won't look correct in VR. You would have to compute a height map and use parallax occlusion mapping, relief mapping, or displacement mapping. Be careful - all of these techniques are performance-intensive. Here is an Asset Store package with some of the above techniques: https://www.assetstore.unity3d.com/en/#!/content/5705.
- motorsepStart PartnerWouldn't it be "cheaper" for mobile platform to model such details and have LOD on the models ?
- vrdavebOculus StaffGear VR apps are typically bound by draw calls, mesh complexity, texture bandwidth, and pixel shader complexity, roughly in that order. But yes, actual geometry and aggressive level-of-detail optimization can be faster if you are texture- or pixel shader-bound. Parallax, parallax occlusion, and relief mapping cost a lot of pixel shader and texture bandwidth, but they may fit if your app is heavily draw call or geometry-bound. Be sure to profile your app to see where it is spending its resources.
- agentdark64ExplorerOk, trying to understand this. When i select parralax diffuse from the legacy shaders, i dont get a "height" slider option as in the example with the brick texture here -
http://docs.unity3d.com/Manual/shader-N ... ffuse.html
It looks worse as there is no metallic anymore and only diffuse,normal map and height map. Regardless of the greyscale heightmap, i cant get it to create a bumpy surface.
If i use the standard shader and change the height value next to the heightmap, the whole polygon raises (even though i have a heightmap texture selected with shades of white and gray and black). Does the normal map texture need to have the alpha values set accordingly for the height?
So can you even do parralax occlusion mapping with the standard shader?
Do i need to buy a shader to do this etc like " uber standard shader ultra?" - vrdavebOculus Staff
"agentdark64" wrote:
You should. For me, it's right below "Main Color".
When i select parralax diffuse from the legacy shaders, i dont get a "height" slider"agentdark64" wrote:
Yes, the Standard Shader supports parallax mapping if you provide a height map. But it's even more complex than the basic Legacy/Parallax Diffuse shader, which makes it harder to use on mobile. You could also use the Parallax Specular shader to get a little bit more control.
It looks worse as there is no metallic anymore and only diffuse,normal map and height map."agentdark64" wrote:
The height slider is a scale that applies to the whole heightmap as h = h * height - height/2.0. You can see how it gets used Unity's built-in shaders by looking at ParallaxOffset1Step in UnityStandardUtils.cginc and ParallaxOffset in UnityCG.cginc.
If i use the standard shader and change the height value next to the heightmap, the whole polygon raises"agentdark64" wrote:
No, you would have to modify the shader or use a third-party shader such as the ones I previously linked from the Asset Store.
So can you even do parralax occlusion mapping with the standard shader? - agentdark64ExplorerDoes parralax occlusion mapping take into consideration the normal map in its calculations? Because whatever heightmap i give with plenty of whites and blacks makes no difference in making my texture bumpy. And increasing the overall height just raises the whole polygon up.
I even bought uber standard shader ultra and the whole polygon still just raises. Grrr. - vrdavebOculus StaffThe shaders work for me. Do these images work for you? https://www.digitalrune.com/Blog/Post/1 ... ax-Mapping
If you have a Rift DK, try them on PC first in case the shaders are running with reduced functionality on mobile. I'll take a look soon. - agentdark64Explorer
- agentdark64Explorer
- mbbmbbmmHonored Guest
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 months ago
- 10 months ago
- 9 months ago
- 5 months ago