Get the script here:
sphere render
Last modified on 2011-09-25 15:09:18 GMT. 0 comments. Top.
I’ve written the script, but give no guarantees whatsoever. Keep in mind that Object2VR is not free software. I’m in no way linked to object2VR. I’ve only written this maxscript to ease the use of object2VR.
The result is an interactive flashmovie like this. Drag the mouse to turn the model.
The program object2VR uses columns and rows to describe the amount of images used for a single viewer. These can be compared to a globe. The columns are the meridians and the rows are parallels. The poles have to be at the top and at the bottom, otherwise object2VR doesn’t create a correct viewer. It’s a pain to create these rows and columns easily, so I’ve written a script to do it for you. The script creates an animated camera along an imaginary sphere. You can specify the amount of columns and rows.To get an even distribution use: rows = (columns/2)+1 where columns is an even number. You can also specify a radius. That’s the distance of the camera to the origin. For small objects, use a small distance, for large objects use a large distance.
The script creates a standard camera and animates it. The script could be edited easily to create other types of cameras. Or you could link other cameras to the created standardcamera and leave the script alone.
When the frames have been rendered, you need to rename them so object2VR recognizes the columns and rows. Use the rename-section of the script. Pick the folder with the rendered images, specify the amount of columns and rows, test the settings (with the test-button) and then hit “Rename”.

This is half of a sphere with the different terms explained

This is a full sphere with 34 columns and 19 rows
After renaming the renders you can load them in the object2VR program. Make sure you use the same renaming scheme in object2VR as in the script. By default the maxscript produces this pattern: ‘Row_’+ (rownumber) + ‘Column_’ + (columnnumber) + ‘.jpg’. But you can specify your own naming pattern in the script. Please make sure you use exactly two %-characters. Use the same pattern in object2VR. Remember when using 10 rows, object2VR expects row0-row9. The more images, the heavier the flash-movie will be. The example posted in this article is about 10MB.

This is the main interface of object2VR.

This is the input-dialog. Pick the location of the image-sequence and provide the columns, rows and name-pattern

There are too many options to list here, just try out a few.The basics are covered.

16 Comments
This tool is great and practical. Congratulations!
Thanks. Will give it a try!
File row_0 column_0 >>> will not work with object2VR
File row_0column_0 >>> This will work with object2VR
How do i solve this problem???
Hey Stanley, I’ve updated the script. Now you can specify your own naming-scheme. The default I’ve provided has no spaces. Maybe that solves your problem.
Please download the new script at the top of the post.
Great script!
If you’re going to develop this even further – here’s an idea: For some models, like cars, buildings, it would be great to be able to lock the camera to a hemisphere instead of a full sphere, because you really don’t need the “underground rows” in those. But what a fantastic time saver this is already!
Hey Vasco, thanks. The object2vr-program does support displaying a single row of images. I don’t know if it supports hemispheres. It might get confused. I could however add an option to only create a single row. That’s a great idea.
Klaas
Hi Klaas,
I meant that the images would be taken from a hemisphere rather than a full sphere. This would be awesome for objects standing on a ground plane, etc. See this screenshot: http://i31.tinypic.com/maca41.jpg
Cheers,
Vasco
Hi Klass. Firstly, I want to congratulate you for the great plugin and tutorial.
About necessity of upper hemisphere camera/frames, I found this configuration in the menu(Light Table) on OBJECT2VR software, see in this link. >> http://yfrog.com/epobjectvrset1j
It´s necessary to tell him the number of columns and rows, using only the upper frames generated by your script
So now comes my doubt. I would like to ask you if there is a way to generate your script only those upper frames?
Hope that helps.
bye
MUX
Hi Klass! Yesterday I have posted a comment about a way to make OBJECT2VR using only the frames of the upper hemisphere. Apparently this post has been removed. If necessary I explain again. bye
oops! Sorry, my browser does not updated the page, now my post is there. Please delete the last posts
Hi, MUX and Vasco. I’ve implemented a hemisphere-option. See it in action here: http://www.klaasnienhuis.nl/WordPress/2010/07/object2vr-new-feature/
When it’s activated, only the top half of the frames is created. The rest of the workflow with object2VR is the same.
Klaas
Thanks for this great script.
i try to render my file then use the renaming section. but i have problem (3ds max 2011 64bit)
when i choose the folder there is nothing files found ( i run the 3dsmax as administrator)
is this script valid for max 2011 ?
Hey Osama,
This script doesn’t take care of the rendering, only the animation. If you’ve created the animation, then you should render the enitre frame-range yourself and store those frames somewhere on disk. The thing is: only jpg-files are renamed. Maybe you’ve rendered to another filetype?
The script has been tested in max2010 but it should work in max2011.
I hope this helps you.
Hi
Thanks for at great script. I have used it a few times with great succes.
However, this time there is a problem in renaming the files. It does not put the images in the right sequence for Object2VR – it is all messed up.
I have rendered from 3ds Max using Backburner. I suspect the problem might be that the timestamp of the range of jpg’s is not cronological corresponding to the filenames of the jpg’s.
My question is: does the renaming script use the timestamp to rename the range of images? Then I will try not to make this mistake again.
Hi xyz,
the script actually uses the 4 digits at the end of the filename to identify. So rendering with backburner shouldn’t cause any problems. You definitely will run into problems if the number of columns and rows is different between the animation bit and the renaming bit. So if you use 10 rows and 8 columns for creating the animation, you should use those same numbers for renaming the files. The script also needs all rendered files to be present. It can’t really cope with a file or two missing. There isn’t really any error handling there. It might happen with backburner sometimes that a file is skipped or lost somehow.
I’d love to see an example. You could also send me a file to test your problem if needed.
Klaas
btw xyz, I’ve updated the script to make it a bit easier to work with. Check my latest post, or find it on scriptspot. Cheers!