christianselig,
@christianselig@mastodon.social avatar

Blender folks: I have a 180° frame from YouTube that I want to stretch inside a half-sphere to make it 180° immersive. The image is rectangular, so I'm struggling with the UV map since unwrapping a sphere cuts the corners off, and scaling it up loses the spherical effect. How would you reconcile that?

Blender showing a half-sphere with its "default" UV map where it's just a rectangle with points at the top
Blender showing an unwrapped UV map for a half-sphere showing a circle over artwork

dan,
@dan@duck.haus avatar

@christianselig I'm sure there's a way to do it in Blender with Texture Coordinates in the shader graph or something, but I can’t figure it out. The cheater's solution, which I assume doesn't work for you(?), is to just double the width of the image horizontally. Basically un-crop it 200% in width like this.

christianselig,
@christianselig@mastodon.social avatar

@dan Hmm but then you would lose the sphere effect wouldn't you? As the image would be wider than it would be tall?

dan,
@dan@duck.haus avatar

@christianselig Okay, I figured it out. Don't unwrap the sphere's uv's just use them as-is. in the UV Editor scale them in X to -2 (since you want the texture on the inside). That'll get you a sphere with 2 copies of the image, split down the middle…

dan,
@dan@duck.haus avatar

@christianselig If you want only one copy of the image, and black on the other side of the sphere, do something like this in your shader graph.

image/png

christianselig,
@christianselig@mastodon.social avatar

@dan Ah that's awesome, I ended up basically doing this, but splitting the sphere in half so only half the UV map is present, then scaling it horizontally by two so it covers the whole map fully

dan,
@dan@duck.haus avatar

@christianselig Oh, nice. Yeah, that's the same thing, you just don't have all those extra UVs hanging off the sides to deal with. I really expected there to be some way to specify a partial equirectangular image in the shader graph, but apparently it's just good old UVs for this.

christianselig,
@christianselig@mastodon.social avatar

@dan Yeah, I should have elaborated that I needed it in UVs anyway since I'm exporting the shape for use in RealityKit

dan,
@dan@duck.haus avatar

@christianselig I mean, I should have assumed that automatically because I'm literally doing that, too. I just…hate working with UVs.

caseyliss,
@caseyliss@mastodon.social avatar

@christianselig I’m talking way outside my wheelhouse, but this reminds me of a post that I saw linked on Daring Fireball recently:

https://blog.mikeswanson.com/post/747761863530528768/apples-mysterious-fisheye-projection

christianselig,
@christianselig@mastodon.social avatar

@caseyliss That was actually super interesting and applicable. I admittedly wish there was a "noob" section covering how the heck to create such a complex UV map in Blender though

evankstone,
@evankstone@iosdev.space avatar

@christianselig @caseyliss I'm interested in getting started with Blender, but not quite sure where to start. I'm assuming YouTube tutorials?

christianselig,
@christianselig@mastodon.social avatar

@evankstone @caseyliss Yeah there’s a bunch of tutorials out there thankfully. Oddly not a ton on editing UV mappings of default shapes though like this

khaost,
@khaost@tz.is avatar

@christianselig Just use a normal sphere and tile the texture in half ;)

image/png

christianselig,
@christianselig@mastodon.social avatar

@khaost That's so clever and so simple in hindsight, wow. Why is the UnlitSurface looking lit, however?

khaost,
@khaost@tz.is avatar

@christianselig Unlit Surface/Material just don't react to the lights in the environment, so it will show whatever color it is. It's useful for more accurate video playback in most cases.

christianselig,
@christianselig@mastodon.social avatar

@khaost Sorry, I meant that does look like it's reacting to the lights since it's all washed out (see source image giraffe) compared to using an UnlitMaterial without a shader

khaost,
@khaost@tz.is avatar

@christianselig Fixed by creating TextureResource with semantic - color

christianselig,
@christianselig@mastodon.social avatar

@khaost Yay!!

schwa,
@schwa@mastodon.social avatar

