Notifications
Clear all
[Closed] Possible to mirror the viewport via maxscript?
Page 2 / 2
Prev
Mar 13, 2008 3:01 pm
Thanks, I will see if I will be able to use it. All this scripting is getting over my head
Mar 13, 2008 3:01 pm
I almost got it work, but seems like I’m unable to mirror camera view correctly. For some time I thought that this works ok:
active_camera = viewport.getCamera()
FlipViewMatrix = active_camera.transform
FlipViewMatrix.row1 = (FlipViewMatrix.row1 * [-1,-1,1])
active_camera.transform = FlipViewMatrix
It works very weird way. It looks like there are some angles where it works ok, while it doens’t work with other angles.
Mar 13, 2008 3:01 pm
If you don’t want to have to use a camera you can also write a DirectX Shader to do it.
Should be a supppper easy DX shader.
for y = 1 to framebuffer.height do
(
newXframebuffer = #()
for x = 1 to framebuffer.width do
(
append newXframebuffer.pixel framebuffer.pixel[y][framebuffer.width-x]
)
framebuffer[y] = newXframebuffer
)
I have no idea how to write a DX shader… but that’s how I see it going in my head.
Mar 13, 2008 3:01 pm
Thanks thatoneguy, but honestly, with my programming experience this is just too much for me
Page 2 / 2
Prev