Author Topic: possible to use real streaming?  (Read 4020 times)

Offline mogli

  • byte
  • *
  • Posts: 38
    • View Profile
possible to use real streaming?
« on: June 14, 2006, 09:56:46 am »
hi!

is it possible to use a real streming for building objects?

i have to use a streaming algorithm for streaming objects over network.
i start at a first room and load the neighbour rooms one after the other. when i change the rooms i load the neighbours of this one and delete old rooms and so one...
the problem is when i add the objects the screens jerks.
i add the objects by using
Code: [Select]
Loader.load3DS( InputStream resource, float scale  ). creating an octree and building an Object3D and save it ot a renderqueue.
after rendering the scene i take the first object from renderqueue and add it to the world.

but there is no difference between using load3DS with inputstream or with file because the object is only build when the inputstream is finished. :(

has somebody a notion how to do this in a better way?

perhaps it's possible to load one polygon after the other from the 3ds file and add polygon after polygon to the object. perhaps as child of the first polygon from the object so when i delete the first one from the world the childs are also deleted or by using the object3d megerobjects function.

hope to understand what i mean and somebody could help me...plz ;)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
possible to use real streaming?
« Reply #1 on: June 14, 2006, 05:46:01 pm »
You can't stream 3DS. It's organized in chunks and you can't process the whole thing until you've all the chunks you need. If you want to stream your data, you would have to build your own format optimized for this task and a converter from 3DS into this format. Shouldn't be too hard to do.
Does the loading of the objects already happen in a separate thread?

Offline mogli

  • byte
  • *
  • Posts: 38
    • View Profile
possible to use real streaming?
« Reply #2 on: June 14, 2006, 06:05:25 pm »
Quote from: "EgonOlsen"
You can't stream 3DS. It's organized in chunks and you can't process the whole thing until you've all the chunks you need.


hmm, sry, i don't know before. had to informe be better before next time.
but the load3DS functions returns an array of Object3Ds. is it perhaps possible to get this Object3Ds seperate? i don't know how you handle this intern? can you build the Object3Ds first after you get the whole 3ds-object?

Quote
If you want to stream your data, you would have to build your own format optimized for this task and a converter from 3DS into this format. Shouldn't be too hard to do.

hmm, could be a solution. is it possible to stream from the xml-format? but this is much bigger than the 3ds format, isn't it?

Quote
Does the loading of the objects already happen in a separate thread?

yes i start a thread for each object...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
possible to use real streaming?
« Reply #3 on: June 14, 2006, 06:35:18 pm »
XML requires the document to be well formed. You may stream the data from  the XML, but not the xml itself. With most 3d formats, you'll have the problem, that the vertices are not defined per polygon, i.e. you have a bunch of vertices and then comes a bunch of polygons which mainly consist of indices into the bunch of vertices. So to stream the polygons, you should have at least all vertices available (plus texture information and similar stuff).
Your current goal is to add smaller parts of a room to the world to avoid the one, large hickup and get more smaller hickups instead, right?

Offline mogli

  • byte
  • *
  • Posts: 38
    • View Profile
possible to use real streaming?
« Reply #4 on: June 15, 2006, 08:26:35 am »
year, that's wright! i think this is much comfortable for the user.

i think there are also two things which create the hickups. first the one when i call the load3Ds function and then in the main-loop when i add the object to the world. perhaps i render the world four or five times bevor i add a new object to the world.

...or i have to export the rooms in more parts than i do at the moment.