Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PointCloud2 broken in v0.18.0 #213

Closed
drigz opened this issue Feb 13, 2018 · 6 comments
Closed

PointCloud2 broken in v0.18.0 #213

drigz opened this issue Feb 13, 2018 · 6 comments

Comments

@drigz
Copy link
Contributor

drigz commented Feb 13, 2018

We were unable to display a PointCloud2 with v0.18.0 and THREE r88 or v89. There is an error on the console:

THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.

and no point cloud is visible (Chrome on OS X) or it is barely visible (Chrome on Linux).

We were able to resolve this by replacing the THREE.ShaderMaterial in ROS3D.Particles with a THREE.PointsMaterial. Is there a reason it's not using a PointsMaterial? It would be much simpler than including a shader. It would also resolve #195 as PointsMaterial doesn't require a texture, although it does allow one. However, I'm not sure if PointsMaterial allows each point to have its own color.

@DLu, do you know if PointsMaterial will work for PointCloud2?

If you'd like to switch to a PointsMaterial we can send a pull request.

@DLu
Copy link
Contributor

DLu commented Feb 13, 2018

Its been awhile since I've looked at this viz code. I know @jihoonl changed the version of Three.js in #202 but it doesn't look like that touched the PointCloud stuff. I was frustrated by the Three.js version when I wrote the PointCloud (but can't remember why). If its not working with the updated version, then feel free to make the pull request.

@jihoonl
Copy link
Member

jihoonl commented Feb 13, 2018

Yup, it sounds like it is sideeffect after updating the code base. Could you send a PR to fix the issue?

@Solrac3589
Copy link

Solrac3589 commented Mar 27, 2018

Hello.

Right now i have been facing the same issue.

Seems that Ros3Djs is using an old and deprecated version of THREE.Points called THREE.ParticleSystem in which, the inputs have changed a little.

the first element used is THREE.Geometry, but due to the fact that there is a new class called THREE.BufferGeometry which, in theory is more fast (https://threejs.org/docs/#api/core/Geometry) maybe is interesting to check the change.

it is also necessary to move the attributes element from shaderMaterial to THREE.BufferGeometry (is the new place (mrdoob/three.js#7184). I think THREE.Geometry is not compatible with this element, so, that's another reason why i think it is interesting to check THREE.BufferGeometry.

I do not know if it is necessary to do more internal changes in ros3djs in order to solve incompatibilities. Probably xD.

Due to the fact that is a capability that probably I will apply in my work, I will waste a few time on try to solve that (even being a completely newbie on this world). I'm not sure to success, but if I do, I will tell something (at least if i develop more which elements are necessary to change) :)

@mbredif
Copy link
Contributor

mbredif commented Apr 4, 2018

@Solrac3589, could you test #218 ?

@Solrac3589
Copy link

Im busy these days. ASAP I give feedback

@jihoonl
Copy link
Member

jihoonl commented Apr 15, 2018

#218, should be fixed by #218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants