[SOLVED] How to keep a 3d Distorted Hotspot upright

Q&A about the latest versions
Post Reply
Branigan
Posts: 215
Joined: Tue May 19, 2020 3:43 pm

Wed Oct 14, 2020 12:26 pm

Edit: the Solution from Neal is at the bottom of this thread, about 8 posts down. Turns out to be quite simple, as long as you already know everything there is to know about all the minutiae of Pano2vr. :wink:

The problem: Wanting an image (logo) on the Nadir that stays perfectly in place when the camera pans down and is always displayed upright.

Images on Hotspots (which is what I first tried using) jiggle about as well as scale differently and slide about when looking down (or up to the zenith) and generally don't really work for this, although they do stay facing upright. They're not really an option for hiding a tripod unless you make them really large to allow for the 'sliding about' when looking down.

"Obvious" solution: is to use a 3D Distorted image - like a patch - on the Nadir, but that rotates with the panorama, so spends most of its time upside down, sideways and generally being unhelpful.

Attempted fix: set the angle of the rotation of the hotspot image according to the rotation angle of the panorama.

Couldn't find an easy way to do this continuously, so attempted to use Logic Blocks and every 90 degrees the image would rotate to the new position with a Transition of 0.5 seconds, so if you happened to look down and rotate at the same time, it looked smooth and/or 'on purpose' and it was 'mostly' upright more of the time. Plan was to use maybe 8 positions at 45 degrees, so it was never too far off upright, although it just being always upright was the goal. Horrible number of logic block tests though. Dread to see the code generated.

Problem: when it gets to 270 degrees and wants to go back to 0 it rotates 270 degrees backwards, which doesn't look quite as good. Was wondering if a MOD on the angle would fix it, but even if the value went over 360 degrees, it still wouldn't go forwards to 0, as I want the MOD on the internal value used for the position and for the Transition to know which way to flip (always clockwise or anticlockwise).

"Least Worst" solution is 8 angles with no transitions between angles, but it looks bad 'flipping' between the positions.

The simple option would be for a 3D Distorted image to have an "Always Upright" Selection option. Maybe in the next release? :)

Any better way to do this?

Other products seem to have this as a default behaviour for company logos etc. where the Nadir has either been already patched and you want an 'always upright' logo with Transparency (PNG) or to cover the Tripod without being too large if not.
Last edited by Branigan on Fri Oct 23, 2020 1:06 pm, edited 1 time in total.
Branigan
Posts: 215
Joined: Tue May 19, 2020 3:43 pm

Wed Oct 21, 2020 4:21 pm

In case anyone else was wondering about this, Hopki sent me this link in reply via Support.

viewtopic.php?f=13&t=15185

So short answer is: No, not really. At least not like that; which provides a spinning hotspot, which is only upright 1/360 = 0.27% of the time. :|

Maybe if you learn CSS you can take it further. :D
User avatar
Hopki
Gnome
Posts: 10748
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Wed Oct 21, 2020 10:02 pm

Hi Dave,
In your support e-mail, the only reference to this was "So, no way to continuously rotate a 3D Distorted Hotspot image then?".
So I gave you the link to the post to continuously rotate and element.

You did not mention anything about wanting a logo to always face forward.
But now you have, I would have said to use a point hotspot.
I know you say it may not cover the tripod, so you have the options, make the hotspot image larger, or using the patch editor remove most or all of the tripod.

I can only assume you're using a one-shot camera, otherwise, you would take the down shot and stitch it in after if this is that much of an issue.
But make sure your tripod has the smallest footprint as possible.
Always try and place the camera somewhere where you can easily use content-aware, if you use Photoshop or the clone brush to correct the nadir.
Regards,
Hopki
Garden Gnome Software Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Branigan
Posts: 215
Joined: Tue May 19, 2020 3:43 pm

Thu Oct 22, 2020 11:56 am

Hopki wrote:
Wed Oct 21, 2020 10:02 pm
Hi Dave,
In your support e-mail, the only reference to this was "So, no way to continuously rotate a 3D Distorted Hotspot image then?".
So I gave you the link to the post to continuously rotate and element.