deleted_by_author

  • Loading...
  • christianselig,
    @christianselig@mastodon.social avatar

    @schwa @khaost Why take it down? There's so few shader examples out there :p

    That's really fascinating though, is there an effective difference between the two approaches from a performance perspective?

    schwa,
    @schwa@mastodon.social avatar

    deleted_by_author

  • Loading...
  • christianselig,
    @christianselig@mastodon.social avatar

    @schwa @khaost Love me some shader examples, thank you! That reminds me did you ever make progress with that water shader you were talking about?

    schwa,
    @schwa@mastodon.social avatar

    deleted_by_author

  • Loading...
  • mariani1,
    @mariani1@mastodon.social avatar

    @schwa @christianselig @khaost Are we still talking about shitting out your breakfast?

    christianselig,
    @christianselig@mastodon.social avatar

    @schwa @khaost Hahah gassy could be fun. But yeah I'm considering just baking the water animation into a USD and playing/looping it manually

    schwa,
    @schwa@mastodon.social avatar

    deleted_by_author

  • Loading...
  • christianselig,
    @christianselig@mastodon.social avatar

    @schwa @khaost The user can't actually interact with the water so I'm not too worried about actually accurate fluid dynamics (in fact nothing can interact with the water). It's more of an ambient environment to watch videos in goal, sorta like how Mount Hope has the lake with little pulses

    schwa,
    @schwa@mastodon.social avatar

    deleted_by_author

  • Loading...
  • christianselig,
    @christianselig@mastodon.social avatar

    @schwa And animating the changes isn't too hard? So many existing shader examples just seem like a static transform to a single frame

    schwa,
    @schwa@mastodon.social avatar

    deleted_by_author

  • Loading...
  • christianselig,
    @christianselig@mastodon.social avatar

    @schwa !!

    khaost,
    @khaost@tz.is avatar

    @schwa @christianselig There are a few examples on YouTube for doing this in Unity, you can mostly mirror the shader graph setup to get something similar

    video/mp4

    christianselig,
    @christianselig@mastodon.social avatar

    @khaost @schwa Yo wtf

    schwa,
    @schwa@mastodon.social avatar

    deleted_by_author

  • Loading...
  • christianselig,
    @christianselig@mastodon.social avatar

    @schwa @khaost Y'all are seriously the best, thank you!

    schwa,
    @schwa@mastodon.social avatar

    deleted_by_author

  • Loading...
  • christianselig,
    @christianselig@mastodon.social avatar

    @schwa @khaost That's too bad but on the other hand it's an honor to meet the guy who left the iPhone 4 in the bar

    christianselig,
    @christianselig@mastodon.social avatar

    @schwa This is probably a me issue, but I went to open it today to check something and poking around inside I don't see the USDA file inside the RealityComposePro package, how do I get to the yummy bits

    schwa,
    @schwa@mastodon.social avatar

    deleted_by_author

  • Loading...
  • christianselig,
    @christianselig@mastodon.social avatar

    @schwa Sorry, I meant more so what does your linked code represent? I don't see any code in the linked file 😅

    schwa,
    @schwa@mastodon.social avatar

    deleted_by_author

  • Loading...
  • christianselig,
    @christianselig@mastodon.social avatar

    @schwa That's what I was hoping for, but it's a .realitycomposerpro directory, aren't shaders .usda?

    its_john_davis,
    @its_john_davis@mastodon.social avatar

    @christianselig well, you know the YouTube Video is spherical, but stretched from being a circle, so I think you want to represent that in the UV map.

    The resulting shape may look a lot like the images in this recent article:

    https://hackaday.com/2024/04/18/unraveling-the-secrets-of-apples-mysterious-fisheye-format/

    christianselig,
    @christianselig@mastodon.social avatar

    @its_john_davis Yeah I suppose my question was more so how the heck do you format a UV map like those in the article haha

    its_john_davis,
    @its_john_davis@mastodon.social avatar

    @christianselig my blender skills range from “bad” to “real bad”, but I would try to move the four corners with the “magnetize” option on where it can drag nearby points along an “influence-curve”.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • rosin
  • GTA5RPClips
  • vwfavf
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • Youngstown
  • ngwrru68w68
  • slotface
  • thenastyranch
  • ethstaker
  • khanakhh
  • kavyap
  • InstantRegret
  • normalnudes
  • modclub
  • osvaldo12
  • anitta
  • everett
  • Durango
  • cisconetworking
  • cubers
  • Leos
  • provamag3
  • tacticalgear
  • tester
  • megavids
  • JUstTest
  • All magazines