Page 1 of 1

Wrapping bitmap around sphere completely?

PostPosted: Thu Apr 15, 2021 9:14 pm
by cyberfyber
Hi, I see this question's been asked some time ago yet with no response.

I imagine the solution must be a very simple one...a step or some-such which I'm missing.

I've an image with 2-1 dimensions (as in 2000 by 1000) which I've applied to a sphere in fusion and it refuses to wrap completely around.

Adjusting the latitude on the sphere only helps stretch the image at one end (south pole, so to speak). But I'm still left with the others: (North Pole and the image extending lengthwise.

Was following a Youtube tute, mind you, on the subject. Fella there appeared to do it sans a hitch.

Thanks.

Re: Wrapping bitmap around sphere completely?

PostPosted: Thu Apr 15, 2021 9:24 pm
by Bryan Ray
More information is needed, I think. Is your Sphere simply the Shape3D node in Sphere mode? It should work flawlessly, like so:

Code: Select all
{
   Tools = ordered() {
      Checkerboard = MacroOperator {
         CtrlWZoom = false,
         Inputs = ordered() {
            Center = InstanceInput {
               SourceOp = "CustomTool1_2",
               Source = "PointIn1",
            },
            CheckerSize = InstanceInput {
               SourceOp = "CustomTool1_2",
               Source = "CheckerSize",
               Default = 64,
            },
            Width = InstanceInput {
               SourceOp = "Background1_2",
               Source = "Width",
               Default = 1920,
            },
            Height = InstanceInput {
               SourceOp = "Background1_2",
               Source = "Height",
               Default = 1080,
            }
         },
         Outputs = {
            Output = InstanceOutput {
               SourceOp = "CustomTool1_2",
               Source = "Output",
            }
         },
         ViewInfo = GroupInfo { Pos = { 2090, 346.5 } },
         Tools = ordered() {
            Background1_2 = Background {
               CtrlWZoom = false,
               CtrlWShown = false,
               Inputs = {
                  GlobalIn = Input { Value = 1001, },
                  GlobalOut = Input { Value = 1150, },
                  Width = Input { Value = 2000, },
                  Height = Input { Value = 1000, },
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 10.1499 } },
            },
            CustomTool1_2 = Custom {
               CtrlWZoom = false,
               CtrlWShown = false,
               Inputs = {
                  NumberIn1 = Input {
                     Value = 25,
                     Expression = "CheckerSize",
                  },
                  LUTIn1 = Input {
                     SourceOp = "CustomTool1LUTIn1_1",
                     Source = "Value",
                  },
                  LUTIn2 = Input {
                     SourceOp = "CustomTool1LUTIn2_1",
                     Source = "Value",
                  },
                  LUTIn3 = Input {
                     SourceOp = "CustomTool1LUTIn3_1",
                     Source = "Value",
                  },
                  LUTIn4 = Input {
                     SourceOp = "CustomTool1LUTIn4_1",
                     Source = "Value",
                  },
                  Intermediate1 = Input { Value = "(abs(floor((x-p1x)*(w/n1)))%2)", },
                  Intermediate2 = Input { Value = "(abs(floor((y-p1y)*(h/n1)))%2)", },
                  RedExpression = Input { Value = "abs(i1-i2)", },
                  GreenExpression = Input { Value = "abs(i1-i2)", },
                  BlueExpression = Input { Value = "abs(i1-i2)", },
                  NumberControls = Input { Value = 1, },
                  NameforNumber1 = Input { Value = "SquareSize", },
                  ShowNumber2 = Input { Value = 0, },
                  ShowNumber3 = Input { Value = 0, },
                  ShowNumber4 = Input { Value = 0, },
                  ShowNumber5 = Input { Value = 0, },
                  ShowNumber6 = Input { Value = 0, },
                  ShowNumber7 = Input { Value = 0, },
                  ShowNumber8 = Input { Value = 0, },
                  PointControls = Input { Value = 1, },
                  NameforPoint1 = Input { Value = "Center", },
                  ShowPoint2 = Input { Value = 0, },
                  ShowPoint3 = Input { Value = 0, },
                  ShowPoint4 = Input { Value = 0, },
                  ShowLUT1 = Input { Value = 0, },
                  ShowLUT2 = Input { Value = 0, },
                  ShowLUT3 = Input { Value = 0, },
                  ShowLUT4 = Input { Value = 0, },
                  Image1 = Input {
                     SourceOp = "Background1_2",
                     Source = "Output",
                  },
                  CheckerSize = Input { Value = 25, },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 43.1499 } },
               UserControls = ordered() {
                  CheckerSize = {
                     INP_MinScale = 0,
                     INP_Integer = true,
                     INP_MinAllowed = 0,
                     LINKID_DataType = "Number",
                     INPID_InputControl = "SliderControl",
                     IC_ControlPage = 0,
                     INP_MaxScale = 100,
                     INP_Default = 64,
                  }
               }
            },
            CustomTool1LUTIn1_1 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 204, Green = 0, Blue = 0 },
               CtrlWShown = false,
            },
            CustomTool1LUTIn2_1 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 0, Green = 204, Blue = 0 },
               CtrlWShown = false,
            },
            CustomTool1LUTIn3_1 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 0, Green = 0, Blue = 204 },
               CtrlWShown = false,
            },
            CustomTool1LUTIn4_1 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 204, Green = 204, Blue = 204 },
               CtrlWShown = false,
            }
         },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            MaterialInput = Input {
               SourceOp = "CustomTool1_2",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["SurfaceSphereInputs.SubdivisionLevelBase"] = Input { Value = 73, },
            ["SurfaceSphereInputs.SubdivisionLevelHeight"] = Input { Value = 75, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 2200, 346.5 } },
      }
   }
}


