Import high-res sphere from Blender into Unity and add Material
I have a Stereo Skybox demo project for VR and I'm using two spheres (left & right eye). I have a material with the 360 pano images in it, and also a shader that culls the outer mapping and allows me to look around the inside of the spheres. This all works great; but the sphere geometry is low-res and is causing distortion. To try and resolve this, I imported a sphere from Blender as an FBX, and tried to add my material and shader from Unity to this new geometry. For some reason, the material does not preview, and is not rendering at all. The structure of the objects looks to be identical. The only issue is that one is the FBX sphere, and the other is a Unity primitive.
What am I doing wrong?
Unless they're doing something nontraditional with projection in their shader, it sounds like you just didn't uv-unwrap your blender sphere. If that's the case, unfortunately, this is a pretty deep topic. There are multiple ways to uv-unwrap a sphere, or to project skyboxes. It really depends on what's going on under the hood of their approach.
If possible, open their low-poly sphere in blender, subdivide, smooth, repeat as desired. This should preserve their original unwrapping metadata and add resolution. If for some reason this file can't be opened with Blender, I'd email the document author to request a high-quality version.
The original is just a standard Unity sphere primitive. I created a UV Sphere in Blender and exported it as an FBX. It imports into Unity with the material, mesh etc. Replacing the material with my own doesn't have the same effect as it does with the Unity primitive.
Hey, sorry I missed that. Definitely sounds like a uv-unwrapping issue. I just spent a $$anonymous$$ute trying to discover how Unity's primitive sphere is unwrapped so you can duplicate the process, but had no luck. That's what you need to know, though.
There are a couple of common techniques and I'd be shocked if Unity's primitive didn't use one of them. You can help yourself test this by applying a textured material to a Unity sphere and watching how it stretches and squashes. Google "uv map test" to get an appropriate rainbow grid image. Then in your search for uv unwrapping methods for spheres, you'll recognize the distortion and know you've found the right method to duplicate in Blender.
I'll spend another $$anonymous$$ute looking - I'm surprised the answer isn't easier to find myself.
Have a look at Farfarer's answer here, it's relevant.
BETTER YET try googling for "uv unwrapped sphere" to see if you can find a high-poly model available for free. Chances are one of them you find will work just fine.
I found a High-res Sphere here: http://www.ignishot.com/phpBB3/viewtopic.php?t=3094 I imported the FBX and used the geometry straight; it worked. I'm not sure what this chap did in Blender when he exported the Sphere. I'd still love to know for the future.
Great! Glad that worked out. Not sure why I always recommend the hard road. (Analyze that, Sigmund!)
It $$anonymous$$IGHT be a simple "sphere projection" unwrap. In edit mode, press U to show the unwrap menu. It'll have several options. Never came up for me personally, but it's possible the "sphere projection" option creates the kind of mapping Unity shaders expect with one click. Otherwise, it's collegiate-math complicated.
Your answer
Follow this Question
Related Questions
Pivot changes when fbx is imported. 1 Answer
FBX character imported from Blender missing parts 1 Answer
NaN errors when importing .fbx files made with Blender into Unity 0 Answers
FBX Exporter is not responding 0 Answers
Updating fbx - Best practices 0 Answers