Sign in to follow this  
Lord_Vader

question about tranfering a model

Recommended Posts

Lord_Vader    125
First of all I would like to inform you that I dont know much about nets so forgive me if I say anything wrong. Here is my question. Suppose we have somewhere in a server an application that has to do with a slighty big 3d model lets say a very big house with a lot of rooms and stairs (but low polygon house). Another copmuter, the client is connected to the server via a network connection that have bandwidth 512kbit/s or 1024kbit/s and has something like a base render(not very big) programm that takes the information of the 3d mesh and texture(not very big textures) through the network depending of where is the camera in the house and renders it to the screen. My question is will it be able with this transer speed to have a frame rate of 20-25 fps? Its like as though you have in the server, a game like the doom(but with very low polygon models) the server sends the information through the internet and the client takes the information of the mesh and texture makes the whole scene and renders it to the screen at run time. I hope you understand what I am trying to say Thanks

Share this post


Link to post
Share on other sites
t0Xic    138
It definitely is possible, but only if you don't want to send/receive the data you like to render for every frame.

You could basically start by implementing some space partitioning system ( e.g. an octree ). Then your server determines where the client is in the scene space and sends the resources, the client might need some seconds later. Thus, the client always holds all the resources in the nearer area in its memory and renders the ones it needs to.

To stick with your house example, the client could stand in one room, but has actually got all resources, he needs to render the surrounding rooms so that it wont produce a lag if he exits the current and enters the next room.


Another thing that could help you minimizing bandwidth usage and thus helping you to achieve your aim is procedural generation of resources ( like procedural textures, procedural terrain, ... ). You should definetely consider using procedural resources whenever possible ( those things restrict your artists and you will not allways be able to produce the results you aim for ).


t0}{!c

Share this post


Link to post
Share on other sites
Lord_Vader    125
Hmmm,Can you be a little more specific?

You mean that the client must have all the recources(the textures of the entire house) to achieve a frame rate of 25fps?
I was talking about of sending the textures via the net.

Look at my calculations.
Lets say that we have bandwidth between
(512-1024)kbits/s->(64-128)kBYTES/s
Lets say that we want a frame rate of 20fps that means transer rate betwwen
(3.2-6.4)kbytes/frame

Each vertex of the scene will need at least 3 floats = 12 bytes that confines us to at most (267-533) vertexes per frame and we didnt take in mind the colors, textures etc.

Can you comment the above?
How can I transfer all the above information and simultaneous keep const the fps?

Can you be a little more specific about procedural texturing?

Share this post


Link to post
Share on other sites
snisarenko    526
Why would you want to send your resources across a network ? Why doesn't the client store the needed reasources and you send the necessary camera coordinates and such?

Even if the client doesn't have the reasources, why would you want to send the same vertices/textures multiple times? If the client doesn't have the reasources, let him preload them at the begining, and then use those reasources along with the necessary movement data that the server will provide.

Maybe you can tell us what you are trying to make, so we can give you better answers.

Share this post


Link to post
Share on other sites
Lord_Vader    125
I want the server to send the recources because I am talking about a very big database.

Hmm yes I think I understand now.
When I said about vertexes I meant to send the coordinates of each vertex of the scene so the programm in client can render the scene.But as I think of it know it doesnt seem necessary.

I am not trying to make anything specific
for now,just I asked a question.

Share this post


Link to post
Share on other sites
hplus0603    11347
What you want to do in this case is twofold:

1) Keep a persistent cache on the client, so that it doesn't have to re-request resources.

2) Whenever the client comes "close" to a new area, start downloading the resources needed for that area. If the client absolutely NEEDS the data of the new area, then you have to stall the client until the area data is actually downloaded.

This requires that your data (the "house") is well spliced into some visible set graph that allows you to know what the "next to download" piece would be. A typical portal and zone system as traditionally used for rendering would probably be suitable.

When it comes to data formats for vertices, you can easily pack vertices for a room into 6 bytes using shorts and a per-room transform matrix. There are other ways to compress the data even more.

Textures might be harder, but there might also be generic "stucco" and "stone" and "brick" textures that you can use until a more specific texture has been downloaded; especially if you send a generic "this is the color of this wall" value for each larger chunk of geometry.

Player characters would be harder, as they usually require more detail and aren't as easy to pre-download.

The specifics of what you want to accomplish determine whether it can be done. I'm sure that, with 1 Mbit/s, "something" can be done along the lines of what you want -- but you have to be pretty willing to look at things from many angles, design for bandwidth reduction, and accept trade-offs.

Share this post


Link to post
Share on other sites
novaflex    122
One other thing that hasn't been mentioned (unless I overlooked it): Do your downloading in a separate thread so FPS doesn't wait till data is complete. Think of your client as a browser. In a browser, you have empty boxes as place holders until it downloads the image and even while everything is downloading you are free to enter data in the text boxes and submit stuff to the server. You can do better than that, as was mentioned previously with default textures until the good ones get into your cache, and if you do it in a thread you can wander about loaded rooms and if you find yourself in a partial room before the data is cached you can at least view the structure with default texture and let it catch up. This allows you to have stunning graphics available but give players with limited bandwidth access to the game play, which is always more important. Good luck.

Share this post


Link to post
Share on other sites
hplus0603    11347
VRML is not well supported, because it doesn't have the performance you need. You typically have to write a custom 3D streaming protocol tailored for the kind of data you want to view, to get it efficient enough -- bandwidth is a real problem, even with "broadband"!

Share this post


Link to post
Share on other sites
Dark Rain    157
Second Life is a pretty good example of a MMO "game" that use asset streaming for sounds, geometry and textures. I'm frankly wondering what the hell they're doing considering the client is so frigging slow fps wise but I never tried to stream a full world assets so I guess there might be performance issue with handling all that on top of rendering.

Share this post


Link to post
Share on other sites
hplus0603    11347
The performance of streaming is entirely in the network. The CPU hit of streaming is minimal -- you just can't get enough data across the pipe to worry a modern CPU all that much!

The run-time performance problems in user-constructed worlds have more to do with the fact that you can't pre-compile BSP trees or PVS groups or other static occlusion methods, so you end up rendering a lot more than you would in a sewer-crawling game like the Quake/Doom/Half-Life type games.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this