Autodesk Viewer raster background - autodesk-forge

We are looking at using the Forge Viewer for a project to display and markup plans, etc. (for now just 2D, 3D may be added in the future). Some drawings they may only have in raster formats, i.e. scans of old buildings, etc.
Is there a way to show this raster image at a certain predefined size in the viewer as a background? Obviously there wouldn't be the ability to snap to anything or get different objects, etc. but it would still be useful when vector data is simply not available.
The only way I can think of is to use design automation to create a CAD file or something and then place the image file there and then convert the CAD file to svf. That seems very clunky though and I'm not sure it would actually work without testing it.
Is there a better way to display this data in the viewer?

There is no translation support for raster images png, bmp, etc to generate an SVF model out of it.
You could either
a) use the image inside a format that we support (e.g. DWG - perhaps place the image in it using Design Automation API) and translate that to SVF
b) load a dummy model as shown here, and then add the image using e.g. threejs functions

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.

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?

How to extract parts from a 3D tiff image?

I have a tiff file that has multiple grayscale images arranged in a Z stack using ImageJ, forming a 3D image. From this image I would like to extract certain objects, i.e. cells bodies or axons.
I'm not looking for an automated segmentation, but would rather select the desired area manually. However, I wasn't able to find a software that lets me draw selections in 3D tiff images and export the selected areas.
So my question is if there is such a software?
You can use the 3D suite for that which can perfom automatic segmentations and measurements in 3D, see:
http://imagejdocu.tudor.lu/doku.php?id=plugin:stacks:3d_ij_suite:start
If you have a stack you can also manually mark and fill your objects to extract and measure them with e.g. the 3D objects counter.
Another possibility is to use the Trainable Segmentation Plugin to mark similar areas in a stack, see:
http://imagej.net/Trainable_Weka_Segmentation

Could you explain svg tags in website?

I found website that i like, and i download the html source code
I have understand all html source except svg code in homepage can you explain this all numbers means?
you can just explain numbers meaning in svg tags. thank you :)
this is html source: http://1drv.ms/1FPR9Iw
Scalable Vector Graphics (SVG) is the description of an image as an application of the Extensible Markup Language (XML). Any program such as a Web browser that recognizes XML can display the image using the information provided in the SVG format. Different from a raster graphicsscalable part of the term emphasizes that vector graphic images can easily be made scalable (whereas an image specified in raster graphics is a fixed-size bitmap). Thus, the SVG format enables the viewing of an image on a computer display of any size and resolution, whether a tiny LCD screen in a cell phone or a large CRT display in a workstation. In addition to ease of size reduction and enlargement, SVG allows text within images to be recognized as such, so that the text can be located by a search engine and easily translated into other languages.
Being a vector graphics format SVG is mostly useful for vector type diagrams like:
Two-dimensional graphs in an X,Y coordinate system.
Column charts, pie charts etc.
Scalable icons and logos for web, tablet and mobile apps and webapps.
Architecture and design diagrams
etc.
so the number are co-ordinates for your shape
To know more about it and how it's useful and how we should use it please follow below links
you can read more about it Here and Here
Svg ( Scalable Vector Graphics) defines graphics in xml format. you can read more about it here: svg w3 schools.

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.