JCPalmer Posted October 2, 2017 Share Posted October 2, 2017 On 9/24/2017 at 12:48 PM, Sailarg said: I want to do the same, only I thought it was easy to apply the 2 effects to the same object xD I do not know much about this topic, but a decent (& much faster) way to get a fish eye effect is done the same way as it is done in the real world, the lens. It is implemented in camera.fov, or focal length. It is measured in radians in BJS, but also can be in units of millimeters. The default camera.fov is 0.80 radians. That corresponds to nothing in the real world, so I have no idea why it got chosen to be that. Most things default to 35 mm (0.857556 radians) due human vision. I typically use 120 mm wide angle lens for my scenes ( 0.265103 radians), but a fisheye lens is about 10 - 15 mm(2.02 - 1.64 radians). I would try doing this first, before doing some expensive post process. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 2, 2017 Share Posted October 2, 2017 About same mesh using two it is unfortunately not possible. Solutions are exactly the already proposed ones: Post Process Lens Setup Create your own shader to apply both lighting + effect (as long as the effect does not needs the several pixels in inputs like in blur) Quote Link to comment Share on other sites More sharing options...
Aerion Posted October 2, 2017 Share Posted October 2, 2017 or we can do like JCPalmer said & with MY idea of using an interpolated Sin ( ) wave that goes back & forth on camera.fov... How would I do that, @JCPalmer? Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 2, 2017 Share Posted October 2, 2017 i like challenge but need tiime Sebavan 1 Quote Link to comment Share on other sites More sharing options...
Aerion Posted October 2, 2017 Share Posted October 2, 2017 how long do you need, @NasimiAsl ? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 3, 2017 Share Posted October 3, 2017 First, do an animation of camera.fov the same way you would of any other of that type. I do not use the BJS animation system. To go back and forth, a beforerender will possibly work better. For a very low focal length, the camera will have to be moved much closer to the subject, but the distortion will be evident as below. Anything which is closer to the camera than something else will look wildly closer / larger. This means any animation of .fov must not be over too wide a range of values, or the camera distance difference will overpower the distortion. FYI, I thought of adding a kind of a "flashback" scene transition effect going from fish eye to previous focal length with harp music. The distance issue stopped me, but did manage to add a "zoom out". There, I go from about 630 mm to whatever the original focal length was. Have not published the source yet, but have added "zoom out" onto a test scene of mine which goes through each of my transitions at random: B&W to color, invisible to visible, out of focus to focus, and now also zoom out. Run this scene over and over till the "zoom out" gets picked as the transition. On a side note, @Deltakosh or @Sebavan, could I add a setter / getter pair for focalLength? They would only change / reference fov. Radians suck. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 3, 2017 Share Posted October 3, 2017 Please do and create a PR :-) Thx a lot. Quote Link to comment Share on other sites More sharing options...
Aerion Posted October 3, 2017 Share Posted October 3, 2017 I agree! <3 Quote Link to comment Share on other sites More sharing options...
Aerion Posted October 5, 2017 Share Posted October 5, 2017 @NasimiAslWould like to see a PR! <3 Quote Link to comment Share on other sites More sharing options...
Aerion Posted October 7, 2017 Share Posted October 7, 2017 @DeltaKosh are there any underwater effects demos lying around? I can't find anything that remotely resembles automatically increasing & decreasing the FOV view so it creates an underwater-like effect. :/ Thanks! ~M Quote Link to comment Share on other sites More sharing options...
Aerion Posted October 12, 2017 Share Posted October 12, 2017 @NasimiAsl Any luck buddy? <3 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 13, 2017 Share Posted October 13, 2017 need some video or picture for make last result Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.