Home › Forums › General Questions › Digital twinning with Verge3D
- This topic has 17 replies, 3 voices, and was last updated 1 week, 1 day ago by xeon.
-
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).2024-11-12 at 7:00 pm #78619xeonCustomerThe load data puzzle reads from a specified folder relative to your app. As a test place the CSV in your root folder of your app and then place it on a server and try it out.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-11-12 at 7:46 pm #78622visualizerCustomerHey
I saw this thread a bit late.
It was festival vacation and I resumed back just 2 days back
This has always been my play area and I am hard core into Ind. 4.0 & IoT field where I tried to utilize the Verge 3D at many places.
About digital twin application here is a screenshot of a virtual factory layout we had created as 3D asset & later tried implementing some data fetch from server to specific location where puzzle setup can read it and accordingly the behavior can change in 3D scene after refresh or restart.
We also made a trial successful during the robot virtual training learning module where the value is read from xml or txt or csv file and depending upon the value ( example – 0 or 1) the object behavior changes in verge published scene. This xml / txt/cxv would be updated by the application linked with the machine or device based on the sensor data collection.
Its glad to see that someone here is thinking of virtual 3Dfactory level digital twin with verge 3D capabilities. perhaps this side is too potential for verge 3D to become a production grade powerful industrial digital twin maker.- This reply was modified 1 week, 2 days ago by visualizer.
- This reply was modified 1 week, 2 days ago by visualizer.
- This reply was modified 1 week, 2 days ago by visualizer.
Attachments:
You must be logged in to view attached files.2024-11-12 at 8:04 pm #78634HazemCustomerThe load data puzzle reads from a specified folder relative to your app. As a test place the CSV in your root folder of your app and then place it on a server and try it out.
I did that, and it could only read the csv file within the project folder. This is why I’m asking if someone knows a work around that makes the load data puzzle work with URLs.
2024-11-12 at 8:12 pm #78637HazemCustomerHey
I saw this thread a bit late.
It was festival vacation and I resumed back just 2 days back
This has always been my play area and I am hard core into Ind. 4.0 & IoT field where I tried to utilize the Verge 3D at many places.
About digital twin application here is a screenshot of a virtual factory layout we had created as 3D asset & later tried implementing some data fetch from server to specific location where puzzle setup can read it and accordingly the behavior can change in 3D scene after refresh or restart.
We also made a trial successful during the robot virtual training learning module where the value is read from xml or txt or csv file and depending upon the value ( example – 0 or 1) the object behavior changes in verge published scene. This xml / txt/cxv would be updated by the application linked with the machine or device based on the sensor data collection.
Its glad to see that someone here is thinking of virtual 3Dfactory level digital twin with verge 3D capabilities. perhaps this side is too potential for verge 3D to become a production grade powerful industrial digital twin maker.Thank you for commenting! This is very similar to what I need to do, but instead of restarting or refreshing the app, I hope it could be a real time change.
As I said earlier, I created a very simple test and a csv file in the app folder, I was able to parse the csv file and some animations responds to the data within the csv file, also whenever I overwrite the file. The animations change accordingly as I used on every frame puzzle.Can you please walk me through what should I do to achieve that through puzzles?
BTW, I’ve uploaded a very simple verge 3D app folder on google drive and posted it here earlier in this thread. I’m not sure if you have the time to test with it, but I’ll be grateful if you do!Thanks again for your comment!
2024-11-12 at 8:16 pm #78638visualizerCustomerfor me reading of csv / xml worked fine so I didn’t explore further into it.
You say with URLs? but there has to be specific file for it to read wit specific data location inside it. URL is a gross indication of location.2024-11-12 at 8:25 pm #78639HazemCustomerLet me try to explain it a bit more. Because I’m basically a 3D artist with a tiny bit knowledge of coding :)
I was able to create and read a csv file for testing and I’ve also created some puzzles that respond to the change in that csv file.
In reality, I need the csv file to be located on a remote server where it’s value is constantly changed according to each machine state in the factory. I couldn’t achieve that with the same “load data” puzzle. I tried uploading the csv file to my website, and pasted the URL of the file I just uploaded to the load data puzzle and it didn’t work.
I’m trying to get it working or find a work around. -
AuthorPosts
- You must be logged in to reply to this topic.