Items with no label
3335 Discussions

How to manually generate a UVmap in unity

SWåli
Beginner
786 Views

Hi! I'm working on a unity project where we don't have access to the realsense device itself, just the video stream and the depth data via ethersense. How would we go about creating a unity UVmap using those two? Or is the UVmap generated by the camera itself? I have tried this but couldn't get it to work probably because it needs a physical device to be plugged in. I'm using realsense 435. Thanks for any help!

0 Kudos
3 Replies
MartyG
Honored Contributor III
469 Views

It sounds as though you are using a live stream from the camera via ethernet but you do not have physical access to the camera. Is that correct, please?

 

I'm not certain how precisely to go about creating a UVMap in the SDK's Unity wrapper. Looking through the wrapper's point cloud renderer script though and highlighting references to UVMap by doing a find on the browser page for 'uvmap', it seems to be generated from a Unity 'Texture2D' material. This would make sense, since the Unity wrapper displays camera data by applying it onto a Unity material.

 

https://github.com/IntelRealSense/librealsense/blob/master/wrappers/unity/Assets/RealSenseSDK2.0/Scripts/RsPointCloudRenderer.cs

0 Kudos
SWåli
Beginner
469 Views

> It sounds as though you are using a live stream from the camera via ethernet but you do not have physical access to the camera.

Yes, that's correct.

 

Thanks for the hint! I've already been in that script though but not been able to decipher much besides that the data that seems to be comming from a call to `data.data()` which is generated by a operator override of `=` which my editor can't figure out where it's beign used at. The data beign put into the uvmap seems strange too.

0 Kudos
MartyG
Honored Contributor III
469 Views

For a next step, I would recommend posting a question at the RealSense GitHub, where the people who work on the Unity wrapper are. You can do so by visiting the link below and clicking the New Issue button.

 

https://github.com/IntelRealSense/librealsense/issues

 

To make sure your message gets to the eyes of the right people, I also recommend putting @madkatz in your message so it gets highlighted to madkatz, a developer who works on the Unity wrapper.

0 Kudos
Reply