Generation model using Forge (Design Automation) makes elements invisible - autodesk-forge

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!)

Related

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.

Inventor (ipt) custom background image

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.

Alternativa3D: Actionscript3: How to avoid z-fighting in imported 3DS model?

I can't seem to find a specific solution for my problem so I hope someone here can help me.
I am experimenting with alternativa 3D in Actionscript3 and I managed to upload a textured .3DS model from 3D Max.
The object is a complex spaceship that wasn't intended to be used in a game but I wanted to use it as an example.
The problem is:
Since the imported model is complex it has a lot of overlapping parts. Alternativa z-sorting engine don't react well to this overlapping and the output is jittery texture(i don't know how else to call it) in the overlapping places.
I know next time to model my objects with as less overlapping parts as possible but I am sure this problem will reappear in other forms in the future.
The Alternativa documentation suggests using Decal objects instead of Mash objects but I can't seem to convert imported object Mashs to Decay objects.
Any help will be appreciated.
If you have a model where faces directly intersect one another, then I'd suggest this, not the engine, is the problem.
A well-built 3d model shouldn't have any intersecting faces - you may not notice or think it's a problem in a program like 3dsMAX, you can get away with it more - but it'll certainly show up in a real-time engine.

Depth map (2d+z) algorithm or software

I'm searching for Depth map algorithm for action scrip 3 (or some other language).
My goal is to generate depth map for static image on run time.
I have fount this example http://kode80.com/2009/06/29/papervision-zbuffer-and-dof/, i didn't have the time to investigate it's code but i have the filling its working only with 3d models.
Worst viable option is server side technology that does the work.
Extended description:
I have a task to develop flash application where 3d rotation of a head is simulated by a 2d image uploaded by the user.
There are some japan guys that have managed to do that (http://hairtry.jp/), but the technology that they are using is server side. It generates swf fail with precisely coped eyes and image for the depth map of the uploaded picture. I can't find out what is the sever side technology that they are using so I'm searching for any posible workarounds.
Thanks in advance.
Cheers,
Chavdar Slavov
your easiest solution would be to use a 3d engine, Paper vision seems to be getting out dated, theres a lot of documents on how to use, and tutorials but again not much has been happening with them lately. i suggest Away3d "www.away3d.com" they seem up to date.
for what your asking it is possible to do this 100% in flash but to create a 3d head at runtime and fill the face with hieght maps this is possible, you would need to look at bitmap manipulation.i dont think this is an easy task, what you should learn first is how to add an image to a spheric surface dynamically than look into height mapping by converting certain coulours from the image into different levels of depth i must say im sure this is advanced stuff, i manged to animate a globe that was this same method it looks dodgy but it gives you some source code in the FLA
http://www.ffiles.com/flash/animations/globe_animation_3496.html
The above link will allow you to download my source files, the animation it self is a scrolling image but i used Actionscript to give the globe depth and a sheric look

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.