Disable anti-alias in O3D Webgl

285 views
Skip to first unread message

Dave

unread,
Mar 29, 2011, 2:27:13 AM3/29/11
to O3D-discuss
Hi all,

I haven't almost complete the segmentation tool O3D-Webgl version.
However, select visible surfaces only works well in Firefox, and
Chrome will select extra unwanted polygons.

I suspect it is anti-alias in Chrome that causes this problem, since
I'm using colour detection to identify visible polygons. While Firefox
does not have anti-alias enabled by default, it seems to read the
correct colours.

So, how to disable anti-alias?

Had tried
var gl = glc.getContext("experimental-webgl", {antialias: false});

But it doesn't seems to work. Any ideas?

Or is there anyway to disable anti-alias specifically for Chrome just
to confirm it is the anti-alias is the main cause the selection
problem.

Thanks
Dave

Dave

unread,
Mar 29, 2011, 2:35:55 AM3/29/11
to O3D-discuss
Hi again,

Ok, I had successfully disabled the anti-alias by modifiying the
client.js in o3d-webgl.
However, I just want it to disable anti-alias for a short period, so
how do I do that without interfering the client.js?

And I confirmed that anti-alias will break picking or polygon
selection based on colours.

Dave

Nicolas Kassis

unread,
Mar 29, 2011, 10:58:28 AM3/29/11
to o3d-d...@googlegroups.com
Hi Dave,

I'm not sure if it's still valid but in the doc for make client:
http://code.google.com/apis/o3d/docs/reference/jsdocs/js_1_0_o3djs.util_ref.html#makeClients
you can pass NotAntiAliased as an option. That should remove the need
from modifying client.js

I don't know if you can do it for short periods and re-enable it late
on the same client.

Nic

> --
> You received this message because you are subscribed to the Google Groups "O3D-discuss" group.
> To post to this group, send email to o3d-d...@googlegroups.com.
> To unsubscribe from this group, send email to o3d-discuss...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/o3d-discuss?hl=en.
>
>

--
-----------------
Nicolas Kassis

Dave

unread,
Mar 30, 2011, 9:56:59 PM3/30/11
to O3D-discuss
Hi Nic,

Thanks for your reply. It is always good to see some one still using
this O3D framework.

However, this method haven't seems to be implemented in the Webgl
version, it toss me an error when I tried to do it.
Also, I realized it can never be done in Webgl since the attributes
such as anti-alias, alpha, depthmask...etc can only be triggered at
the first time when 3D objects gets loaded. The second time you want
to change the anti-alias value using getContext() is simply not
possible. It is also written in the Webgl specfication.

But really appreciate your reply, it just seems that I have to let my
3D objects appears to have jagged edges in order to make the
segmentation feature to work.

Dave

On Mar 30, 12:58 am, Nicolas Kassis <nic.kas...@gmail.com> wrote:
> Hi Dave,
>
> I'm not sure if it's still valid but in the doc for make client:http://code.google.com/apis/o3d/docs/reference/jsdocs/js_1_0_o3djs.ut...
> > For more options, visit this group athttp://groups.google.com/group/o3d-discuss?hl=en.
>
> --
> -----------------
> Nicolas Kassis

Nicolas Kassis

unread,
Mar 30, 2011, 10:14:54 PM3/30/11
to o3d-d...@googlegroups.com
Yeah, that makes sense, I guess you could create a new client
everytime you want to change those settings.

I do feel like were fighting a losing battle continuing to use O3D.
I'm too busy to look at alternatives right now.

If you feel like checking out my app it's now live:
https://brainbrowser.cbrain.mcgill.ca


Nic

> For more options, visit this group at http://groups.google.com/group/o3d-discuss?hl=en.
>
>

--
-----------------
Nicolas Kassis

Dave

unread,
Mar 30, 2011, 11:20:22 PM3/30/11
to O3D-discuss
Hi Nic,

I don't see why we cannot using O3D-Webgl, I think the library itself
is pretty solid - although more samples and features from Google will
be great. Unfortunately, the popularity just isn't there to drive
Google's attention to continue to maintain their own O3D library. Just
hope that once they had finalised the WebGL implementation for Chrome,
they can all come back and re-consider this O3D library for WebGL.
After all, no Web developers likes to code 3D graphics in a low-level
API just to get things working, but low level API is still essential
for flexibility.

And also, nice project btw. Is that in Webgl version?

Dave

Nicolas Kassis

unread,
Mar 30, 2011, 11:50:58 PM3/30/11
to o3d-d...@googlegroups.com
Yes it is, I migrated as soon as the plugin was deprecated.

I have to admit, I have yet to find a real problem with the feature
provided by the O3D library. The only thing I find a little annoying
is the documentation, it would be cool to be able to update it a bit.

Nic

> For more options, visit this group at http://groups.google.com/group/o3d-discuss?hl=en.
>
>

--
-----------------
Nicolas Kassis

Reply all
Reply to author
Forward
0 new messages