Skip to main content
10-Marble
October 5, 2021
Solved

3D Image in Hololens not showing when Published

  • October 5, 2021
  • 1 reply
  • 5130 views

Anyone with Hololens experienced this?
I tried to publish a 3D model with 2D Image (.jpg) in a 3DImage widget.
During Preview, i can see the 2D Image.

But when I publish it, i can't see the 2D Image at all.
Attached is the sample image when previewed.

But when viewed in the actual hololens, the 2D image is nowehere to be seen.

Is there a special js code for this one?

Best answer by RolandRaytchev

Hello @Adrian_G. ,

tested your project on HoloLens 2 device but so far  it was working OK.

 

2021-10-13_12-13-37.jpg

 

when clicking on the checkbox it displayed the 3dImage widget and the display was OK.

Whe it not work in your project  - there  is possibly something based on other reasons and is not a problem of the 3DImage or  file format

I think the following points could be checked there:

  • please, check if your device OS is updated and if the Vuforia View is also updated - to last possible version
  • is there a enough memory on your device- possibly there are a lot of app installed or lot of data is recorded. So, you can check in the MS HoloLens dev portal. and delete the data  e.g.

2021-10-13_12-48-09.jpg

  • in the picture  above you can see the Vuforia View log file. You can start a new session and test the issue so that it is sometimes reproducible . Then you can take the VuforiaViewLog (the last 3 versions) and check there is there is an error pointing that is display issue. Respectively you can share there the log files
  • You can use another pictures and check if they are displayed in your project. So to be user that issue on your system is relevant with the pictures

you can create a new project having only one space target and 3DWidget and check if in this minimal project the issue still occurs.

 

Regarding to the project implementation I have some remarks so that we make it more efficient:

  • I see that for each component what you want to highlight you use and extra 3d Model - the whole top assembly . I think this not efficient regarding to memory usage. Better is instead to use only one Top assembly model and to define for specific component extra modelItem widget which could be highlighted by setting of colors or shader properties (for HoloLens sharers will work but requires extra efforts to get the GLSL to work , so far I know).
  • To be sure that the javascript will update you have to add an asynchronous call – example  :

 

$scope.belt=function()
 {
 
		$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/Belt_Low.pvz';
 $scope.view.wdg['3DImage-1']['src'] = 'app/resources/Uploaded/Slide21.JPG';
 $scope.$applyAsync();
 
 };​

or better to use the setWidgetProp api:

		$scope.belt=function()
 {
 
		$scope.setWidgetProp('model-1', 'src', 'app/resources/Uploaded/Belt_Low.pvz')
 $scope.setWidgetProp('3DImage-1', 'src', 'app/resources/Uploaded/Slide21.JPG');
 $scope.$applyAsync();
 
 };​
  •  I did also not see an unset function for the case that the check box is unselected. This could be helpful to see any difference when a checkbox is unselected.

1 reply

21-Topaz I
October 8, 2021

Hi @Adrian_G. ,

Is this picture what is attached the picture what you tried to used. I tested the issue for the HoloLens device with the current Studio /View app release / update this week and was not able to reproduce the problem on the Hololens. Tested the picture on both widgets – 3DImage button and 3DImage widget:

2021-10-08_10-18-50.jpg

Possibly this is not the correct image file? In this case could you provide an sample image file where the issue is reproducible? Thanks

Possible reason could be the format: color settings, size (large number of pixels or large file size) . The attached file seems not to have an issue when I tested it.

Adrian_G.10-MarbleAuthor
10-Marble
October 11, 2021

Hi @RolandRaytchev .
Nope that is not the file I used where problem occured.

This file was produded from Powerpoint.
Is there an image requirement to be used for 3D Image?

I tried to use the same image for Mobile/Smartphone Version and it works fine.
But for 3D wear, i can't get the image to show up.

21-Topaz I
October 12, 2021

Hi @Adrian_G. ,

 

I tested in Studio the attached file (Slide1.JPG) in preview mode and  on my HoloLens 2 device .Both was working fine

 

2021-10-12_10-12-43.jpg

 

The picture worked for 3DImage and 3Dbutton.

Because the picture was to large I scaled it by factor of 0.3. The resolution is low and possibly when it is displayed as large picture it could cause a problem.

Checked what of restriction are known for HL device

https://docs.microsoft.com/en-us/dynamics365/mixed-reality/guides/pc-app-supported-file-formats

In the link above are mentioned the supported formats and possible file size limit.
-supported files Images PNG, JPG, JPEG, BMP, TIF
- here one of the restriction is 128 MB for file format

https://docs.microsoft.com/en-us/hololens/holographic-3d-viewer-beta

Here we can find the following info

File size
Minimum 5 KB
Maximum 500 MB

Textures
Texture maps must be embedded in the FBX file
Supported image formats
JPEG and PNG images
BMP images (24-bit RGB true-color)
TGA images (24-bit RGB and 32-bit RGBQ true-color)
Maximum texture resolution of 2048x2048
Maximum of one diffuse map, one normal map, and one reflection cube map per mesh
Alpha channel in diffuse textures causes pixels to be discarded if below 50%

 

So actually , no of the mentioned restriction above are relevant for your file. But as already mentioned I could not reproduce an issue with it. Possibly it will be converted automatically by OS system.