PDA

View Full Version : Reality Server + Flash?



stelios
August 14th, 2007, 12:06
Hi,

Anyone has any idea how can we use Flash or Flex to querry the Reality Server?
And how Flash can benefit from it?

Does Flash will load a .jpg(s) or a .flv (Flash Video File) ?


Thanks
stelios

ak
August 17th, 2007, 13:13
Hi,
Anyone has any idea how can we use Flash or Flex to querry the Reality Server?


It can be used like on other HTTP servers also. What is your concrete problem?



And how Flash can benefit from it?


All kind of applications (Javascript, Flex, etc.) benefit from it in the sense that render images do not have to be preprocessed anymore. With RealityServer they can be generated on the fly, what slows down the effort of content creation.



Does Flash will load a .jpg(s) or a .flv (Flash Video File) ?


If your question is about which mime types are supported for the connection to the server, then .jpg will work.

stelios
August 17th, 2007, 14:17
How about flv (Flash Video File) files?
Can I use Reality Server to navigate through a 3D environment using Flash Player?

I guess If I can only get .jpg in flash that won't help me...

Thanks
stelios

JanJordan
August 20th, 2007, 10:21
we have used flex to connect to the Reality Server and it works very well. Flv is not needed in most cases, you can just send a series of jpg files (or a multipart file) while navigating through the world.

The current RS ships without an flv encoder, but it has a C++ interface where you could add any video encoding you want. Note that video streams might not be ideal for interactive navigation because video playback often gets buffered which destroys interactivity.

stelios
August 20th, 2007, 10:39
Hi,

Thank you very much for the reply!

Isn't a series of jpgs delaying you?
Don't you have to load them first I guess and then create an 'animation' with them?

Instead of Flex can you use Flash for authoring?
Is it AS version related? meaning can you use AS2.0 and/or AS3.0 ?

Thanks

JanJordan
August 20th, 2007, 11:14
No, you dont need to create an animation from it, jpg display in flash is fast enough. You just need a little bit more bandwidth with jpgs than flv would need.
It is not relying on any language. All a language needs to be capable of is to retrieve images via http from a webserver.

What i would do in flex is to create 2 URLLoader (one for the front, one as a back buffer). then it is just a matter of calling
yourBackURLLoader.load( new URLRequest("http://YourURL"))
to get an image from the server. (Then you switch buffers onImageLoaded)
You would do this as often as you need a new image (eg, as long as the user navigates) navigation parameters (camera position and orientation) could be send as part of the URL to the server.

I dont know the AS2 syntax from memory, but it should be similar.

stelios
August 20th, 2007, 11:27
Sounds simple enough!

So, if we assume that I want my users to navigate/walk through some rooms in a house, flash can querry and load the images fast enough to create the illusion that you actually walk though it, like you do in any kind of games?

Could you copy and paste a sample of a querry from Flex to the RS?
I just want to have a quick look on the syntax, please...

I appreciate that you are taking time to reply my answers!!

Thanks
Stelios

JanJordan
August 20th, 2007, 11:52
Flash is definitely fast enough. How fluent the walk through the house is, is mostly dependant on the latency of the network connection. (The same problem multiplayer network games have)


How the query looks like depends very much on your application (you also need to have some server side scripts that implement the kind of interaction you need for your application)
It could loook like this:
backloader.load( new URLRequest("http://myServer/"+sessionID+"/myApplication?rotatex="+rotationValue))
Then the serverside Script would evaluate the arguments of the URL, set the rotation of the camera ans send back an image.