You did not mention anything about wanting a logo to always face forward.
But now you have, I would have said to use a point hotspot.
I know you say it may not cover the tripod, so you have the options, make the hotspot image larger, or using the patch editor remove most or all of the tripod.

I can only assume you're using a one-shot camera, otherwise, you would take the down shot and stitch it in after if this is that much of an issue.
But make sure your tripod has the smallest footprint as possible.
Always try and place the camera somewhere where you can easily use content-aware, if you use Photoshop or the clone brush to correct the nadir.
Regards,
OK, you're a busy guy and spread pretty thin, so it's easy to miss things. :) In my last Support email I sent you a link to this thread, so you'd see it directly and not miss it when scrolling through the forums as you evidently hadn't when you'd replied. I'd asked you a question about hiding the Icons/butttons tools, which when we'd clarified what I meant by that: you answered and I said "thanks, but nothing about Continuously rotating hotspots, then?" The wording was possibly confusing, but in the context of the thread above, which I thought you had seen (but sent the link anyway): I want them to be continuously adjusting their rotational angle. And as it also says above: Point Hotspots don't work well because hotspots wander about due to their 'unique' maths and need to be too large. If they'd stay still they'd be fine. As they don't: better solution needed. :)

I also have removed the Tripod, so that's not the main issue, although using a solid logo would remove it if it was able to be small enough for me or anyone else who wanted this.

No, what I want is a stable, stuck firmly to the ground, but also rotating, PNG logo over a clear floor most of the time. For those times I'm being lazy (or the client is cheap) I'll just use a SMALL non-transparent logo to hide the tripod.

So, if that's clearer, is it possible and could it also be an option for V7? Several other programs have this, it seems a 'standard', just like stable hotspots and better transitions.
Neal
Posts: 163
Joined: Thu Dec 12, 2013 11:14 am

Thu Oct 22, 2020 4:38 pm

There are only 3 options when it comes to the tripod area, either you take a photo of that area without the tripod in place, you attempt to simulate that area using something like content-aware fill or cloning or you cover it with an image. Taking a photo is the ONLY method that will give you a consistently clear floor in a cost-efficient manner.

I have started using a combination of a patch with content-aware fill. If I just remove the legs, the content-aware fill does a really good job most of the time. It the main area directly down that tends to look like a Picasso drawing. But by removing the legs, I have reduced the total area by over 50%, so a much smaller nadir is needed.

To keep the image upright, I would use the "Pan North" source. Think of the nadir as a large compass icon. Adjust the offset as needed, you may need to set the factor to a -1, to get the direction of rotation correct.

You can also combine these, use a solid nadir with the logo rotating on top. If the logo has a clear background or the color matches the nadir, you will not see that only it is rotating.
Branigan
Posts: 215
Joined: Tue May 19, 2020 3:43 pm

Thu Oct 22, 2020 6:37 pm

Neal wrote:
Thu Oct 22, 2020 4:38 pm
There are only 3 options when it comes to the tripod area, either you take a photo of that area without the tripod in place, you attempt to simulate that area using something like content-aware fill or cloning or you cover it with an image. Taking a photo is the ONLY method that will give you a consistently clear floor in a cost-efficient manner.

I have started using a combination of a patch with content-aware fill. If I just remove the legs, the content-aware fill does a really good job most of the time. It the main area directly down that tends to look like a Picasso drawing. But by removing the legs, I have reduced the total area by over 50%, so a much smaller nadir is needed.

To keep the image upright, I would use the "Pan North" source. Think of the nadir as a large compass icon. Adjust the offset as needed, you may need to set the factor to a -1, to get the direction of rotation correct.

You can also combine these, use a solid nadir with the logo rotating on top. If the logo has a clear background or the color matches the nadir, you will not see that only it is rotating.
The tripod is small and quite far away and is easy to clone it out, so that's not the main problem. I can use no logo if/when I want to. I just want to be able to have a logo without it looking ridiculous. Having one on top of another to hide how bad the first one is would be ridiculous^2.

