Inventor (ipt) custom background image - autodesk-forge

It came to my knowledge that custom background images can't be uploaded with the model to the Forge viewer (or added from any code) - but - by using Inventor there is a workaround. Or should be if I am correct?
I've added my custom background image to my model in Inventor using these steps, however the changes doesn't reflect in the viewer (still displaying the environments)
Would anyone kindly share the correct steps with me. Thanks a lot.

After reviewing the mentioned answer and checked with a few colleagues working on it: this still under research and we don't have the proper steps to make it work. It is logged as a feature request.

Related

Generation model using Forge (Design Automation) makes elements invisible

I have some troubles after Forge model generation. The main goal is to get rvt model from JSON.
I have tested my code with Revit API in Revit. It works nice. But when add bundle to the Forge app and got rvt result - I have faced with weird glitch. I can`t see any wall in the project, but walls exist. I have checked with lookupRevit and saw walls and ids.
The question is "How to make invisible walls be visible?"
I have attached the recording demonstrating my glitch.
https://www.youtube.com/watch?v=WiZC2VLcVSc
Thanks
Please share the code for a minimal reproducible case so we can take a look. I am not aware of any way to achieve this result just creating a wall and saving the BIM. So, it will be interesting to see how you succeed with this feat.
Correction: a colleague spotted the problem in your video:
It looks like the walls were created in Phase 3, and the view phase is 1.
Copy-pasting them puts them on the active phase thus making them visible. (At least best I can tell from the video!)

Autodesk Forge Heatmap Overlay

I am brand new to Forge and making my way through some documentation but it seems quite hard to get some of the older examples working (pages don't load correctly etc) and I am currently using version 6, which seems newer than many examples too.
Is it possible in client-side code to take in some user data and generate a heatmap (overlayed ontop of the floor of a house) based on that data (i.e. different blocks of colour, it can be quite rudimentary).
This is using a Revvitt model uploaded to Forge and shown in the Viewer.
I have no experience with Three.JS but if anyone could point me in the right direction, show me a working example, or at least tell me if its possible I would greatly appreciate it!
There are a couple of options, with different levels of complexity:
You could use the official viewer APIs such as setThemingColor and clearThemingColors to add a semi-transparent color tint to selected objects.
If you need to overlay scene elements with anything more sophisticated, you could replace their original material with a custom THREE.ShaderMaterial. Just be sure to follow the documentation of three.js version 71 which is used by Forge Viewer. The process of adding new materials to Forge Viewer, and assigning them to specific objects is explained in https://forge.autodesk.com/blog/forge-viewer-custom-shaders-part-1. The article is a bit old, but I think the relevant parts of it (mainly the createShaderMaterial and selectionHandler functions) can be reused.

Forge Viewer - Custom background image

My understanding is that we can add custom skyboxes to the viewer. As of now I am also aware the feature that changes background color and gradient. However, is it possible to add a custom background image? This would've been really helpful in our scenario.
As I know, if your models are translated from Inventor, and you had set custom background up before uploading, then you can see the user-defined background shows up in the Forge Viewer. In contrast, your models are from another software, I have to say sorry there is no APIs or existing feature for that without adding the skybox.
However, I have logged a similar case in our internal case system a few months ago to make our engineering team allocate time to take a look, its' id is DERI-4307. You can track updates of this request by sending this id to forge.help#autodesk.com in the further.
P.S. As I know, viewer requires some extra textures for changing the viewer background with custom images. Unfortunately, there is no way to generate this on none Inventor models currently. You can refer some information about the DERI-4307 here :
How to add custom environment map for background in autodesk forge?

Show dimensions in Autodesk Forge Viewer

I've started trying the autodesk-forge samples and I would like to customize how elements show up on the viewer.
So my question is: Is it possible to show the plan elements' dimensions (as shown in the picture below) with Autodesk-viewer?
I can see this dimensions if I click on an element, but I'm trying to get something like this when the viewer starts:
Thanks in advance.
There is no API to create dimensions at the moment, but you can use custom implementation to add Three.js lines like the dimension command is doing. You can basically add any 2D/3D custom graphic element to the viewer scene.
Unfortunately we have no sample that illustrates how to achieve that, you may take a look at the code of the Measure Extension, see line#60358 in viewer3D.js, but there is quite a bit of work to achieve...
Hope that helps.

Embed 3D models on website

Is there a way to embed Sketchup models on a website? Preferably a free one, if it's a commercial solution I'd like a confirmation that it's actually worth the money... I know about the 3D warehouse thingy where you can rotate it (javascript and some images), but I can't upload anything to the 3D warehouse 'cause it always "resets the connection".
You can try the upcoming WebGL Functions in modern Browsers. There are some Javascript Libraries that can read model files and show them within your (HTML 5?) website. I have not used them yet, but try these links if this sounds interesting:
https://github.com/mrdoob/three.js/
https://github.com/timjb/sketchup-threejs/
I made a patch of an example game in three.js. Added ColladaLoader and Sketchup model + Third Person Shooter controls:
https://github.com/irony/Nemesis
Try it out (Works best in Chrome)
http://peaceful-woodland-4410.herokuapp.com/index.html
You can use http://sketchfab.com, they even have a SketchUp exporter.
Yes, you can do it without cost. See here: https://help.sketchup.com/en/article/3000258
EDIT:
There were some free rendering sites apart from Google, but they don't seem to be in operation anymore. Posting to the Google 3D warehouse is going to be your best bet. Regarding your problem posting there, try it with Chrome.
EDIT #2:
If you don't want to upload to Google 3D Warehouse, you can achieve a similar effect with a little work. 3D Warehouse doesn't actually give the visitor the power to manipulate something in 3D, but rather it lets them "rotate" the image horizontally by simply showing a series of preset images of the 3D from various angles. You can take shots of your 3D object, import to Photoshop and create your own gif of the spinning object. A little more work than relying on Google, so you'll have to decide if it's worth it.
EDIT #3: If all else fails you can simply post the 3D model on your site as a downloadable file and advise visitors to get Sketchup to view it.