Obviously, if you don't want pinching at the poles you'd need a proper equirectangular texture, but the UVs on the sphere are already set so that should work without the need to do anything except plug the texture into the Material slot.

Capture.JPG
Capture.JPG (336 KiB) Viewed 4119 times

Re: Wrapping bitmap around sphere completely?

PostPosted: Thu Apr 15, 2021 9:42 pm
by cyberfyber
Yes, it's the Shape3D Sphere node.

Going mildly insane with this.

Have tried resizing repeatedly on photoshop based upon one which appeared to work with dimensions of 294 x 196. So I figured, contrary to the 2x1 ratio, a ratio of 1.84 to 1.

Still nothing. I keep ending up with the same result.

Thinking there's some quirky thing in my setup, but no matter what size I go with I end up with the same result. Even an image resized to 200 by 2700 yielded the same thing. Note: Screenshot is NOT of that crazy dimension I just described. (lol)

Screenshot below.

Re: Wrapping bitmap around sphere completely?

PostPosted: Thu Apr 15, 2021 10:15 pm
by cyberfyber
Bryan Ray wrote:More information is needed, I think. Is your Sphere simply the Shape3D node in Sphere mode? It should work flawlessly, like so:



Well, I solved it by simply copying the image within photoshop onto a new file and renaming to something completely different. Whether the naming helped, no clue yet.

But there was something going on with those files I downloaded from NASA which even after editing and resaving as different files brought the same problems.

Thanks for the input. :-)

Re: Wrapping bitmap around sphere completely?

PostPosted: Fri Apr 16, 2021 4:02 am
by Bryan Ray
Weird. Only thing I can think is that maybe the raster was larger than the available pixels.

Regarding the Angle and Latitude controls, they do modify the UVs, such that the end values will "stick" to the edges. So if you wanted to wrap your Blue Marble texture around a hemisphere, it wouldn't work immediately. If you use a UVMap3D node to reset the UVs back to a full sphere, though, then it could work, like so:

Code: Select all
{
   Tools = ordered() {
      Loader1 = Loader {
         Clips = {
            Clip {
               ID = "Clip1",
               Filename = "C:\\Users\\Bryan\\Desktop\\390px-Blue_Marble_2002.png",
               FormatID = "PNGFormat",
               StartFrame = 2002,
               LengthSetManually = true,
               TrimIn = 0,
               TrimOut = 0,
               ExtendFirst = 0,
               ExtendLast = 0,
               Loop = 0,
               AspectMode = 0,
               Depth = 0,
               TimeCode = 0,
               GlobalStart = 0,
               GlobalEnd = 0
            }
         },
         CtrlWZoom = false,
         Inputs = {
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            ["Clip1.PNGFormat.PostMultiply"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1005.33, 66.7576 } },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            MaterialInput = Input {
               SourceOp = "Loader1",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["SurfaceSphereInputs.SubdivisionLevelBase"] = Input { Value = 76, },
            ["SurfaceSphereInputs.SubdivisionLevelHeight"] = Input { Value = 100, },
            ["SurfaceSphereInputs.StartSweep"] = Input { Value = 126, },
            ["SurfaceSphereInputs.EndSweep"] = Input { Value = 292, },
            ["SurfaceSphereInputs.StartLat"] = Input { Value = 51, },
            ["SurfaceSphereInputs.EndLat"] = Input { Value = -32, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 1120, 71.606 } },
      },
      UVMap3D1 = UVMap {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
            MapMode = Input { Value = FuID { "Spherical" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 1230, 71.606 } },
      }
   }
}


