I am trying to create an online Revit viewer using Autodesk Forge APIs. The task I am trying to achieve is to be able to edit colors of existing geometry and also add new geometry to the model from the browser. Does anyone know how to do this, where I can get started, or if this is even possible?
Yes, you absolutely can edit colour and material of existing model geometry and aggregate models. I believe Philippe's gallery sample provides extensions that do both:
If not, another of the GitHub samples does.
You should also check out the cloud and mobile DevBlog.
Here is a sample that edits materials within the Forge Viewer scene:
Here is an article on adding Forge-translated OBJ models to a scene:
Full model aggregation is discussed here:
Keep in mind the viewer is based on three.js, so to do things like adding custom meshes to the scene, it's pretty similar to what you would do in three.js. However your meshes will not be detected by the viewer selection logic, some extra work would be needed if you want that.
You can take a look at those two extensions for examples of adding meshes and changing material colors:
©2020 All rights reserved.