Community
Forma Developer Forum
Welcome to Autodesk Forma Developer Forum. Share your knowledge, ask questions, and explore popular Forma API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Terrain generator

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
mev_od
234 Views, 5 Replies

Terrain generator

Is it possible to change the terrain surface using a generator? I found in the instructions that I can only transfer polygons and polylines. Can I transfer a mesh of a terrain surface?

5 REPLIES 5
Message 2 of 6
havard.hoiby
in reply to: mev_od

Hi 🙂 First of this is a really cool request.

 

Unfortunately there is no way to do this in the api right now. We will keep it in mind when adding new functionality.

 

The reason that this is not straight forward is that the terrain is involved in a lot of other operations inside Forma. Like placing geometry on terrain, displaying anaylsis results, etc. So we have a few hard limits on what can be terrain. The requirements are that the terrain is georeferenced, and that the geometry is a surface that upholds the property for each x,y position there is only a single z position. This means that overhang in terrain is not supported e.g. tunnels. 

 

So I have a workaround for you: 
 - create the element
 - put it in library
 - export and reimport the element and make sure the element is georeferenced
 - use the Library context menu to replace the current terrain with your element

The process of replacing the terrain from Library is described here: https://help.autodeskforma.com/en/articles/7831630-working-with-terrain-in-forma

Now I think the first few steps are easiest to do as an Embedded View.

 - build an embedded view extension

 - create an element with the integraion api (you can add the georeference here as well)

 - add it to the library

Let me know if these steps helps 🙂 
And if you could decide, what would be the ideal what to do this through our APIs?

Message 3 of 6
mev_od
in reply to: havard.hoiby

Thank you very much for your detailed answer. I will study the materials, try to apply your tips and report the result later. Thanks again)

Message 4 of 6
mev_od
in reply to: havard.hoiby

Hi again!
Some time ago we communicated with Trygve Aaberge (@trygve_aaberge), and he encouraged us that we can use our server to process the terrain surface. Although maybe we misunderstood him(
In any case - after your message we are completely confused
Essentially, we need an analogue of the TerrainMode tool. Is it possible to do something like this using the Generator (not embedded extension)?

mev_od_0-1698418669285.png

 

 

Message 5 of 6
havard.hoiby
in reply to: mev_od

Hi sorry about the delay in answering here, it's been a busy week on my end. 

 

A generator has the same restrictions as an Embedded View extension in where it can update geometry. The library workflow I described above would work for both a backend generator and an Embedded View extension. If you are doing something similar to the Terrain mode, then I would advice on using an Embedded View extension for this. We also have a concept around a Forma Sub-mode, which is even tighter integration but we would need to set up a call to enable you to do this as it is not self serviced at the moment. 

Essentially the Terrain mode is taking the terrain, applying a modification to create a new terrain element, replacing the current terrain. With our API right now you are only able to do get the terrain element. We are internally discussing how to add the ability to create new terrain elements, and are working on adding support for replacing elements in the Embedded View SDK. 

 

When we have added the method for updating an element, then you could experiment with this functionality by creating a new generic element from the terrain, then editing this element. I will keep you posted on when we add this update function to our API 🙂

I would be happy to set up a call to see if we can unblock you on your discovery here. 

Message 6 of 6
mev_od
in reply to: havard.hoiby

Hello.

Don't worry about the delay, I understand that you're currently very busy with conferences.

Thank you very much for the detailed response.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report