The two options currently available are:
1) 3D Distorted Nadir logo 'hotspot' that stays 'stuck to' the ground, but rotates with it: <Bzzzt!> Nope.
2) Normal undistorted Hotspot that can stay upright, but wanders around especially when you pan down, as it seems to act as if it's on a slightly smaller 'sphere' than the rest of the panorama, so looks: sloppy. <Bzzzt!> Nope again.

While I certainly am tangentially interested in solving a 'hide the tripod' problem - which many others would probably like too - I actually want a "feature" that every other panoramic software has, which is: an always upright PNG, (semi-transparent or with holes in if tripod removed; just solid if not?) logo that stays in place over where the nadir either was, or - if the tripod hasn't yet been cloned etc. away - still is, without it having to be huge to make up for the wandering Hotspot maths.

Who wouldn't want that? Closest I've seen was someone posting a 'how to put an image on the Nadir as a Hotspot' some time ago, which I used for a while, but it's hardly the ideal solution, given the wanderiness of the hotspots. They slide off and reveal the Tripod unless they're pretty huge. That's why I clone the tripod away and you semi-remove the worst of it, so would probably like this too. Even when it's been completely removed they still look weird sliding about. It's just another of those things that makes the client ask "Why is it doing that? Can it not do that? I've seen other Panoramas that don't do that" etc. Which is always embarrasing.

What's the Pan North Source? And if it works, why was it neccessary for someone to make a video about using a normal Hotspot, or for you to suggest two hotspots?

As Martin has shown that in CSS you can rotate the 3D Distorted hotspot, then linking that into the Pan angle so it remains upright would be Super useful for just about everyone. Not having to learn CSS to modify what Martin's provided so far to get what seems a fairly standard feature would be a huge bonus. :)
Neal
Posts: 163
Joined: Thu Dec 12, 2013 11:14 am

Fri Oct 23, 2020 2:24 am

Try this.

In the skin create a hotspot, add your image under it.
In the hotspot properties, under "Hotspot Template" enable "3D Distortion". I kept the distance at 500px, however, if it appears not to move with the floor adjust that number.
Give the hotspot an ID name that works for you

In the properties for the image,
Place the Anchor in the center and make sure x & y positions are 0

Now add a modifier.
Target = rotate
source = Pan
Factor = 1
Offset = 180 (adjust this to get image pointed up)

In the pano editor.
Use an image hotspot.
Set the skin ID the ID name you choose for the one you created in the skin
set Pan = -180
Set tile = -90

If necessary, scale the image to the right size in the skin editor.

If you sit there a quickly spin the pano while looking down, there is a lag in the image correcting. Almost like it is being pulled with the rotation. But the image does stay upright and finishes upright. But unless their name is Karen, I really don't see someone complaining about that.
Branigan
Posts: 215
Joined: Tue May 19, 2020 3:43 pm

Fri Oct 23, 2020 1:04 pm

Ding! Ding! Ding!

We have a Winner! Yep, that's exactly it! :D

The teeny tiny delay is certainly acceptable enough. There are worse thing to worry about.

I tried moving the hotspot to the top of the asset tree to see if it getting first dibs at the processing helped, but can't say I could tell any difference compared to when it was at the bottom.

The only difference for me was, I did not need to set the offset to 180 - that made it inverted - left at 0 worked, but that's because I also left the Pan at 0 (not -180) and Tilt at -90 when placing the hotspot.

Both are valid: 0+0=0 and -180+180=0

Changing the thread title to SOLVED so others can see your solution. :P

Would be perfect if we just had an extra tick box and it didn't have that teeny, tiny lag, because who knew this was even possible before, compared to the number who would like to use it?
.
upright.jpg
upright.jpg (23.71 KiB) Viewed 55 times
.
logo.gif
logo.gif (7.27 MiB) Viewed 54 times
Last edited by Branigan on Sat Oct 24, 2020 6:38 pm, edited 1 time in total.
User avatar
Hopki
Gnome
Posts: 10748
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Fri Oct 23, 2020 6:46 pm

@Niel,
Nice one, did not think of that in this post.
My next webinar is looking at Modifiers and covers this would you believe.
I look at many things but for hotspots being used for Nadir Logos I will show Modifiers to scale the image, 1/tan(FoV) but now will add Pan in the image :wink:
Regards,
Hopki
Garden Gnome Software Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply