Introduction

Getting Started

Programming Guides

API Reference

Additional Resources

4.0 Streaming from HOOPS/Net Server

Streaming HOOPS Stream files (HSF) from a HOOPS/Net Server also requires a HOOPS/Net server to be running and accessible by any client that wants to stream the file. Refer to previous section 'Creating/Joining Collaborative Sessions' for details on how to connect to a server and create a session.

Once the client is connected to a server through a session, you will have a tabbed-dialog bar at the right-hand side of the window. 'Files' tab provides the controls required for streaming files from the server.

Associating with a directory on the Server

To stream files on server, the client is first required to associate the current session with a particular directory on the server. Note that for doing this, the client must be in control of the session. Clicking on the Associate Directory... will pop-up a dialog box listing the directories on the server. If you don't find any directories in the list, you should ensure that the HOOPS/Net server is configured to host directories. Please refer to HOOPS/Net programming guide for details. Choose a directory from the list and type the password required to access the directory and click OK. You will find that a listing of files (if there are any in the directory) appears in the 'Files' tab of client dialog bar. These are the files in the directory you have associated with the session.

If you are having trouble getting your directory list populated, first make sure that you have the proper directory structure in the directory that the server runs from. Also, ensure that you have the hnet_server.conf file in there. You can find a copy that you can use in the hoops_net source directory.

The directory structure you should add will consist of a folder called "file_sessions" (which you could rename if you change the appropriate line in the hnet_server.conf) and a sibling folder named "logs". In that folder you need the session folder. Call it "testfiles". In there you need to put your models and your testfiles.conf. You can get an example copy of testfiles.conf from the hoops_net source directory as well. In that file, change the value of name to whatever the containing directory is called. Also, you must put a list of the files in here. The value for file_list should be a space-separated string of the filenames. For example:

file_list = "bnc.hsf formula1.hsf"

To recap,

  • In the folder with the hnet_server binary, create:
    folder "logs" and folder "file_sessions"
    Also in here, put file hnet_server.conf
  • In the folder file_sessions, create:
    folder "testfiles"
  • In the folder testfiles, put file testfiles.conf and fill out as specified in the HOOPS/Net programming guide.
    Also in here put a copy of any models you'll be using.

File Streaming

There are various modes a client can stream data from the server. These can be controlled by the control in the bottom portion of 'Files' tab. The streaming is initiated by double-clicking on a file in the files listing.

  • Read Skeleton Tree 
    If checked, only the HOOPS segment tree from the file will be streamed in. There won't be any geometry in the scene. A HOOPS segment tree browser will appear in the 'Files' tab. You can double-click on any of the segments to request streaming of all the geometry in that segment (and the child segments).  
  • Read Simplified Geometry 
    If checked, the lowest LOD representation from the files will be streamed in (along the HOOPS segment tree) You can now select any geometry in the scene and click on 'Sweeten' button to stream in the finer resolutions of the objects. You can also use the segment browser tree to sweeten segments of interest.  
  • Stream objects in current view 
    If checked, all the objects that fall in the current view frustrum will be requested from streaming. As the camera position get changed, new requests will be sent to the server for the objects in the current view 
  • Sweeten 
    Pressing this button will sweeten (stream in finer resolution) all the selected objects. 

Note that for all these modes to be effective, the files on the server must be generated using HOOPS/StreamToolkit 8.0 or later with TK_Generate_Dictionary option. Results with the other formats are not guaranteed.