Hello!!
I tried researching this topic literally all week, and couldn't find anything -- which was very degrading mentally.
So what I'm trying to accomplish won't be simple, if even possible at all. I know this.
I've a server and client. The server sends the client info on start-up.
Currently, when someone downloads my program; it has everything in it's files. The .objs, .b3ds, all images, etc. for Irrlicht to find.
But is there a way to send a .obj file to the client, without the client downloading it as an actual file?
For example:
The server has a file in its' directory named "Building1.obj"
Is there a way for the server to send the contents of Building1.obj to the client, and the client stores it and creates an IAnimatedMeshSceneNode out of it, without downloading Building1.obj into the client program directory?
Thanks in advance.
Winsock - Sending 3D Objects
-
- Posts: 386
- Joined: Sun May 11, 2014 12:13 am
Re: Winsock - Sending 3D Objects
Or even renaming the Building1.obj to Building1.myExtension but still loading it as a .obj mesh?
My main reason for this topic is that I'm concerned someone has access to my material and can use them elsewhere when they're displayed as .obj's which can easily be accessed by nearly all 3D Modelling programs (such as Blender).
My main reason for this topic is that I'm concerned someone has access to my material and can use them elsewhere when they're displayed as .obj's which can easily be accessed by nearly all 3D Modelling programs (such as Blender).
Re: Winsock - Sending 3D Objects
You could encrypt it. Before loading you would decrypt it and then delete this version after reading it. But the unencrypted form would be in the filesystem for a short time, which would allow a dedicated hacker to gain access. It depends on the level of "attacks" that you want to prevent.
Re: Winsock - Sending 3D Objects
Look up memoryfile in the docs, with that you can load images and models from RAM.
Though for OBJ, it cannot load the MTL file like that.
Though for OBJ, it cannot load the MTL file like that.
-
- Posts: 386
- Joined: Sun May 11, 2014 12:13 am
Re: Winsock - Sending 3D Objects
Do you mean like, have the server send pieces of the file until the client receives it all, save the received stuff into a file (the object file), load the object from the file, then delete the object file?mongoose7 wrote:You could encrypt it. Before loading you would decrypt it and then delete this version after reading it. But the unencrypted form would be in the filesystem for a short time, which would allow a dedicated hacker to gain access. It depends on the level of "attacks" that you want to prevent.
Would this be memory consuming? Or is this a better option?hendu wrote:Look up memoryfile in the docs, with that you can load images and models from RAM.
Though for OBJ, it cannot load the MTL file like that.
--------
I also thought about something that I'm not quite sure would work.
Didn't want to try without asking first. What if I made the server, rather than a console, also an Irrlicht program. Then have the server load an object and send the object?
Since I'm sending structures, couldn't I just put an IAnimatedMeshSceneNode into the struct and send it, the client receives it and then loads it?
Or would that not work as I'm imagining?
Re: Winsock - Sending 3D Objects
You need to store the data either in memory or disk. You said you wanted to avoid disk.Would this be memory consuming? Or is this a better option?
It does not matter whether you send the model data or the after-loading indices, vertices and animations.
-
- Posts: 51
- Joined: Fri May 30, 2014 12:55 am
Re: Winsock - Sending 3D Objects
I personally think it is a bad idea for you to send objects over the server to the client. It would make sense to just send objectIds from the server to the client and then have the client look up the objects location based on the object id.
Re: Winsock - Sending 3D Objects
You missed the point of the question, instead of bundling assets with the client application the server could just stream the assets to the client when they are needed.
Dream Big Or Go Home.
Help Me Help You.
Help Me Help You.
Re: Winsock - Sending 3D Objects
Here's what I would do:
1. We're dealing with .obj files so in order to make the corresponding .mtl files to work (also include the texture files), I would put them all in a .zip file on the server.
2. Then I would have the server read the .zip file (IMPORTANT: Make sure it reads in binary mode) from the HD and then send the data to the client.
3. On the client side, put the data into an IReadFile (look up in the docs to find out how to make raw memory into an IReadFile).
4. Finally, add the IReadFile as a File Archive. This will add all the .obj, .mtl and texture files to the client file system. Then you can load them in with irrsmgr->getMesh("yourmodel.obj");
1. We're dealing with .obj files so in order to make the corresponding .mtl files to work (also include the texture files), I would put them all in a .zip file on the server.
2. Then I would have the server read the .zip file (IMPORTANT: Make sure it reads in binary mode) from the HD and then send the data to the client.
3. On the client side, put the data into an IReadFile (look up in the docs to find out how to make raw memory into an IReadFile).
4. Finally, add the IReadFile as a File Archive. This will add all the .obj, .mtl and texture files to the client file system. Then you can load them in with irrsmgr->getMesh("yourmodel.obj");