vahith Posted February 2, 2015 Share Posted February 2, 2015 Hi All; i am creating simple box and some other mesh, when i am rotating camera jagged lines are visible, how to avoid aliasing. and i should pick the cube also.. Quote Link to comment Share on other sites More sharing options...
jerome Posted February 2, 2015 Share Posted February 2, 2015 please, reproduce it in the playground Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 2, 2015 Share Posted February 2, 2015 To antialias your scene you can use :yourCamera.attachPostProcess(new BABYLON.FxaaPostProcess("fxaa", 1.0, yourCamera, BABYLON.Texture.BILINEAR_SAMPLINGMODE, engine, false));with BILINEAR_SAMPLINGMODE, TRILINEAR_SAMPLINGMODE or NEAREST_SAMPLINGMODE Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 2, 2015 Share Posted February 2, 2015 And for picking there is info here :https://github.com/BabylonJS/Babylon.js/wiki/11---Picking-collisionsAnd playground :http://www.babylonjs.com/playground/?11 Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 2, 2015 Share Posted February 2, 2015 You can also use actions to pick objects and do some stuff :https://github.com/BabylonJS/Babylon.js/wiki/How-to-use-Actions Quote Link to comment Share on other sites More sharing options...
vahith Posted February 2, 2015 Author Share Posted February 2, 2015 hi Vousk;Thanks for reply, but even i am getting jagged line when i am rotating camera.kindly check this test case linkhttp://www.babylonjs-playground.com/#1JSJOX orhttp://www.babylonjs-playground.com/#1JSJOX#2 Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 2, 2015 Share Posted February 2, 2015 Hmm, that's strange.If I deactivate antialias filter in the playgrounds you posted I have no "jagged" problem. What browser are you using, and what environnement PC, mac, mobile phone ?Or maybe I don't get what you mean exactly by jagged edges... (BTW, in this case antialias filter is not needed, in fact edges are even uglier with antialias activated here) Quote Link to comment Share on other sites More sharing options...
vahith Posted February 3, 2015 Author Share Posted February 3, 2015 hi vousk;i am using Firefox and chrome,i tried in mac and windows also.. if you see my playground. the jagged edges are visible in cube when i am rotating. i want to avoid the jagged edges... Quote Link to comment Share on other sites More sharing options...
jahow Posted February 3, 2015 Share Posted February 3, 2015 Hi, I don't think you can get much better edge smoothing that the default one without aliasing: http://www.babylonjs-playground.com/#1JSJOX#4 You can try rendering the scene to a larger texture (2 times in this example) and then applying the FXAA effect, like so: http://www.babylonjs-playground.com/#1JSJOX#5But this is going to be costly... Quote Link to comment Share on other sites More sharing options...
vahith Posted February 3, 2015 Author Share Posted February 3, 2015 hi;still i am getting same. Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 3, 2015 Share Posted February 3, 2015 May I ask how you initialize your engine? Does it happen with examples in the playground as well? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 3, 2015 Share Posted February 3, 2015 This is what I get on the second playground you post ( http://www.babylonjs...d.com/#1JSJOX#2 ), with antialias filter deactivated (base camera with no effect, line 9 commented).Maybe your graphic card the culprit ? Quote Link to comment Share on other sites More sharing options...
vahith Posted February 3, 2015 Author Share Posted February 3, 2015 hi Vousk,thanks for giving direction...yes culprit is graphic card ...i checked higher version its working fine Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 3, 2015 Share Posted February 3, 2015 Good news ! Well... erm, bad news for you of course, but good news for BabylonJS, I mean... GameMonetize 1 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.