PDA

View Full Version : A few questions.....



jcsl
January 28th, 2010, 16:56
Hi,

I'm doing a feasibility study for a project with RealityServer and I have a few questions


If I have multiple objects loaded in a world, is it possible to implement collision detection for the camera movement? e.g if the camera hits a wall in the 3d model it should stop....



When rendering a scene, is it possible to export the final render as a JPG ? If so what resolution will the file be?



I will be working with 3DS Max models, is there an exporter to create MI files from 3DS files? (Alternatively I know that I could create a custom plugin in C++ to import these 3DS files, is there any code examples showing how these would be created?)



I'll be developing in Flex, Is there an API for saving/remembering world settings ? E.g this would allow the user to open the app and see exactly how they left the world...


Thanks for the help....

ak
January 28th, 2010, 18:08
If I have multiple objects loaded in a world, is it possible to implement collision detection for the camera movement? e.g if the camera hits a wall in the 3d model it should stop....



Currently there is no pre-defined feature to support collision detection through the API. But you may implement this feature in your own application. The most useful API functionality for that would be the pick() function, that could send rays in the camera point of interest direction an returns a list of intersected objects. If you like this idea, pleas have a look into the Javascript API document, that comes with RealityServer distribution.



When rendering a scene, is it possible to export the final render as a JPG ? If so what resolution will the file be?



You can save any render result you want on disk as an image file. Please have a look in The JS API description for the function connection.send_canvas(). The following code for example sends a given canvas to the connection as a JPEG image:


connection.response["Cache-Control"] = "no-cache";
connection.send_canvas(canvas, "jpg", "rgba", 95);
connection.flush();





I will be working with 3DS Max models, is there an exporter to create MI files from 3DS files?



This is the perfect use case for the product RealityDesigner. Please see the RealityDesigner documentation. If you have any question where to get it or how to use it, please send request to the RealityDesigner forum (http://forum.mentalimages.com/forumdisplay.php?f=8).




I'll be developing in Flex, Is there an API for saving/remembering world settings ? E.g this would allow the user to open the app and see exactly how they left the world...



Of course you can implement user specific configuration regarding your needs. For this use case it may be best to study the chapter Logins and Session IDs in the JS API document. You may be interested in the principle of Transactions, Sessions, Worlds, Scopes, that is described in detail in the same document. If you have any more questions how to use these functionality in detail, please don't hesitate to ask.

Best,
Anja

jcsl
January 28th, 2010, 18:53
Thanks for the quick reply! I have a few more questions...

Is it possible to select 3d models in a world using a mouse click? The Javascript examples I have seen use dropdowns to select models within a world.....ideally I'd like to allow the user to select a model in the world by clicking on them visually...the object would then be highlighted and the interface would update the "selected" lights/textures and allow them to be updated....

Is there anything in the API for recording camera movement, so that fly-through animations could be saved and loaded?

Thanks again!

ak
January 28th, 2010, 19:13
Is it possible to select 3d models in a world using a mouse click? The Javascript examples I have seen use dropdowns to select models within a world.....ideally I'd like to allow the user to select a model in the world by clicking on them visually...the object would then be highlighted and the interface would update the "selected" lights/textures and allow them to be updated....


This is possible and already implemented in the Javascript tutorial application bf8: Exploring an Editing a Sceengraph, that comes with RealityServer distribution. Unfortunately this examples is not documented in detail yet, but it could help you to realize this feature. Just load this tutorial in the doc center and select an object in the 3D view ...



Is there anything in the API for recording camera movement, so that fly-through animations could be saved and loaded?


This special use case is not supported as an API function by default, but you would be able to implement this easily, because the world_to_object transformation matrix is accessible for each object, the camera as well of course.

Hope that helps,
Anja

ak
January 28th, 2010, 19:33
Thanks for the quick reply! ...the object would then be highlighted and the interface would update the "selected" lights/textures and allow them to be updated....


One quick add on: An example that uploads textures is there as well: please try the turial application bf4 and select the 'Upload' tab. This component makes texture uploading possible and you can change the texturing of the ground object at runtime.

jcsl
January 30th, 2010, 00:15
Thanks for the help

One more question: is it possible to avoid the MI export process and use multiple OBJ/DAE objects in a scene instead?

If so would I still be able to select individual models, change texturing, change lighting etc..?

ak
February 1st, 2010, 11:28
One more question: is it possible to avoid the MI export process and use multiple OBJ/DAE objects in a scene instead?


Yes, there are alternative ways to go.
For example you could use the Importer plugins, that come with RealityServer distribution to load collada, .DWF, or .OBJ files into your scene. For more information please see RealityServer document center: RealityServer Document Center > Plugins > Importers . You will find API specififcations and for each of these formats.



If so would I still be able to select individual models, change texturing, change lighting etc..?

Yes of course.

Regards,
Anja