invisible geometries are pickable?

8 views
Skip to first unread message

NAV

unread,
Aug 4, 2010, 11:36:46 AM8/4/10
to O3D-discuss
Hi guys,
I just found, that even after I switched some of the transforms loaded
to my scene off (by assigning 'false' to the transform.visible
property), the invisible shapes of those transforms are still reported
in pickInfo. I.e., I click on a floor, but pickInfo reports, say, an
invisible sofa sitting on this floor.
Is this a correct behavior? Or, more important, how to make the
invisible geometries non-pickable?

Thanks in advance,

Alexander ;o)

Lu Chen

unread,
Aug 4, 2010, 1:40:00 PM8/4/10
to o3d-d...@googlegroups.com
Hi Alexander,

What you did should be all that is needed to make invisible geometries non-pickable. I did a quick sanity check in one of my own picking pages and hiding the transform does disable picking on those objects for me. First things that come to mind:

* There is a 'pickableEvenIfInvisible' property in TransformInfo that would yield the behavior you are seeing, but that's set to false by default and I'm assuming you haven't modified that. 

* Do you have any copies of geometry floating around, which might be invisible due to its material? (e.g. Our picking.html sample duplicates a shape when it is picked in order to flash a wireframe; this duplicate appears invisible if you set the 'emissive' param to a certain value, but it's still there and pickable.)

* I don't know when you call pickingManager's update, but does adding an update after you switch the transform to non-visible make a difference?


It's hard to debug this without seeing your example; if none of the above seem to be the issue, I would try using the debugger in WebKit/Firebug in Minefield do something similar to the following on line 544 in picking.js to first make sure the TransformInfo that manages that particular transform knows that it should be be pickable:

if (this.transform.name == 'name_of_the_transform_you_switched_off') {
  console.log('isPickable should be false: ' + this.isPickable());
  debugger;
}

if (this.isPickable() && this.boundingBox) { // and the rest of the code in the file...


--ldc

NAV

unread,
Aug 4, 2010, 2:28:38 PM8/4/10
to O3D-discuss
Hi Lu,
Thanks for quick response, but I think we might talk about different
things: most likely you mean WebGL version, while I am working on the
latest available version of O3D plugin (Mozilla Firefox browser). I
think so because I cannot see the 'pickableEvenIfInvisible' property
in my TransformInfo. If this is the case. then it seems like this is a
bug, and you fixed it in the WebGL version, but forgot to backport the
fix to the plugin one.

Please confirm this.

Thanks
Alexander ;o)

Lu Chen

unread,
Aug 4, 2010, 3:06:06 PM8/4/10
to o3d-d...@googlegroups.com
Hi Alexander,

The WebGL and O3D plugin both share the same o3djs Javascript library (which has the TransformInfo implementation), so there should be nothing to backport. Also, the addition of this pickableEvenIfInvisible property was made back in Dec 2009 (here), before we deprecated the plugin, so the change should be in the o3djs js files you have and it should work for the plugin because the webgl port didn't exist at that point.

The fact that you don't have the pickableEvenIfInvisible property in your TransformInfos is odd -- may I ask where and when you downloaded the o3djs library? Perhaps there is a zip file somewhere that isn't up to date that we need to address. :)

Thanks,
--ldc



Alexander ;o)

--
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.


NAV

unread,
Aug 4, 2010, 5:25:12 PM8/4/10
to O3D-discuss
I've got my O3D sources on May 17-th 2010 from
http://o3d.googlecode.com/svn/trunk/samples/o3djs.
The 'o3djs\.svn\entries' file in my sources indicates that the
revision number of picking.js is 13488.(Oct 06, 2009)

Seems like you guys moved your project from googlecode to some other
place! This explains a lot!!!

Thanks Lu!

NAV

unread,
Aug 4, 2010, 9:07:19 PM8/4/10
to O3D-discuss
Where can I get the latest o3djs code then?

Peterson Trethewey

unread,
Aug 4, 2010, 10:04:39 PM8/4/10
to o3d-d...@googlegroups.com
So, at the moment, the best way to get the current code is to follow
the check out instructions on:

http://code.google.com/p/o3d/wiki/HowToBuild

and download the entire o3d repository from chromium.org, and that
repository, in samples/ you'll find the latest o3djs and o3d-webgl
direcotries and all plugin samples. When you check it out, you'll
also get all the code for the o3d plugin, so the download takes a
while, but it's the most current, and once you do it that way, you can
always sync to the latest version by typing "gclient sync".

--pt

On Wed, Aug 4, 2010 at 6:07 PM, NAV <alexander...@gmail.com> wrote:
> Where can I get the latest o3djs code then?
>

NAV

unread,
Aug 11, 2010, 7:58:00 PM8/11/10
to O3D-discuss
Hi Peterson,
I grabbed the sources as you recommended, but not able to build them.
The HowToBuild instructions (Building on Windows step) read

"On Windows, GYP produces the solution files that are to be loaded
into Microsoft Visual Studio. The "main" solution file is called
"o3d_all.sln", and will appear in the $O3D_ROOT\o3d\build directory".

This step does not work for me. When I run gypbuild, I have the
following:
C:\MyProjects\Trunk\o3d>.\gypbuild
Traceback (most recent call last):
File "C:\MyProjects\Trunk\o3d\\gypbuild.py", line 291, in <module>
main(sys.argv)
File "C:\MyProjects\Trunk\o3d\\gypbuild.py", line 288, in main
GypBuilder(args[1:])
File "C:\MyProjects\Trunk\o3d\\gypbuild.py", line 270, in __init__
func(targets, options)
File "C:\MyProjects\Trunk\o3d\\gypbuild.py", line 165, in Dobuild
self.CheckVisualStudioVersionVsSolution(solution)
File "C:\MyProjects\Trunk\o3d\\gypbuild.py", line 107, in
CheckVisualStudioVersionVsSolution
f = open(solution, "r")
IOError: [Errno 2] No such file or directory: 'C:\\MyProjects\\Trunk\
\o3d\\build\\o3d_all.sln'

Seems like this is a bug for the newcomers like me. You guys never hit
this bug because you already have the o3d_all.sln file created hundred
years ago.

Peterson Trethewey

unread,
Aug 11, 2010, 8:45:23 PM8/11/10
to o3d-d...@googlegroups.com
Did you try "gclient runhooks --force"?

NAV

unread,
Aug 11, 2010, 8:51:07 PM8/11/10
to O3D-discuss
Sorry, this does not work either:

C:\MyProjects\Trunk>gclient runhooks --force

________ running 'C:\MyProjects\Trunk\depot_tools\python_bin
\python.exe o3d/build/gyp_o3d o3d/build/o3d.gyp o3d/tests/lab/ChangeR
esolution/change_resolution.gyp' in 'C:\MyProjects\Trunk'
Traceback (most recent call last):
File "o3d/build/gyp_o3d", line 20, in <module>
import gyp
ImportError: No module named gyp
failed to run command: C:\MyProjects\Trunk\depot_tools\python_bin
\python.exe o3d/build/gyp_o3d o3d/build/o3d.gyp o3d/tests/lab/Ch
angeResolution/change_resolution.gyp

NAV

unread,
Aug 12, 2010, 10:02:14 AM8/12/10
to O3D-discuss
If it requires some time to fix the GYP, could you meanwhile just send
me a zip with all *.sln and *.csproj files that I need to build?
Or, as an alternative, just send the plugin binaries, so I could use
it with the last version of your o3djs library?

NAV
Reply all
Reply to author
Forward
0 new messages