Capture.JPG
Capture.JPG (173.28 KiB) Viewed 4036 times

Re: Wrapping bitmap around sphere completely?

PostPosted: Fri Apr 16, 2021 5:22 pm
by cyberfyber
Yeah, it happened to me again after I had to resave the project and get back in.

Needed to once again save a copy of the mesh/texture/image and bring that in anew. Seemed to work better with bmp files. No idea why. Could just be a happenstance thing.

In case you're curious about trying yourself:
https://visibleearth.nasa.gov/images/74 ... generation

Would be interesting to see someone else's experience.

Re: Wrapping bitmap around sphere completely?

PostPosted: Fri Apr 16, 2021 6:08 pm
by Bryan Ray
I think there must be something corrupt in your install. It works perfectly and immediately for me in Fusion Studio 17.1.1., and also in 9.02.

I downloaded the 5400x2700 jpeg.

Re: Wrapping bitmap around sphere completely?

PostPosted: Sat Apr 17, 2021 12:18 am
by cyberfyber
Bryan Ray wrote:I think there must be something corrupt in your install. It works perfectly and immediately for me in Fusion Studio 17.1.1., and also in 9.02.

I downloaded the 5400x2700 jpeg.


Wellll, just uninstalled, rebooted and reinstalled.

Same thing.

This time, instead of copying the image onto a new file (in Photoshop), I simply saved as a bitmap (bmp) and it worked fine.

Crazy.

Re: Wrapping bitmap around sphere completely?

PostPosted: Sat Apr 17, 2021 2:57 am
by Bryan Ray
That makes no sense to me whatsoever. I'm completely at a loss for what could cause it.

Re: Wrapping bitmap around sphere completely?

PostPosted: Mon Apr 26, 2021 9:03 pm
by cyberfyber
Bryan Ray wrote:That makes no sense to me whatsoever. I'm completely at a loss for what could cause it.


Bryan, got Studio today and I tried this all out.

No problem with the image wrapping around the sphere now. Yay!

Re: Wrapping bitmap around sphere completely?

PostPosted: Thu Oct 07, 2021 4:48 pm
by mwinzer
So you ended up getting the $299 version of the software to resolve the issue? Is it as simple as the free version cannot handle sphere jpegs?

Re: Wrapping bitmap around sphere completely?

PostPosted: Fri Oct 08, 2021 3:09 pm
by cyberfyber
mwinzer wrote:So you ended up getting the $299 version of the software to resolve the issue? Is it as simple as the free version cannot handle sphere jpegs?


No one here got any software JUST to solve this issue. In case that's what's being implied.

Re: Wrapping bitmap around sphere completely?

PostPosted: Fri Oct 08, 2021 3:11 pm
by TheBloke
mwinzer wrote:So you ended up getting the $299 version of the software to resolve the issue? Is it as simple as the free version cannot handle sphere jpegs?
I think it should work fine in free. I just tested Bryan's comp in Fusion 9.0.2 free version and it looks fine to me:

Image

(I've shown the whole Sphere3D rather than just a hemisphere )

The fact that the OP was having to save the file as a different name or file format suggests something else weird was going on. maybe nothing to do with Fusion.

Differences in Fusion between Free vs Studio should be pretty obvious - like nodes not available. There aren't to my knowledge any subtle differences, like nodes that exist in both versions but give slightly different results.

Re: Wrapping bitmap around sphere completely?

PostPosted: Tue Oct 04, 2022 6:55 am
by FNahapiet
I had the same problem in Davinci Resolve 18.03

I got the Diffuse Earth image in 6K format. 6000x3000 and I got a 3/4 wrapping with a Ward-Node and a 3D-Sphere.

I resized the image to 1000x500 and I had a perfect wrapping.