PanoramaCube3D - how to show a skybox

Feb 26, 2013 at 12:16 PM
I'm creating a simple game and want to use a PanoramaCube3D as a skybox for the background.

I know that there's a sample included in the source code but I just can't get it to work using my own skybox images. the problem is the cube always looks like - well - a cube, and there are thin black lines where the sides of the cube meet.

Has anyone ever used the PanoramaCube3D for skyboxing and could provide a sample source code? FYI, there are some free skyboxes over here http://www.3delyvisions.com/skf1.htm
Mar 25, 2013 at 7:54 AM
I have recently encountered the same problem as well, and finally solved it.

The solution is as follows:

In your XAML, add this to your HelixViewPort3D:
RenderOptions.BitmapScalingMode="HighQuality" RenderOptions.EdgeMode="Aliased"
Your code should end up looking something like this:
        <ht:HelixViewport3D x:Name="viewPort"  CameraMode="FixedPosition" RenderOptions.BitmapScalingMode="HighQuality" RenderOptions.EdgeMode="Aliased">
            <ModelVisual3D>
                <ModelVisual3D.Content>
                    <AmbientLight Color="White"/>
                </ModelVisual3D.Content>
            </ModelVisual3D>

            <ht:PanoramaCube3D Source="Models\GrandHotel\"  >
                
            </ht:PanoramaCube3D>
        </ht:HelixViewport3D>
That should fix the problem. The black lines will disappear completely. You MUST have both the BitmapScalingMode and the EdgeMode set for this to work.

All the best.


Amun
Mar 25, 2013 at 7:58 AM
wow. you just so much saved my day .... .i can't believe your awesomenes. thank you so much!!!
Mar 25, 2013 at 9:06 AM
No problem. I'm happy to have helped.

All the best for your project!


Amun