Home › Forums › General Questions › Digital twinning with Verge3D
- This topic has 8 replies, 2 voices, and was last updated 12 hours, 33 minutes ago by Hazem.
-
AuthorPosts
-
2024-10-28 at 6:14 pm #78192HazemCustomer
Hi, I’m wondering if there’s a possibility to use verge3D in digital twinning.
Can we feed live data to the application and the puzzles can handle how the app reacts? for example a 3D model of a factory with multiple departments, each department has it’s own animation if working. If not then the animation should be stopped.
Any idea how to achieve this, and what’s the best way to do it from scratch?Thanks!
2024-10-28 at 9:12 pm #78193xeonCustomerIts can be done but it will be up to you to get your inbound data in a format that can be read by Verge3D, JS, etc. It can be as simple as a state on a webpage that changes and this notifies Verge3D that a change has occurred and to play an animation or stop an animation. This can be done using the Call Method puzzles. You could also store data in a file and Verge3D read the file based on a set interval and update your animation playback as needed. You could use the data puzzle and post data….. there are lots of built in ways to do this.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-10-29 at 11:09 am #78230HazemCustomerThanks for the prompt reply and the suggestions.
I’m trying to check the puzzles references for the Call puzzle, but I’m unable to get how this can be applied in my case. I’m not coming from a coding background, but I’ve been using Verge3D for a little more that two years now, so excuse me if I’m not knowledgeable on this specific use.
Let’s say I have a factory of 3 departments. each department has one machine which should either be on or off.For the website option:
Do I have to create a website page that is updated in real-time with the state of each department (true, false)? What would be a the format so that Verge3D can read it, and which puzzle can do that?For storing the data in a file:
What would be the format? and in that case how can I update the file periodically to match the live state of each department?
I can imagine a text file with 3 departments and each one has a value of true or false, but how can I make Verge3D read each of them?Thanks a lot for your time.
BTW, I’ve created a very quick project for testing, like the attached image. Three departments, each one has a rotating start that should be paused and played according to the live state. Here’s the project file link if you have the time to check it out:https://drive.google.com/drive/folders/1KpOdeLzXSSbjchuk2Ja5nSQZqeWvp-c0?usp=sharing
Attachments:
You must be logged in to view attached files.2024-10-29 at 4:27 pm #78240xeonCustomerThe first thing you have to do is find a way for your departments to trigger an on and off state that can be interpreted by V3D. How you do this is going to be up to your team. It will also depend on your department startup and shutdown procedures and what type of physical and geological distances there are between the departments.
The simplest approach would be to create your app with a segregation page on startup.
The first page would be your app with the animations of the departments. The second page would be departments status page. This departments status page would then post a message to the server that the status of the department is changed. Then every few seconds they first page will poll the file for any change… if a there is a change it reads the file in and changes the state of the animation.The data file can be a CSV file with three fields. As an example it might be T,T,T or 1,1,1 indicate all three departments are running or F, F, T or 0,0,1 indicating only the third department is running. You would read in the data and treat it as a list using puzzles.
So there is also the issue of a one department turning off another….so you may want to have logins for each department … depends on your security needs.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-10-31 at 7:11 pm #78378HazemCustomerAmazing! thank you.
I have managed to do it with a local .CSV file. However, if I needed it to run live, the file has to be updated periodically so it has to be hosted online.
I tried to host it on my website, then used the load data puzzle but it didn’t work, after trouble shooting it gave me an error related to (CORS). I think this means I cannot load another file hosted on another website.
Is there a workaround?
The best solution I can imagine is hosting the CSV file on google sheets for example, then somehow link the app to fetch the file from google sheets. Is that possible?2024-10-31 at 9:21 pm #78380xeonCustomerSo…the plot thickens. You want this to be a hosted solution? At what intervals or frequency do you need the data to be pushed and polled? If its based an an automated process like an assembly line the data processing could be milliseconds? A CSV files and google sheets would not be viable in this type of situation. You would your “plants” data to be updated in an accessible DB like NodeJS or similar and then based on a change of state have the website update the animations.
Digital Twinning is all in the business requirements and the very fine detail. It can be done but to do it write you will need to program the interface of the device that will trigger the state, have it post to a server (local or cloud), then there needs to be either a server side script that is monitoring states of the DB and notifying the V3D app or the V3D app has to poll the DB. For commercial uses the V3D app should not poll but should be pushed information as its available.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-11-01 at 10:44 am #78395HazemCustomerI’m doing my best to figure how it’s done, but unfortunately it seems there are not enough information on how to do it.
So it is some kind of a limitation that the “load data” puzzle can only load local data and not a URL? I’m asking because this seems the closes I could get with this method.
2024-11-06 at 7:09 am #78502xeonCustomerYou are not going to find a solution online for this in a demo / example. The reason is the application is very specific and requires a unique approach for a solution so there is no one solution that is going to work for everyone. If you have someone you work with that has experience building websites and handling data from forms…you could start off with a simple solution that has the departments submitting forms…. basically department on or department off. This data could then be accessed via V3D and the puzzles.
You could look at how to convert form data to CSV via Javascript. Then you could just read in the CSV from V3D.
If you are looking for more direct automation you are going to need to dive into what devices the department has that can be connected to the net or you will have to build/design a device, using perhaps an Arduino board to communicate to server in the facility that updates the department states and then that server uploads its data periodically to a web server that is then read by your V3D app. This will require you or someone you hire knows how to do that sort of integration or circuit development.
Digital Twinning is a difficult task requiring a lot of expertise in many fields and each person that creates one creates one unique to their situation because cost, existing or new system architecture and business requirements make each digital twin unique to that company. So not a lot of sharing going on in this area.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-11-08 at 11:47 am #78520HazemCustomerI understand the concept and how it should work, I just need to know the technicality from the verge3D side.
I have managed to read a CSV file and created a few animations that respond to those data.The “Load data” puzzle usually uses a file within the application folder, if I used a URL it cannot load the file.
I just need to know the possibility to read that CSV file from a URL. This will solve my issue and I can then worry about how I could update this file so the app can respond accordingly in real time. (it does when I replace the file locally). -
AuthorPosts
- You must be logged in to reply to this topic.