Request: viewport_circle(x,y,radius) -- EXAMPLE ADDED

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Post Reply
Message
Author
Toddimus
Posts: 34
Joined: Wed Feb 17, 2021 6:01 pm

Request: viewport_circle(x,y,radius) -- EXAMPLE ADDED

#1 Post by Toddimus »

Hi there,

I looked around for a viewport circle and the closest thing I could find was Ralph's example siff for a custom viewport. While that satisfies some use cases, it ultimately requires blocking a rectangular region at the outer extremes. I want the effect to end at the outer edge of the circle. I'd like to be able to move an image across and behind a circular viewport while not affecting the layering transparency outside the circle. Think moving glare on a steam gauge face. It needs to end at the edges of the bezel and not show up on the rest of the rectangular instrument's pixels.

I know it's been requested in the past, along with a polygon viewport shape. I just wanted to add another vote for this.

Can we pretty, pretty please have something like this? I think we could make some really cool stuff with it.

viewport_circle(x , y, radius)

Thanks!
Last edited by Toddimus on Thu Dec 28, 2023 9:01 pm, edited 1 time in total.
Simstrumentation Instrument developer
Check us out http://www.simstrumentation.com or https://github.com/Simstrumentation/Air-Manager

Toddimus
Posts: 34
Joined: Wed Feb 17, 2021 6:01 pm

Re: Request: viewport_circle(x,y,radius)

#2 Post by Toddimus »

So I decided to see if I could replicate this effect with the tools available and it turns out that, technically yes I can... but it's not really feasible in normal use.

It's a crude, brute force way of getting a result similar to what I'm asking for. Way too processor heavy if you make the circle have nice edges with a higher "pixel" density. Check out the code to see how I did it.

Demo - Viewport Circle Demo.siff
(16.69 KiB) Downloaded 23 times
Simstrumentation Instrument developer
Check us out http://www.simstrumentation.com or https://github.com/Simstrumentation/Air-Manager

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Request: viewport_circle(x,y,radius) -- EXAMPLE ADDED

#3 Post by Sling »

Another bump for a viewport circle or the ability to add a circular canvas which would give a similar ability is really needed. This was originally discussed back in the AM3.6 thread.

https://siminnovations.com/forums/viewt ... 667#p17667

Post Reply