View Full Version : Flash 3d Viewer (using maxscript rendering)
Pjanssen 04-23-2007, 10:10 PM Flash 3d Viewer 1.1
v1.11, updated at 28-04-2007
v1.2, updated at 31-05-2007, http://forums.cgsociety.org/showpost.php?p=4424358&postcount=93
This is a tool that I've created primarily for the oncoming new website of the Minas Tirith Project (http://forums.cgsociety.org/showthread.php?f=73&t=153431&page=112&pp=20). But as it could suit many needs, I thought it would be nice to post it here.
The Flash 3d Viewer enables you to create a (prerendered) interactive 3d viewer of a 3d model. The rendering is done with a maxscript, the interactive viewer is made with Flash. The big advantage is that it will work on every pc with the flash plugin installed. No other obscure plugins are needed to see the 3d viewers.
The rendered data created by the maxscript is relatively compact, ranging from about 100kb to 5mb, as long as you use reasonable settings. This makes it suitable for online use. The data is compiled into a single .f3dv file, which can be loaded by the viewer .swf
To avoid any confusion or disappointments: the flash viewer does NOT display real 3d graphics, but (pre)rendered images!
Two examples of 3d viewers, using different settings:
The cart shows a 3d view where the camera rotates around the subject, rendered in high quality. The hall is using the 'look around' setting, where the camera is static, and the target rotates. This is 'rendered' using the preview mode, which is a fast, low-quality method of creating a 3d viewer.
Both models are made for the Minas Tirith Project (http://forums.cgsociety.org/showthread.php?f=73&t=153431&page=112&pp=20)
http://www.minastirithproject.com/3dViewers/Cart/cart23_8.jpg (http://www.minastirithproject.com/3dViewers/Cart/Cart.html)http://www.minastirithproject.com/3dViewers/GH_interior/GH_interior1_9.jpg (http://minastirithproject.com/3dViewers/GH_interior/GH_interior.html)
As this is actually my very first maxscript, I'd like to hear your thoughts on all this :)
This software has been released under the GPL license. Please read the license.txt file included in the source zip.
Downloads:
http://forums.cgsociety.org/showpost.php?p=4424358&postcount=93
note that the .NET Framework (http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en#AdditionalInfo) is required to run the f3dv-compiler.
A quick installation guide can be found in this post. (http://forums.cgsociety.org/showpost.php?p=4355828&postcount=22)
For max8 users experiencing crashes, take a look at this (http://forums.cgsociety.org/showpost.php?p=4356406&postcount=46)post. (http://forums.cgsociety.org/showpost.php?p=4356406&postcount=46)
Now, a look at the UI:
Main Window
http://img380.imageshack.us/img380/3831/uimainnumbersqd3.th.jpg (http://img380.imageshack.us/img380/3831/uimainnumbersqd3.jpg)
The viewport gives you a graphics representation of the camera rotations.
Rotation Settings - Horizontal
1. Active.
This checkbox enables or disables the horizontal rotation of the camera.
2. From Angle.
[0 - 359] This spinner controls the starting point of the horizontal camera rotation. Looking from the top, 0 degrees is at "12o'clock", 45 degrees is at "3o'clock" etc.
3. To Angle.
[1 - 360] This spinner controls the end point of the horizontal camera rotation. Looking from the top, 0 degrees is at "12o'clock", 45 degrees is at "3o'clock" etc.
4. Steps.
[4 - 360] This is the amount of steps the camera will make to achieve the full rotation. Note that 36 steps means 37 frames.
Rotation Settings - Vertical
5. Active.
This checkbox enables or disables the vertical rotation of the camera.
6. From Angle.
[1 - 179] This spinner controls the starting point of the vertical camera rotation. 0 degrees is at the top, 180 degrees is at the bottom.
7. To Angle.
[2 - 180] This spinner controls the end point of the vertical camera rotation. 0 degrees is at the top, 180 degrees is at the bottom.
8. Steps.
[4 - 180] This is the amount of steps the camera will make to achieve the full rotation. Note that the amount of frames is always the amount of steps + 1.
Rotation Settings - Statistics
9. This shows the total number of frames that will be rendered. Note that with a full 360 degrees rotation, the last frame is left out, because it is similar to the first (0 degrees = 360 degrees).
Render Settings - Camera
10. Camera.
This dropdownbox lets you pick the camera you want to render with. This can only be a target camera. If there's no camera in the scene, this field will show 'Create a target camera !' and you won't be able to start the render. The list will be updated when you add or remove a camera to/from the scene. Brazil target cameras are supported too.
11. Rotate object.
This sets whether the camera rotates around the target, or the target around the camera. The latter results in a sort of 'look-around' viewer, while the first lets you rotate around an object.
Render Settings - Output Size
12. Width.
[10 - 10000] This is the output width of an individual frame. The default value is the width as set in the 3dsmax render dialog.
13. Height.
[10 - 10000] This is the output height of an individual frame. The default value is the height as set in the 3dsmax render dialog.
14. Lock aspect ratio.
This button locks or unlocks the aspect ratio. If enabled, the height or width spinner will automatically update when you change one.
Render Settings - Process settings.
15. 3dsmax Priority.
[low - Normal] This dropdownbox lets you set the 3dsmax process priority. Because a 'high' priority actually means 'highest', this can lead to unwanted hangups. Therefore, this option is left out.
Render Settings - Output Settings.
16. Create Viewer.
Enabling this settings causes the maxscript to create a .swf viewer file, next to the .f3dv file. This is required to view the f3dv file. I've added this option, because you might want to create just a .f3dv in case you're using an online system that has only one viewer swf.
The file loaded by this viewer swf can be set by using the flashvars in html, or by using the code: src="f3dv.swf?file=thef3dvfile.f3dv"
17. Create HTML File.
This creates a HTML file that will display the viewer swf.
18. Temporary frames directory.
This is the directory that the script will use to write the individual frames to before it's compiled into the .f3dv
19. Browse.
Pops up a 'select directory' dialog, to select the temporary frames directory.
20. Delete temporary frames when done.
Enabling this setting causes the script to remove the frames that were rendered after they have been compiled into the .f3dv
21. When this checkbox is enabled, the rendering will continue from the point where it was cut off in a previous render. When a render is started, a .INI file is created with the render settings and progress for that scene. If this file is found and if it shows that the rendering was not completed, this checkbox can be enabled. Otherwise it's disabled. The .INI file is automatically removed when rendering is completed.
22. Preview.
This starts the 'rendering' process in a preview mode. This means that in stead of rendering each frame, a screenshot of the viewport is taken. This gives you a fast preview of the scene. Apart from this, the procedure is the same as the render process.
23. Render.
This starts the rendering process. First, a 'save file' dialog will open, allowing you to set the directory and filename for the output.
Once the dialog has been closed the render window will open and rendering will begin.
The rendering window
http://img405.imageshack.us/img405/1243/uirendernumberscx2.th.jpg (http://img405.imageshack.us/img405/1243/uirendernumberscx2.jpg)
Last Frame
1. This shows the last rendered frame.
Rendering Progress
2. Current Task.
Shows the current task being executed.
3. Progress bar.
Shows the progress of the whole progress.
4. Frame.
Shows which frame is currently being rendered and the total amount of frames.
5. Last Frame Time.
Shows the time it took to render the previous frame.
6. Elapsed Time.
Shows the total elapsed time.
7. Estimated Time Remaining.
Shows an estimate of the remaining time.
Settings
8. Horizontal Rotation.
This gives an overview of the horizontal rotation settings.
9. Vertical Rotation.
This gives an overview of the vertical rotation settings.
10. Render Settings.
This gives an overview of the render settings.
11. Frame Settings.
This gives an overview of the frame output settings.
12. Stop.
To cancel the rendering process, press the ESC key on your keyboard. (This doesn't work in preview mode.)
When the rendering is cancelled, the button will change into an enabled 'continue' button. Clicking this continues the rendering process at the frame where it was stopped.
Rendering can also be resumed later, even after a reboot or crash.
|
|
PooLatka
04-24-2007, 05:36 AM
DUDE! I've been actionscripting this stuff manually. you are a god send.
This shit is awesome! man, speechless...
good work!
Good work!
The maxscript and flash viewer and source code may be adjusted or used for personal projects, not for commercial use.
What are the licences for usage?
Can it be used unmodified for commercial usage. ie showing stuff on a homepage?
Georg
Pjanssen
04-24-2007, 08:24 AM
Thanks guys.
Just something I was wondering about, I've got this little macroscript to allow you to create a menu item or something in max, that will just start the script. But is this actually the right way to do that ?
MacroScript f3dVExporter category:"f3dVExporter" (
on execute do (
fileIn ((getDir #scripts) + "\\f3dVExporter\\f3dVExporter.ms")
)
)
@rdg: I've been thinking and reading a bit about software licensing, and I think that the GPL is a very nice thing. So I've hereby, I've placed this software under GPL (updated the files and opening post). If you have already downloaded the source, please do so again and read the included license.txt, thank you. :)
ypuech
04-24-2007, 08:54 AM
Waou,
Amazing work. This tool seems very powerful.
But is this actually the right way to do that ?
Why not? It is ok. That way you can use encrypted ms files in macroscripts if you want this.
And you can store the scripts in other directories than ui/macroscripts.
about this GPL stuff:
What does it really mean: I can adjust the player to my needs and as long as I credit you and provide a link to the modified source I can use it for anything I like?
** Maybe we could compile a thread that explains different licensing models or links to them.
Georg
Pjanssen
04-24-2007, 11:09 AM
Why not? It is ok. That way you can use encrypted ms files in macroscripts if you want this.
And you can store the scripts in other directories than ui/macroscripts.
Ok that's nice to know. I was just wondering if it would be the right way to run a script with a macroscript, as I couldn't really find a command to do this (other than including the code itself with fileIn() or include())
about this GPL stuff:
What does it really mean: I can adjust the player to my needs and as long as I credit you and provide a link to the modified source I can use it for anything I like?
It basically means that you are free to use and modify the sourcecode as you like. And you are free to distribute your modified code or the original source code. You are also free to use it commercially, provided that you also distribute the source code of at least the included part.
For more information:
http://www.gnu.org/copyleft/gpl.html
muzbee3d
04-24-2007, 11:25 PM
Pjanssen (http://forums.cgsociety.org/member.php?u=34731):
Interesting work !
you might find this scene / player interesting.... ( may load slow)
http://www.digitalair.com/techniques/universal_capture.html
Pjanssen
04-25-2007, 07:00 PM
Thanks mate :)
That link you gave is looking pretty interesting indeed, thanks.
mindrot
04-27-2007, 11:58 PM
Oooh!! This looks great. Thanks.
This will be really useful for portfolios and such.
~M~
Cyborgguineapig
04-28-2007, 12:10 AM
..................:love:
REQUEST:
For the next version, it'd be great if we could add specific objects to the scene, objects that wouldn't render, but would somehow be a tag for interface items through flash...
For example, we could add an object called, "menu_1" and each frame would be tagged with the location of "menu_1" and the SWF flash file would contain the actual menu buttons and animations, etc., but they would be dynamically placed atop the rendered footage...
So we can easily make websites with 3D interfaces.
eldee
04-28-2007, 12:20 AM
Wow, this really is great. Something like this could've been sold to a company eager to polish it up and resell it, but you've chosen to release it to the community. So thanks for that :thumbsup:
mindrot
04-28-2007, 12:35 AM
I forgot to ask: Does this work with Max 8? The reason I ask is that I keep getting crashes and errors whe using it.
~M~
FlexGiddy
04-28-2007, 01:02 AM
Oooh!! This looks great. Thanks.
This will be really useful for portfolios and such.
~M~
Just what I was thinking
wow this is a sexy. Thank you very much Pjanssen
FlexGiddy
04-28-2007, 02:03 AM
I forgot to ask: Does this work with Max 8? The reason I ask is that I keep getting crashes and errors whe using it.
~M~
I'm getting the same with with Max 9... am I doing something wrong or something?
Really nice :), i always wanted to find this kind of script :)
GPL licence allow us to use for portfolio ?
:)
Pjanssen
04-28-2007, 11:15 AM
Thanks for your comments everyone!
REQUEST:
For the next version, it'd be great if we could add specific objects to the scene, objects that wouldn't render, but would somehow be a tag for interface items through flash...
For example, we could add an object called, "menu_1" and each frame would be tagged with the location of "menu_1" and the SWF flash file would contain the actual menu buttons and animations, etc., but they would be dynamically placed atop the rendered footage...
So we can easily make websites with 3D interfaces.
That certainly is an interesting thought. It is quite a change to the way the whole thing would work though. One of the 'problems' here is that compiling actionscript tags to an swf (which I'm doing here) is not very easy, not very flexible and takes a lot of time. As an example, defining a simple variable is done like this in C#:
ArrayList actions = new ArrayList();
actions.Add(new ActionPush(0, "aVariable"));
actions.Add(new ActionPush(1, "theValue"));
actions.Add(new ActionDefineLocal());
Compiler comp = new Compiler();
Byte[] compActions = comp.Compile(actions);
DoActionTag newBaseTag = new DoActionTag(compActions);
swf.Tags.Add(newBaseTag);
So as you see, it's quite tedious to add actionscript. It's not impossible though, and I'll think about your suggestion.
I forgot to ask: Does this work with Max 8? The reason I ask is that I keep getting crashes and errors whe using it.
~M~
I'm getting the same with with Max 9... am I doing something wrong or something?
Oh that's no good! It should work with max 8. I have only tested it on 7 and 9 I must admit, but from that I concluded that it should work on max8 as well...
Could you please post the error that you're getting and where/when? (open the maxscript listener before running it (F11) to see the full error report)
Really nice :), i always wanted to find this kind of script :)
GPL licence allow us to use for portfolio ?
:)
Thanks! Yes you can use it for your portfolio if you want. GPL basically means that you can use the 'product' of the script in any kind of project (commercial or non-commercial) for free. If you want to use the sourcecode in your projects (again commercial or non-commercial) that's ok too, as long as you publish the sourcecode with the release of the product in which it's used.
i have just made my first movie with it, and i must admit is a great tool :)
just a suggestion,if you could make another format or just use the .swf, without the .f3vd, it will be better for me ^^
but great :)
Pjanssen
04-28-2007, 11:55 AM
i have just made my first movie with it, and i must admit is a great tool :)
just a suggestion,if you could make another format or just use the .swf, without the .f3vd, it will be better for me ^^
but great :)
Thanks :)
I could make an option for the file extension. It's really no more than just a swf with the f3dv file extension, so you can change it to .swf if you want. I made it into .f3dv to make it easier to detect for a CMS. For the MT website for example, we're going to have a component that will handle all 3d viewer files. And the uploading of a f3dv file will be just as easy as any other file, the type detection will go automatically due to the extension.
6foot5
04-28-2007, 02:34 PM
h i there, great little program you made, cant wait to use it, thanks very much. ....but seeing as I turn into a complete dolt when i have to do anything involving compilers, installers, plug-ins etc could you please give a brief rundown of the steps you have to take to get this working? i have downloaded the two sets of files you linked to, errrr now what?
--apologies for my stupidity. :blush:
Pjanssen
04-28-2007, 03:09 PM
That's no problem. I should have written a bit about the installation.
1. If you don't have the .NET framework (http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en#AdditionalInfo) installed already (does it come with max?), download (http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en#AdditionalInfo) and install it.
2. Download the f3dv installer (http://minastirithproject.com/3dViewers/f3dv_1_11.exe) and install it. When asked for a directory, select your 3dsmax root directory, for example: C:\Program Files\3dsmax 7\
3. You can now use the script in any way you want. You can run it directly by using MAXScript -> Run script -> f3dvExporter\f3dvExporter.ms.
However, it might be more efficient to make a custom menu button for it:
4. Go to Customize -> Customize user interface.
http://img441.imageshack.us/img441/1972/customui1xu6.th.jpg (http://img441.imageshack.us/my.php?image=customui1xu6.jpg)
5. Go to the 'menu' tab, and click 'new'. Enter the name of the new menu item and click ok.
http://img267.imageshack.us/img267/2619/customui2gg2.th.jpg (http://img267.imageshack.us/my.php?image=customui2gg2.jpg)
6. Select the newly created menu item from the list in the bottom-left selection box, and drag it into the menu list on the right.
http://img153.imageshack.us/img153/8803/customui3eg9.th.jpg (http://img153.imageshack.us/my.php?image=customui3eg9.jpg)
7. Expand the added menu item. In the list on the left, select the f3dvExporter, and drag it into the menu.
http://img153.imageshack.us/img153/2359/customui4of5.th.jpg (http://img153.imageshack.us/my.php?image=customui4of5.jpg)
8. Now you can start the script through the menu bar. Of course you can place it somewhere else if you prefer to.
AndreKling
04-28-2007, 03:31 PM
Hey man, this thing looks amazing, i cant wait to try it out thnx alooot.
I would like to ask if is it possible to do the viewer with animated objects? lets say i hv a walking cycle, would it work with it? if not, do you plan to support animations, is it possible to do?
Andre
Pjanssen
04-28-2007, 03:37 PM
That's a very interesting idea. It should not be too hard to do I think, on the code side that is.
One problem I do see with it is that it would seriously increase the filesize. Right now the amount of frames is (in most cases) the horizontal rotation frames * the vertical rotation frames. With animation added, it becomes hFrames * vFrames * animation frames.
So let's say you've got 30 hFrames, 10 vFrames and an animation of 100 frames, the total amount of frames would then be 30 * 10 * 100 = 30.000....
AndreKling
04-28-2007, 04:12 PM
Hey, i hv tryed to do a test with it, but in the end i get this message, i downloaded the .net thing u linked, it says its version 1.1, will try to download a newer version, as i think that might be the problem.
http://img105.imageshack.us/img105/6904/errorsb9.jpg
I hv another question, is there anyproblem if the name of the file ends with a number? i noticed that u use numbers at the end of the file ( i guess is to hv some sort of control over it) so, if my model name is test3.max will that be a problem?
I can see the amount of frames as a problem, but if you hv the swf in a cd instead of the internet, wouldnt this solv the problem? I think it could be a great tool to show of animation cycles for game artists ( since in games most often u dont hv the control of the camera, and the cycles should work from all angles ), it could be an intersting way to send cd as demoreels.
Andre
peachstapler
04-28-2007, 04:32 PM
This is an incredible plugin. If this is truly your first script, I'd love to see what you're working on for your second! Even in its current form, this allows art teams to bridge the gap with clients who demand very technical products be made using 3D technology. With this tool, it's easy for the customer to approve the accuracy of a model, or the physics of a certain operation, using their internet browser. Great work!
Pjanssen
04-28-2007, 05:36 PM
Hey, i hv tryed to do a test with it, but in the end i get this message, i downloaded the .net thing u linked, it says its version 1.1, will try to download a newer version, as i think that might be the problem.
Whoops, my bad. Thanks for pointing that out. I've updated the links to the .NET Framework, which should indeed be 2.0, and not 1.1
I hv another question, is there anyproblem if the name of the file ends with a number? i noticed that u use numbers at the end of the file ( i guess is to hv some sort of control over it) so, if my model name is test3.max will that be a problem?
That should be no problem at all. The script does indeed use numbers to write the rendered frames to a temporary jpeg file. The filenames are made up of the scene file name (which in your case would be "test3") plus a number, an underscore and another number. So a typical frame name would look like "test301_05.jpg". Further references to these files are always made starting from the scene file name, so the test3 and the rest always stays seperated.
I can see the amount of frames as a problem, but if you hv the swf in a cd instead of the internet, wouldnt this solv the problem? I think it could be a great tool to show of animation cycles for game artists ( since in games most often u dont hv the control of the camera, and the cycles should work from all angles ), it could be an intersting way to send cd as demoreels.
Even for cd's it might be a serious amount of data. Imagine a static 3d viewer of 4mb, add an animation of 100 frames to that, and you've got 400mb of data. And it might kill the memory usage on the pc as well, although I'm not exactly sure how the memory streaming in flash works with a lot of frames.
But it's something I will think about, there must be some way to make this without using 10K+ frames...
This is an incredible plugin. If this is truly your first script, I'd love to see what you're working on for your second! Even in its current form, this allows art teams to bridge the gap with clients who demand very technical products be made using 3D technology. With this tool, it's easy for the customer to approve the accuracy of a model, or the physics of a certain operation, using their internet browser. Great work!
Thanks! I'd be very happy if it would indeed help people in a professional environment too.
Having made something fun is nice of course, but something nice ánd useful feels better :)
ManuelM
04-28-2007, 06:02 PM
i must say i'm not that thrilled by what i see, because i've seen flash 3d product presentations like that more than 7 years ago. the fact that its generated by maxscript is impressive but it doesn't make the flash itself more appealing. its not real 3d, where the user is free to move the camera, zoom in and out. its just a number of still images driven by the mouse pointers x and/or y position or am i missing something?
DeadlyFreeze
04-28-2007, 06:12 PM
Looks really handy but dosent seem to work with Max8 SP3, for me atleast. As soon as I create a camera it crashes max back to the desktop. I would tell you more on the error but dosent really say anything.
Pjanssen
04-28-2007, 06:15 PM
@ManuelM: That's absolutely true.
I never claimed that it was something revolutionary though :)
The thing that makes it interesting for me personally, is that I can create a (fake) 3d representation of a 3d object with high rendering quality.
Real 3d in flash (or shockwave, or any other format that you can spread easily on the web) is great of course, but it has some serious limitations when it comes to quality. You're very limited when it comes to polycount and texturing. And advanced lighting is right out as well. That is something that you don't have to bother about with this solution.
The only real limitation with this is the frame count and the resulting file size.
Now mouse position driven interaction is indeed nothing new, nor is rendering some camera rotations in a 3d package. But I think that the combination of both these 'old' techniques is what makes is interesting.
@DeadlyFreeze: That doesn't sound too good. I'll see if I can run some tests on max8 and get it fixed.
FlexGiddy
04-28-2007, 06:28 PM
Here you go
-- Error occurred during fileIn in <File:C:\Program Files\Autodesk\3ds Max 9\scripts\startup\Scripts\f3dvExporter\f3dvExporter.ms>
>> MAXScript FileIn Exception: -- Runtime error: fileIn: can't open file - "C:\Program Files\Autodesk\3ds Max 9\scripts\f3dvExporter\\scripts\UI.ms" <<
DaveWortley
04-28-2007, 06:40 PM
Looks really interesting! Giving it a try now...
FlexGiddy
04-28-2007, 06:40 PM
just for giggles I placed everything in the scripts start up folder and here is what I got in the MAXScript Listener
-- Error occurred during fileIn in <File:C:\Program Files\Autodesk\3ds Max 9\scripts\startup\Scripts\f3dvExporter\f3dvExporter.ms>
>> MAXScript Auto-load Script Error - C:\Program Files\Autodesk\3ds Max 9\scripts\startup\Scripts\f3dvExporter\f3dvExporter.ms Exception: -- Runtime error: fileIn: can't open file - "C:\Program Files\Autodesk\3ds Max 9\scripts\f3dvExporter\\scripts\UI.ms" <<
-- Error occurred during fileIn in <File:C:\Program Files\Autodesk\3ds Max 9\scripts\startup\Scripts\f3dvExporter\scripts\UI.ms>
>> MAXScript Auto-load Script Error - C:\Program Files\Autodesk\3ds Max 9\scripts\startup\Scripts\f3dvExporter\scripts\UI.ms Exception: -- Unknown property: "resourceDir" in #Struct:f3dv_vars(
f3dvDir:<data>,
scriptsDir:<data>,
oldRWidth:<data>,
defaultsIniFile:<data>,
fullRotation:<data>,
frameFile:<data>,
totalTime:<data>,
oldViewportType:<data>,
oldActiveCam:<data>,
oldPriorityState:<data>,
oldRHeight:<data>,
oldViewportLayout:<data>,
origCamPos:<data>,
renderAborted:<data>,
frameTime:<data>,
currentFrame:<data>,
hFrameStart:<data>,
sceneIniFile:<data>,
sceneIniLoaded:<data>,
oldSafeFrames:<data>,
resourceDir:<data>,
vFrameStart:<data>) <<
and this error window
6foot5
04-28-2007, 06:47 PM
thanks again for this great plug in, ive tried it on max 8 and it works a treat! very handy for portfolios.
:thumbsup:
FlexGiddy
04-28-2007, 06:54 PM
got it working.... the install directions were not up at the time....when I saw them I gave it a second try and it works now...
Thanks again
Thanks for your comments everyone!
That certainly is an interesting thought. It is quite a change to the way the whole thing would work though. One of the 'problems' here is that compiling actionscript tags to an swf (which I'm doing here) is not very easy, not very flexible and takes a lot of time. As an example, defining a simple variable is done like this in C#:
ArrayList actions = new ArrayList();
actions.Add(new ActionPush(0, "aVariable"));
actions.Add(new ActionPush(1, "theValue"));
actions.Add(new ActionDefineLocal());
Compiler comp = new Compiler();
Byte[] compActions = comp.Compile(actions);
DoActionTag newBaseTag = new DoActionTag(compActions);
swf.Tags.Add(newBaseTag);
So as you see, it's quite tedious to add actionscript. It's not impossible though, and I'll think about your suggestion.
Yes it would be tedious and hard to get right, but if you did - this would be a commercially viable project. You would make lots of money selling the software, and then Adobe or Autodesk would pay you a million to get the technology from you.
Doing this would FINALLY bring VRML to life.
Jelmer
04-28-2007, 07:06 PM
Awesome script! I tried it out quickly today and i came up with this (http://enjoycg.com/images/castle_test.html), thanks.
btw, the Minas Tirith project is really coming along very well, good luck with it.
Pjanssen
04-28-2007, 07:25 PM
I've updated the script to version 1.11 fixing the following things:
Scripts directory problem (double slash) causing immediate crash of script.
Check if viewer swf exists before rendering.
f3dv filetype no longer strictly necessary, other filetypes can be set before rendering.
For the download location, please take a look at the opening post (http://forums.cgsociety.org/showthread.php?p=4346022)
FlexGiddy
04-28-2007, 07:38 PM
Awesome script! I tried it out quickly today and i came up with this (http://enjoycg.com/images/castle_test.html), thanks.
btw, the Minas Tirith project is really coming along very well, good luck with it.
error loading it.....make sure that your html file, .f3dv and the .swf are in the same folder. (maybe)
Pjanssen
04-28-2007, 07:39 PM
@DeadlyFreeze: Could you perhaps tell me what you're exactly doing when the crash occurs? Have you got the script running and then when you create a (target?) camera it crashes?
I'm afraid that I don't have any access to max 8, so I can't really reproduce the crash, let alone fixing it at the moment.
@6foot5: Could you perhaps try doing what DeadlyFreeze did? So running the script and creating a camera. Oh and could you tell me which SP of max8 you're running?
Thanks!
@FlexGiddy: Thanks for posting that. It was a little silly bug in the script, which caused two backslashes to be added to the script folder variable. I wonder why it never gave any errors before though....
And it's odd that now that you've installed it a second time (different as well?) it worked normally, very weird...
@Matt: hehe yes who knows. Perhaps I'll give it a try some day.
@Jelmer: I'm getting an error here...(Error loading 'castle_test.f3dv'). I hope that this is not a bug caused by the script..?
@tyio: Take a look at the 1.11 update :)
AndreKling
04-28-2007, 08:59 PM
I runned it on max8 sp3 and hv no problem ( beyound the old .net format one ).
Works quite well, unfortunatly the file i did was 16mb so no way i can post it online.
Would be cool if u add an auto rotation feature, so the model keeps spinning.
Andre
ReflectingAbyss
04-28-2007, 09:30 PM
For some reason whenever I run the script and then try to create a target camera, 3d studio max 8 crashes on me. If I make the camera first and then try running the script, it'll give me this error
-- Error occurred in updateViewportUIPoints(); filename: C:\Program Files\Autodesk\3dsMax8\scripts\f3dvExporter\scripts\viewport.ms; position: 3820
-- Frame:
-- vSteps: 9
-- vStepSize: 9.88889
-- vTo: 90
-- vFrames: 10
-- hAngle: 360.0
-- hSteps: 36
-- vFrom: 1
-- vAngle: 90
-- hStepSize: 10.0
-- hFrom: 0
-- hTo: 360
-- hFrames: 36
-- called in addCallback(); filename: C:\Program Files\Autodesk\3dsMax8\scripts\f3dvExporter\scripts\viewport.ms; position: 5258
-- Frame:
-- called in openMainWindow(); filename: C:\Program Files\Autodesk\3dsMax8\scripts\f3dvExporter\scripts\UI.ms; position: 10492
-- Frame:
-- camRemoveCallback: "f3dv_UIFunctions.fillCamList()"
-- camAddCallback: "if ((classOf (callbacks.notificationParam()))==Targetcamera) do (f3dv_UIFunctions.fillCamList())"
-- aboutRollout: Rollout:aboutRollout
-- Error occurred during fileIn in <File:C:\Program Files\Autodesk\3dsMax8\scripts\f3dVExporter\f3dVExporter.ms>
-- called in execute(); filename: C:\Program Files\Autodesk\3dsMax8\scripts\f3dVExporter\f3dVExporter.ms; position: 1596
-- Frame:
-- called in anonymous codeblock
-- Frame:
>> MAXScript MacroScript Error Exception: -- Unknown system exception <<
And I'm no longer able to adjust the view after that point, and the model disappears when I change the values in the script menu.
However, the script does seem to render properly.
FlexGiddy
04-28-2007, 09:34 PM
Pjanssen, I have a question for you...how are the frames being stored? Are they being stored in ram (or something) at any point? I noticed that if I increase the horizontal and vertical steps to high...(horiz= 50 and vert= 15) I get an error at some point during the render process and it stops at some point and this error window comes up.
here is what was selected in the window behind the error pop up(the script that was open was render.ms):
f3dv_UI.imageRollout.renderBmp.bitmap = render camera:f3dv_settings.rCam outputSize:[f3dv_settings.rWidth, f3dv_settings.rHeight] vfb:false outputfile:f3dv_vars.frameFile cancelled:&frameRenderCancelled;
Sorry, I don't mean to be bringing up all the problems I've been having....
FlexGiddy
04-28-2007, 09:38 PM
And I'm no longer able to adjust the view after that point, and the model disappears when I change the values in the script menu.
However, the script does seem to render properly.
I had that same problem....I had to reset my my hotkeys.... and in preferences/viewports/configure driver....I had to click on redra scene on window expose.... and after shutting down and opening it back it everything was fine. I don't know if the hotkey reset did anything but...I did that at the same time as the viewport thing
thanks for the nice support Pjanssen :)
but there is a little probleme, the .swf is perfect, but the files look weird ^^. I cannot use the mouse to click and drag the model, there is a "auto start" movie, the model turn around very quickly .....
look here to see the probleme (dll the .swf, 3Mb)
http://tyio.keo.in/test/aarfdf.swf
and here to see what the compilator done :
http://forums.cgsociety.org/attachment.php?attachmentid=112749&stc=1
maybe it's just a probleme of the viewer, i don't really know :)
thanks again :)
Pjanssen
04-28-2007, 10:25 PM
For some reason whenever I run the script and then try to create a target camera, 3d studio max 8 crashes on me. If I make the camera first and then try running the script, it'll give me this error
-- Error occurred in updateViewportUIPoints(); [...]
>> MAXScript MacroScript Error Exception: -- Unknown system exception <<
And I'm no longer able to adjust the view after that point, and the model disappears when I change the values in the script menu.
However, the script does seem to render properly.
I'm sorry to hear that. I've tried my best to reproduce this bug in max7 and 9, but I have not been able to. I also went through the maxscript changes for max8 to see if anything had changed that could cause the bug, but I couldn't find anything there.
The best solution for the moment I can offer is the following:
1. If you're running the script, stop it.
2. Open the file [yourscriptsdir]\f3dvExporter\scripts\viewport.ms
3. Comment everything in the 'drawviewportUI' function. That is done by adding /* after this line: "function drawViewportUI = (" and */ before this line: "),"
4. If that still gives the error, do the same for the function above it, called updateViewportUIPoints.
5. Save and close the file, restart the script.
This will disable the viewport drawing, which seems to be causing the problem. If you still experience the problem after doing this, please let me know.
I will do my best to locate the problem and fix it properly.
Pjanssen, I have a question for you...how are the frames being stored? Are they being stored in ram (or something) at any point? I noticed that if I increase the horizontal and vertical steps to high...(horiz= 50 and vert= 15) I get an error at some point during the render process and it stops at some point and this error window comes up.
here is what was selected in the window behind the error pop up(the script that was open was render.ms):
Hmm that sounds very much like an 'out of memory' problem, I've had something like it before. And those problems are quite peculiar and hard to fix (at least for me so far)...
The line you quoted there basically initiates the renderer, outputs the result to a file on the harddrive (outputFile:f3dv_vars.frameFile) and to the bitmap in the UI (f3dv_UI.imageRollout.renderBmp.bitmap =)
So I wonder why anything would be left behind in the memory. After all the bitmap in the UI should be overwritten with each new frame.
Here again, I haven't been able to reproduce the problem unfortunately, so this is a bit of a stab in the dark:
In the scripts\render.ms file, after this line:
for v = vStart to f3dv_settings.vFrames do (
add:
close f3dv_UI.imageRollout.renderBmp.bitmap;
This will close the bitmap currently being displayed. If this does not yield any result, you can also try adding this:
gc()
This will run the garbage collection, clearing memory wherever possible.
Sorry, I don't mean to be bringing up all the problems I've been having....
No problem at all. I'm glad you're pointing these things out.
thanks for the nice support Pjanssen :)
but there is a little probleme, the .swf is perfect, but the files look weird ^^. I cannot use the mouse to click and drag the model, there is a "auto start" movie, the model turn around very quickly .....
look here to see the probleme (dll the .swf, 3Mb)
http://tyio.keo.in/test/aarfdf.swf
and here to see what the compilator done :
http://forums.cgsociety.org/attachment.php?attachmentid=112749&stc=1
maybe it's just a probleme of the viewer, i don't really know :)
thanks again :)
This is quite expected behavior actually :)
The script+compiler creates nothing more than a sequence of images, storing it in one swf file (or f3dv if you will). These will indeed autoplay when you run this file. So without anything to control the position of the playhead, the file is no more than a sequence of frames.
The control of the data is done by the viewer swf. This viewer file is on itself useless, it doesn't know which data file to load. You can let it know in two ways:
1. Let the script/compiler modify the viewer that comes with the script and copy it to go with the data file. This way, you can just start the viewer swf and use it 'standalone'.
2. Use the viewer that comes with the script (f3dvExporter\f3dvCompiler\f3dv.swf) in an HTML environment. You copy the viewer somewhere you want, create the frames using the maxscript, and use the viewer in html like this:
object blabla, just like any other swf
src="f3dv.swf?file=theFileYou'dLikeToLoad"
With this method you can use one viewer file for more than one 3d viewer, this could be useful for use on a website.
I hope that this helps :)
DeadlyFreeze
04-28-2007, 10:48 PM
You nailed it. As suggested for the max8 crash, changing the viewport.ms script works.
6foot5
04-28-2007, 11:28 PM
im using max 8 sp3 and i have had no problems with creating a target camera after intialising the script - btw i added it to the menu bar like you showed.
6foot5
04-29-2007, 12:05 AM
..just noticed this error message when i try to type in the number of steps instead of using the spinner..
http://i152.photobucket.com/albums/s181/makart/error-message.jpg
How is this different from quicktime vr? I mean really, no tongue in cheek.
REQUEST:
Have the SWF file tween each frame, so it looks smooth. When you move from one to the next, just have one fade out as the next fades in.
This way it wouldn't look 'skippy' when going from one shot to the next in the SWF.
Pjanssen
04-29-2007, 06:08 AM
..just noticed this error message when i try to type in the number of steps instead of using the spinner..
It's really a very odd problem, no idea what's going wrong there... :sad:
How is this different from quicktime vr? I mean really, no tongue in cheek.
There isn't much of a difference indeed. The biggest difference is that it's using Flash instead of Quicktime, which makes it much more flexible for online use. The major problem with quicktime is that not everyone has it (around 50% player penetration if I'm right), whereas almost everyone has Flash (around 98%).
REQUEST:
Have the SWF file tween each frame, so it looks smooth. When you move from one to the next, just have one fade out as the next fades in.
This way it wouldn't look 'skippy' when going from one shot to the next in the SWF.
Cool idea, I'll see if I can get something like that working.
Millionder
04-29-2007, 08:20 AM
WOW ! Amazing stuff man ! :thumbsup:
I can see a big future for this in Post Production world of Art <--> 3d <--> Direction communication speed improvement. I hope you'll make a good money for this.
Do you think we'll ever see the same one for Maya ?
Pjanssen
04-29-2007, 09:48 AM
I did a little test this morning with a lot of frames, to see if a small animation could be supported. I used 50 hFrames, 41 vFrames, so a total of 2050 frames, at 200x150px, and the oddest thing was that it outputted a file of no more than 2,5mb. So that's about 1,2kb per frame, quite a promising result.
The script handled it without any problems too, although the compiling of the f3dv took much longer than the actual rendering :P
I'll do some more tests tomorrow and see what the output result is for higher detail and resolution renders.
WOW ! Amazing stuff man ! :thumbsup:
I can see a big future for this in Post Production world of Art <--> 3d <--> Direction communication speed improvement. I hope you'll make a good money for this.
Thanks man! :)
I doubt that I'll make a lot of money with this thing itself, as it's open source. But who knows what it results in. :)
Do you think we'll ever see the same one for Maya ?
Simon Barsky, a friend of mine, was/is working on a MEL script for the viewer. I don't know if/when he has planned to finish and release it though.
@Matt: I tried implementing tweening this morning and the result was very weird and confusing unfortunately :p It didn't really make the whole thing look smoother, but rather blurry and sort of...wrong.
RickBinkley
04-29-2007, 02:20 PM
I have read through most of the logs, and my friend you are great. I can not wait to try this. And then not giving it to the community, like one person said earlier "there are allot of companies that would have paid you some good money for this". Like Christmas all over again, thank you so much.
thewave
04-29-2007, 03:31 PM
This is a very nice piece of software, and for you to release something so powerful to the masses under GPL is amazing.
I know we will be using this at our studio, and will make sure to provide you the credit you deserve for your hard work.
I am getting ready to go back through this thread, but I am very curious about the f3dv format. I have googled a few different combinations and not been able to find anything useful to explain how it works and what it does.
If you had a link to this it would be very helpful.
Thanks,
Benjamin
axhiru
04-29-2007, 05:03 PM
That's a very useful script you made, and it's very nice of you to give it freely rather than selling it :)
@Matt: I tried implementing tweening this morning and the result was very weird and confusing unfortunately :p It didn't really make the whole thing look smoother, but rather blurry and sort of...wrong.
Lemme see the SWF. It might be an effect some people want.
ReflectingAbyss
04-29-2007, 10:31 PM
I just figured I'd note that commenting everything in the 'drawviewportUI' function worked!
Thank you so much :)
I'm rendering now and can't wait to see how it turns out.
zinkete
04-30-2007, 12:39 AM
thanks for the tool!
diegooriani
04-30-2007, 09:48 AM
Hi,
Do you have something like this for Maya? This would be very handy.
Julez4001
04-30-2007, 12:43 PM
Very impressive.
Thanks for the links and info.
jbradley
04-30-2007, 01:40 PM
Wow, this really is great. Something like this could've been sold to a company eager to polish it up and resell it, but you've chosen to release it to the community. So thanks for that :thumbsup:
I applaud the effort on the script part. But the Flash part is definitely behind the times from a technology standpoint. They're both just a frame-changing script based on mouse position (and you can readily find Actionscript code online for these interactions). Of course, you'd need to know Flash.
The whole process isn't using any real benefits of the Flash Player for the interactive content - or keeping the sizes small.
A few thoughts:
You can create panoramas in Flash using a single image and it'll be 10x smaller in size. There's panorama code in Actionscript2 all over the place for Flash using the BitmapData object and variations of perspective distortion. I definitely wouldn't use something that I had to load 100 separate images - especially since the interaction is limited to still images instead of a smooth experience. All you need to do is render a 360 pano image in your application of choice - again a very common script for most applications, if not built in already.
For the single object spin, I'm not a fan of just spinning a bunch of pre-rendered images. I'd much prefer to use something like the Papervision3d project or another open-source Flash alternative such as Sandy. Papervision3d supports the parsing of DAE (Collada) files (full textures, and animation is supported). That also means you can bake your textures to the objects (including ambient occlusion) and actually interact with the object since it's a full 3d engine.
Smaller and more effective than a 100 pre-rendered images.
Pjanssen
04-30-2007, 02:14 PM
Hi jbradly,
thanks for your comments.
The whole process isn't using any real benefits of the Flash Player for the interactive content
Could you perhaps explain what you mean with this? I personally think that this project actually does use the benefits of Flash, being easy user interaction with content. I don't think that something has to be technically advanced to be able to work.
The panorama things you mentioned are definitely interesting, I'll do some research on that. I agree that for a 'look around' type of viewer my method isn't the most efficient. :)
One thing that it does have as a pro is that there are no distortions, but that is just a minor pro I think.
Considering the single object spin:
Even though the real flash 3d product you name are very interesting indeed, I personally think that they lack one thing: performance. Doing real 3d stuff with actionscript is great, I've spent quite some hours messing with it myself too, but in the end you're going to hit a ceiling when it comes to performance. Rendering 5K tris with actionscript is probably a no-go.
Another thing that I've noticed in almost any real 3d project with flash using textures, are serious uv problems.
For me this was a reason not to use any real 3d rendering, but to try 'faking' it this way.
Some people may find this a bit lame or weak, but the thing is that it's simple, straightforward and that it works. And for me that's an important thing.
Obviously both methods (the prerendered frames and real 3d method) have their pros and cons. I think that everyone has to weigh them for themselves, depending on their goals.
ps. I think I'll edit the opening post a bit and add a bit to avoid confusing about how it works when it comes to prerendering vs real 3d.
Lemme see the SWF. It might be an effect some people want.
I was just having another look at it this morning, and flash crashed, and messed up the fla file...really quite stupid.
What I did was just duplicating the sprite MC, and tweening the alpha with each frame transition. It's not possible to tween (or morph if you will) the actual data in the bitmap as far as I know, at least not in a simple and fast way, so I that's why I gave a try at the alpha tweening.
If you are going to try something with the source yourself, please let me know about the result, it'd be great to get it more smooth indeed :)
I just figured I'd note that commenting everything in the 'drawviewportUI' function worked!
Ok good! Perhaps I'll make a seperate max8 version (so without the viewport drawing) of the installer next time.
This is a very nice piece of software, and for you to release something so powerful to the masses under GPL is amazing.
I know we will be using this at our studio, and will make sure to provide you the credit you deserve for your hard work.
Great. Thanks :)
I am getting ready to go back through this thread, but I am very curious about the f3dv format. I have googled a few different combinations and not been able to find anything useful to explain how it works and what it does.
It's really nothing near as fancy as it sounds. It's no more than an swf with another file extension. The reason I did this is to allow a CMS to automatically detect the filetype when you'd upload it. That way you can make sure that it won't treat it as a normal swf.
At the MT project we're now developing a CMS for the new website that will have one flash viewer stored somewhere, which will load any f3dv file that is uploaded by a user.
In v1.11 you can, if you want, select another filetype when rendering.
Pjanssen
04-30-2007, 09:02 PM
Hi,
Do you have something like this for Maya? This would be very handy.
Sorry I forgot to reply to you in my previous post.
Simon Barsky, a friend of mine, was/is working on a MEL script for the viewer. I don't know if/when he has planned to finish and release it though.
maxgamer
04-30-2007, 11:17 PM
Can you add the ability to compress the image output to make the files smaller. Sometimes it is not necessary to have 100% jpegs. Often, for the web, 60% is enough.
This might make the file sizes smaller.
Pjanssen
05-01-2007, 06:28 PM
Can you add the ability to compress the image output to make the files smaller. Sometimes it is not necessary to have 100% jpegs. Often, for the web, 60% is enough.
This might make the file sizes smaller.
I'll see what I can do. Another thing that I want to experiment with is the 'per image' vs 'global' colour table for the stored frames. I've noticed somewhere in the documentation of the swfdotnet package that the method I'm using now is storing a colour table for the compression of each JPEG seperately. This I guess takes more space than having one colour table for all frames.
On the other hand, colour tables might vary significantly, when for example one side of the rendered frames have a lot of shadows, whereas the other has brighter colours.
Perhaps one colour table per row of images might be best.
I'm now working on v1.2, which will have the following updates, and perhaps a couple more:
Animation support.
Statistics updated: added hFrames, vFrames, aFrames.
Max 8 'fix' included in install. (optional when installing).
Automatic menu item creation. (optional when installing).
Warning when trying to render more than 1000 frames.
Auto rotate (horizontal) added to viewer.
maxgamer
05-01-2007, 06:32 PM
How about the ability to compile the images in to a viewer with a different exe file. This way we can go in and do some post production work in Photoshop with all of the rendered images and then compile into the viewer after the fact.
Is this possible?
Paul
Pjanssen
05-01-2007, 06:41 PM
This is possible now too, but it's a bit of a fuss. You'd have to deselect the 'delete temporary files when done' option, and then run the compiler manually. This would require you to pass a couple of parameters to the program (for details, run the compiler with the parameter /?, I made a little usage display).
These would have to be outputted by the maxscript somehow, because you probably won't want to guess them.
The thing is that I made all this with simplicity and speed for the end-user in mind, so perhaps adding options to manually take some steps might decrease this. I will think about it though.
heavyness
05-01-2007, 09:27 PM
this is very nice. kudos for giving it out. i'm going to test this out later and try to use if for my portfolio.
maxgamer
05-01-2007, 09:40 PM
Could you provide a specific walkthrough of what to type if we want to complile the viewer seperately on the rendered images (Edited in Photoshop)?
Thanks
BTW, terrific job on this tool
Paul
Synthesizer
05-02-2007, 03:43 AM
Simon Barsky, a friend of mine, was/is working on a MEL script for the viewer. I don't know if/when he has planned to finish and release it though.
Oh no, the pressure! I have a bit of it done, and I have a fairly good idea about how I'm going to approach the rest of it. Seeing which bugs come up here will be helpful for my work. I've got some spare time now; I'm living at my parent's and am just waiting to get a work permit to start a job in Sweden, so I should be able to get something together in the near-ish future.
Congrats on this taking off so well Pier, glad to see all those late nights of struggling with it have paid off in some recognition :)
Pjanssen
05-02-2007, 02:03 PM
A small preview of the new features in v1.2 :
http://img95.imageshack.us/img95/8783/f3dvnewfeaturesfo2.th.jpg (http://img95.imageshack.us/img95/8783/f3dvnewfeaturesfo2.jpg)
I decided to put all the more advanced features, like auto-compiling or not, in a separate rollout, which is rolled up by default. And to keep things even more simple, I decided to make a preset functionality.
I hope that this will make the setup for rendering a 3d viewer easy and fast, but on the other hand also provide advanced functionality and options if needed.
I think that this version can be done in a day or two.
@maxgamer: With the v1.2 release you'll be able to compile the f3dv file manually (that is, you can decide when it happens :p). I hope that you won't mind if I don't make a walkthrough for compiling now, but rather go back to work on the new version :)
@Synthesizer: Thanks mate. It would be great if you could indeed finish the MEL script, so that people with Maya can also use the tool.
SuperXCM
05-02-2007, 02:46 PM
Waouw, I need to test this stuff tonight!! :bounce:
ernest
05-03-2007, 07:41 PM
real nice script! :)
just an idea for the next version: when you doing the animation, would it be possible to add buttons for switching between the frames, so you can for example hide and unhide objects?
I could really use that feature ;)
Pjanssen
05-03-2007, 07:47 PM
Hmm could you explain that a bit more perhaps? I don't really understand the hide/unhide part.
browndog1978
05-04-2007, 03:50 AM
I get an error, see the attached pic
http://www.gowriepark.com/temp2/3dswfError.jpg
maxgamer
05-04-2007, 07:10 AM
Have you placed a camera in the scene?
jbradley
05-04-2007, 04:50 PM
Could you perhaps explain what you mean with this? I personally think that this project actually does use the benefits of Flash, being easy user interaction with content. I don't think that something has to be technically advanced to be able to work.
Agreed - I didn't clarify myself that well. :)
The panorama things you mentioned are definitely interesting, I'll do some research on that. I agree that for a 'look around' type of viewer my method isn't the most efficient. :)
One thing that it does have as a pro is that there are no distortions, but that is just a minor pro I think.
Distortions are not necessarily needed. That actually is more difficult to implement in Actionscript than VR without distortion. The point I was making is that you're much better off, and it will be a much higher quality project if you use a single panoramic image than a bunch of stills.
Considering the single object spin:
Even though the real flash 3d product you name are very interesting indeed, I personally think that they lack one thing: performance. Doing real 3d stuff with actionscript is great, I've spent quite some hours messing with it myself too, but in the end you're going to hit a ceiling when it comes to performance. Rendering 5K tris with actionscript is probably a no-go.
Another thing that I've noticed in almost any real 3d project with flash using textures, are serious uv problems.
Performance? Not in the least. Considering software rendering alone, I'd say it's almost as zippy as Java (Actionscript3, Flash 9 though).
PV3D can render 5k polys at over 30fps depending on your system (some people got 50+ fps playback). Double that if you include hidden surface removal in the numbers. From a performance standpoint, it's quite impressive.
UV mapping is supported fully provided you texture appropriately. You can use Collada (experiments importing animation are in progress too). There are some experiements going on now to dynamically tesselate meshs to retain proper UV mapping.
Just a few thoughts, that's all. Great script though. :)
ernest
05-06-2007, 01:09 PM
Hmm could you explain that a bit more perhaps? I don't really understand the hide/unhide part.
ok, what I meant is this: I have a scene with some equiptment. In my specific case some medical equiptment. and I want to show it once with a patient, and once without the patient...
so I thought that I render the first frame with the patient and the second frame without him and all I need now is a button to switch between the frames...
but I guess thats not really the job of your nice script, and I allready built my self a nice little flash file that loads two diffrent viewers and has a button to switch between them. so I don't really need that anymore ;)
however, now I'm intrested in how your approach to show animation is, since my version does the job, but is not really nice :)
Pjanssen
05-22-2007, 06:19 PM
Hi,
it's been quite a while since my last post here. I've been ill for a week or so, and I've been busy with other things as well.
But I've also been working on the 1.2 update. There are many new/improved features.
The most noteworthy features will be the animation support, presets and the new compiler. The compiler is now a full windows application (so with a windows ui rather than the console). There are two variants, the automatic compiler, and the manual compiler. The automatic version shows no more than a progress bar and a status text, the rest happens behind the scenes:
http://img487.imageshack.us/img487/8715/compileruiautohc2.th.jpg (http://img487.imageshack.us/my.php?image=compileruiautohc2.jpg)
The manual version gives you the ability to change settings, and to decide when to compile the images into a f3dv file:
http://img487.imageshack.us/img487/9596/compileruine2.th.jpg (http://img487.imageshack.us/my.php?image=compileruine2.jpg)
At the moment the compiler is as good as done. The maxscript part of the update is done as well. Now I've got to implement some of the new features in flash and then it's ready to be released. With some luck, we'll be able to release the Maya version together with it, as Simon is making some good progress on that.
A full list of the new features: (3dsmax)
- Animation support.
- Presets.
- Statistics updated: added Horizontal Frames, Vertical Frames, Animation Frames.
- Advanced settings added.
- New maxscript UI creation system.
- Max 8 'fix' included in install.
- Automatic 3dsmax menu item creation.
- Warning when trying to render more than 1000 frames.
- Auto rotate (horizontal) added to viewer.
- Avoid multiple open UI windows.
- Windows UI for compiler.
- Manual Compile f3dv and viewer.
- Viewer actionscript in it's own class.
@browndog1978: If you're using max 8, then the 1.2 update will fix the problem. If you don't want to wait for that, you can see the solution somewhere in this topic (disable viewport drawing).
@jbradley: Thanks for the info. I'm going to do some research into flash rendering if I've got time. My previous actionscript experiences made me a little sceptical of it's power when it comes to a huge load of calculations (e.g. 3d stuff), it remains a scripting language after all. But perhaps I should have another look anyway :)
@ernest: It's certainly an interesting use of the script. I think that with the added animation support of v1.2, it should become a lot easier to do. However, if you have some actionscripting knowledge, it'd be best to do it yourself I think. Not because I don't want to do it, but more because I don't have time to do something this specific.
If you have any questions, you can add me on MSN. Perhaps I could make the actionscript class a bit more flexible, so that you can easily extend or override parts.
Russta
05-23-2007, 10:32 AM
hey man, I really like this app, great work! The update looks good, so with this are you going to be able to compile the images yourself? So I can adjust them in photoshop before putting them into the f3dv?
That is exactly why i came to the thread today. I need to do this in the next couple of days though, is it possible to do without the update?
Pjanssen
05-23-2007, 10:42 AM
hey man, I really like this app, great work! The update looks good, so with this are you going to be able to compile the images yourself? So I can adjust them in photoshop before putting them into the f3dv?Yes :)
That is exactly why i came to the thread today. I need to do this in the next couple of days though, is it possible to do without the update?Yes it is possible, but it could be a bit tough. You'd have to remove the line that starts the compiler application from the maxscript file (postrender.ms).
Then you can run it manually in the command line console (in windows, do start->run->cmd) and add the arguments manually. (run it with the argument /? to see the arguments needed)
I could also give you the current version of the 1.2 update, that might make it easier. Contact me through my cgtalk profile if you prefer this.
Russta
05-23-2007, 05:55 PM
hey pjanssen, dunno if you got my email explaining the project im using ur script for but it looks like the plugin im using 'Xidmary' won't work with ur script.
Is there any way you can manually set the camera to all the different render positions and render each frame manually?
this is the only way i'll be able to render from two perspectives for every frame (for a 3d glasses anaglyph). I'll then combine the frames in photoshop to make the anaglyphs which i will need to complie manually into the f3dv.
Pjanssen
05-23-2007, 06:09 PM
Hey,
I was just typing a reply mail to you actually. But I'll just continue here:)
What exactly does the plugin do? Does it create another (or two?) camera on a slightly different angle? And how/when does it do this (only at render time, or a permanent new cam) ?
What you could try is running the f3dv script twice, once with the first camera, and once with the second camera. Then you process it all in PS and compile.
You can also try adding another 'render' line in the script. Copy this line from Scripts/f3dvExporter/scripts/render.ms:
f3dv_UI.imageRollout.renderBmp.bitmap = render frame:(f3dv_settings.animFrom + a) camera:f3dv_settings.rCam outputSize:[f3dv_settings.rWidth, f3dv_settings.rHeight] vfb:false outputfile:f3dv_vars.frameFile cancelled:&frameRenderCancelled;
and paste below it. You can change the camera: attribute there to set any camera you want (for example, a camera 'camera01' would be '$camera01'). And also change the outputfile of course.
This would render two frames for each step, once for every camera.
Good luck.
Russta
05-24-2007, 10:20 AM
The Xidmary plug creates a permanent special camera, which is a target cam with two adjustable cameras either side (that locked to the central target cam). I've attached a screen shot of what the xidmary cams look like.
Ur script simply won't apply itself to it, error says:
"--Unknown property: "pos" in $Target_Camera:XIdMary01 left @ [-36.04...etc]"
and another error
"--Unable to covert: $Target_Camera:XIdMary01 left @ [-36.04...etc] to type: String"
Ur script also doesnt work to the Vray special cams which are also special target cameras.
What you could try is running the f3dv script twice, once with the first camera, and once with the second camera.
I tried aligning two normal target cameras to the positions of both the xidmary cams, but ur script creates the same render positions for both cameras, so I get identical renders.
I thought if I link the cameras together, then apply the f3dv script to the parent, the other will follow giving me two perspectives at each location. This would probably work with changing the code as you said, i'll give that a go right now.
Russta
05-24-2007, 10:49 AM
what code do I use for a definite file loaction for the second camera's renders, i've tried:
f3dv_UI.imageRollout.renderBmp.bitmap = render camera:$RIGHT outputSize:[f3dv_settings.rWidth, f3dv_settings.rHeight] vfb:false outputfile:$G:\RussHQ03\Uni\3DHybrids\Assignment2\f3dvTest01\RightFrames cancelled:&frameRenderCancelled;
but i get a syntax error (for some reason the post added that space between "Assignment2\" and "f3dvTest01\" its not in my code).
I also tried:
f3dv_vars.frameFile+$r
just to change the file name, but that didn't work.
told you i wasnt superb at coding!
Pjanssen
05-24-2007, 05:43 PM
A little update:
Maxscript:
The maxscript part is now only requiring some updates on the post-render part. This will involve changing the call to the compiler, and tossing out the HTML creation part.
I'm going to use one .ini file for the auto compiler (auto.ini in the f3dvCompiler directory), and a 'unique' .ini file for manual compiling. I will add a field in the UI to set the location for it.
Compiler:
I think that I'll also make a little .exe to create a viewer swf. This is because you could have different
versions, in which you want to load the .f3dv. Or perhaps I'll include this functionality in the maual compiler..
Next to that there are a couple minor bugs I've got to fix (mostly error handling).
Flash 3d Viewer:
Today I've been doing a lot of work on making the flash part much more user friendly. Not so much for the enduser (=the one who sees it), but for a developer. There is now one 'core' class, which contains the basic functionality for a viewer, namely loading a .f3dv, controlling the rotation and animation.
You can add an extension to this in the form of a new class. This class has to extend the 'extension' class (uhuh), so that it can access the core. In this new custom class you can do basically anything you want. You can call core functions, add things to existing functions (without having to change the core!) and override core functions.
So for example if you want a stop button for the animation, you can write a class that calls the 'stop animation' function in the core. Using common actionscript linkage, you create an instance of this class, drag the movieclip into the f3dv movieclip and you're done.
Not only controls can be created this way, but also extensions that don't actually have any graphical representation. For example one could write an extension that makes the initial showing of the f3dv file smoothly by fading it in.
It might sound a bit complicated, but it's really quite straightforward and simple.
It was quite a challenge, but I think that it worked out allright. In the next release I'll include a couple of examples (basic animation control buttons and a loadbar) using this technique.
Tonight I'll post a preview of a viewer with animation.
muzbee3d
05-24-2007, 10:29 PM
Cant wait to see your show !
http://forums.cgsociety.org/images/icons/icon6.gif
Pjanssen
05-25-2007, 09:17 AM
The preview is a bit delayed due to some problems I encountered with the extensions.
One I've not solved yet has to do with the order of initialising and dependencies. For example, say you have an extension that manages the animation. This will change some core functions, and add a couple of core functions so that they are accessible to other extensions.
Added to that you might want to have some controls that can start and stop the animation. These are also extensions.
So far so good, but what if you add those before adding the animation extension? Then the contols get initialised before the animation, which will cause problems. For example having function calls to functions that aren't defined yet.
It can be avoided, by changing the way the function calls are defined, but I always like flexibility, so I think I'll have to write some kind of system to control the order in which extensions are initialised...
Here's a preview of how the extensions can be used in Flash:
http://img245.imageshack.us/img245/7295/f3dvextensionsxe6.th.jpg (http://img245.imageshack.us/my.php?image=f3dvextensionsxe6.jpg)
For existing extensions, there's no coding involved at all, it's just drag & drop and watch the magic happen. :) New extensions can be written as a class (extending the f3dvExtension class) and be added as components in the same way.
Icons for extensions without visual representation (e.g. animation) will of course be hidden when executed.
Pjanssen
05-26-2007, 08:51 PM
Here's the preview for v1.2 :)
http://www.minastirithproject.com/3dViewers/human_walk/human_walk.jpg (http://www.minastirithproject.com/3dViewers/human_walk/human_walk.html)
(Click the image)
This shows a couple of features like animation and extensions like a loadbar, animation controls and auto rotation.
Some notes on this preview:
-The walkcycle is made by Andre Hotz, thanks :)
-The controls for the animation are a bit overdone this way, but it was just to show as an example.
-The auto rotation might appear a bit annoying in this example, it'd work nicer in a version without animation and a higher number of horizontal frames. I included it just to show the feature.
-The animation might appear a bit choppy at the end of the loop, that's due to a frame without motionblur (my mistake).
-The fla for this contains just one actionscript line, to load the file. The rest is just dragged into the viewer and initiates automatically.
-The f3dv contains 12 horizontal frames, 4 vertical and 41 animation frames, so a total of 1968 frames. It's about 5.3mb in size.
Let me know what you think :)
Pjanssen
05-27-2007, 01:54 PM
Today I've been working on fixing bugs and other small issues for v1.2. It's getting pretty close to being done now. So here's the final (or at least very-near-to-final) list of changes:
Maxscript:
- Advanced settings added.
- Presets.
- Avoid multiple open UI windows.
- New maxscript UI creation system.
- Render size Aspect ratio bug fixed.
- Statistics added: Horizontal Frames, Vertical Frames, Animation Frames.
- Warning when trying to render more than 1000 frames.
- Removed redundant 'create HTML' functionality.
- Added animation starting frame (=slider frame position when rendering)
Compiler:
- Windows UI for compiler.
- Manual Compile f3dv support.
- Added program/compiler to change variables in a f3dv file or to create a viewer for a certain file. I'm not 100% sure if I'll include this in 1.2, or let it wait for a later version.
Flash 3d Viewer:
- Animation support.
- Core functionality in one class.
- Flexible extension system.
- Provided extensions: Animation, Animation controls, Auto-Rotation, Auto-Rotation control, Loadbar, Fade-In after loading.
Installer:
- Start menu item for manual compiler.
- Max 8 'fix' included in install.
- Automatic 3dsmax menu item creation.
Pjanssen
05-31-2007, 11:11 PM
Flash 3D Viewer 1.2
Installer, .exe, 375KB (http://script.threesixty.nl/f3dv/f3dv_121_setup.exe)
Source, .rar, 6,58MB (http://script.threesixty.nl/f3dv/f3dv_12_source.rar)
Some notes:
- select your 3dsmax root directory when asked for an installation directory!
- The .NET Framework v2 is required.
I'm finally done with the new flash 3d viewer version. There are a lot of updates and improvements. The most significant are the addition of animation, presets, manual compiling and the restructuring of the flash part.
The update list hasn't changed since my last post, apart from the 'change settings program', that one is not in this release.
I hope that you'll like and enjoy it! Feedback is very much appreciated.
maxgamer
06-02-2007, 12:55 AM
after doing a render. I get an error message saying that the
The file "f3dV.swf" could not be opened
muzbee3d
06-02-2007, 03:01 AM
PJanssen
You've done some real fine work here, congrats.
I'll be trying it real soon. I think more compersion on frames to yeild more duration and larger size with a smaller footprint is possible. I like motion jpeg A with one field.
The camera movement and animation is HOT ! keep going !
Pjanssen
06-03-2007, 04:20 PM
Patch 1.21
It looks like I made a little mistake with the f3dv.swf file, thanks maxgamer for pointing it out. It was compiled for flash8, whereas the compiler can read and write up to flash 7. Hence the opening problem.
I made a patch to solve the issue:
Flash 3D Viewer 1.21 Patch (http://www.threesixty.nl/maxscript/f3dv_121_patch.exe)
This only includes the fixed .swf, so it should be installed over an existing f3dv installation. Again, just select your 3dsmax root folder as the installation directory.
The full installation exe is also updated to 1.21.
maxgamer
06-03-2007, 09:50 PM
It now seems like it is fixed in the auto-compiler within Max but the manual compiler still brings up the same error.
Also, I don't seems to have any inteface for this with the new design. I have to load and run the script within max manually.
Great work.
Pjanssen
06-03-2007, 10:07 PM
It now seems like it is fixed in the auto-compiler within Max but the manual compiler still brings up the same error.
Hmm that's no good. I'll take a closer look at that tomorrow.
Also, I don't seems to have any inteface for this with the new design. I have to load and run the script within max manually.
You mean like no menu item for the script?
long time i don't use max :)
i have test your version 1.21 with max 7, and it's bugged ;(
if i try to change the horizontal steps, i have "argument count error : hsteps.changed wanted 2, got1"
but the presset can change this value
band when i launchthe preview test, i have "Image I/O error", so, it's weird too, but i guess is because there is the caracter "+" on the name of the files it's trying to write on....
maybe you have a solution for this ?
thanks again :)
Pjanssen
06-15-2007, 11:15 AM
Hey
I only got the reply notification mail today, four days later...so sorry for the late reply.
I'll take a look at the problem today or tomorrow. Then I'll also look into the viewer problem with the compiler.
Cheers,
Pier
Joel Hooks
06-17-2007, 05:23 PM
@jbradley: Thanks for the info. I'm going to do some research into flash rendering if I've got time. My previous actionscript experiences made me a little sceptical of it's power when it comes to a huge load of calculations (e.g. 3d stuff), it remains a scripting language after all. But perhaps I should have another look anyway :)
The new actonscript3 virtual machine is way ahead of the as2 vm. It is a scripting language, but it is compiled to bytecode, so it differs in that sense from its sister javascript. Papervision3d is awesome.
While jbradley is almost surely correct, there is always a more efficient way of doing these things, your tool is really cool and will be very useful to me. I find it really exciting to see you combining maxscript and actionscript in such a way. My two loves rolled into one useful project.
Many thanks for releasing this under the GPL so the rest of us can learn from your efforts. Hopefully I can repay in kind sometime.
Cheers!
^^
still have the problem, does someone can upload a previous version of the script (the first version, i didn't have any probleme with it :)
thanks :)
Pjanssen
06-24-2007, 02:54 PM
I haven't had time to look into the problem yet.
The previous version is still available here:
http://www.threesixty.nl/maxscript/f3dv_111_setup.exe
Good luck.
thanks a lot :)
works ok now, and i keep your tab menu from the 1.2 version :)
:)
suvakas
06-27-2007, 08:49 PM
Eh..what a "small world" =P
I've been using a similar technique for a while now and i didn't know anything about your script.
I checked the forum in a long time and i found this thread.
I'm using a bit different approach to place the camera inside 3ds max. I also don't have any fancy interface and stuff.
But wow.. it was a big de ja vou moment for me =) I actually thought i'm the only one who has invented it =D
Anyway...here is a small thing that is done with my script and Flash Mx. (no pre-loader)
http://www.jastudio.ee/failid/mobla.html
I'll sure test out your script too.
Suvakas
Gemini82
07-11-2007, 06:02 PM
The plugin as been pluged over at Cartoon Brew go check it out,well in the comments section http://www.cartoonbrew.com/internet-blogs/ratatouille-virtual-sets#comments
P.S. Just trying to spread the word about this niffy plugin, it truly is a godsend
Gemini82
07-11-2007, 06:02 PM
The plugin as been pluged over at Cartoon Brew go check it out,well in the comments section http://www.cartoonbrew.com/internet-blogs/ratatouille-virtual-sets#comments
P.S. Just trying to spread the word about this niffy plugin, it truly is a godsend
Pjanssen
07-11-2007, 08:20 PM
Thanks for your comments guys.
Sorry for the lack of updates. I've still got to fix those couple of bugs.
I'd also love to continue development, making it a bit more sophisticated, but I've got too many things to do at the moment. There are just so many other things I'd like to focus on that I'm not going to continue with this on my own at least.
I'd need someone with good programming skills and ambition to help to be able to continue development of the tool.
@savukas: sorry for the late reply, I didn't get the reply notification :sad: Quite funny indeed to see someone with the same idea! Apart from it being a little sensitive to mouse movement, it looks really cool :)
radoxist
07-18-2007, 05:12 PM
Hi man,
its great plugin :thumbsup:
But I got a ugly error when I wanted to use a manual compiler, and it is quite key for me, because I wanted to do a postproduction on the images and save it in bigger compression.
Here is the error
http://www.radoxist.com/download/dump/error.jpg
Hope that you will help. the images are named noramaly as default(ahoj1_1.jpg, ..). I tried to rename them to something simplier (ahoj01.jpg,..) but I wont worked at all....
Pjanssen
07-18-2007, 09:45 PM
Hey, sorry to hear you're having problems with the compiler.
I think that the problem is due to your filenamimg rather than an actual bug. The filenames should be as follows:
aPath\aFilename+h_v_a.jpg
The plus sign should be in this. h, v and a should be numbers of the horizontal, vertical and animation frame. If you're not using some of them, just use a 1. So for example:
C:\example+1_1_1.jpg
C:\example+2_1_1.jpg
C:\example+3_1_1.jpg
etcetera
When selecting the source file in the compiler, just pick any of the frames. The compiler will split the filename at the + sign, and cycle through the h, v and a files.
I hope that this will help, good luck!
kishou
07-20-2007, 09:45 PM
i get this err:
http://s91.photobucket.com/albums/k283/aaabatt/?action=view¤t=untitled-11.jpg
Pjanssen
07-21-2007, 12:42 PM
Hm that's an interesting error. Have you got that directory on your HD ?
I'm not exactly sure, but it looks terribly much like it's using my default images directory for some odd reason. This would be very strange, since it should pick the directory from a 3dsmax system global...
kishou
07-21-2007, 07:54 PM
ok i fixed it. (dont know how though) but i did the 360 frame render thing and then it opened up the compilier and was doing it. but now where is my .swf file?
Pjanssen
07-21-2007, 09:09 PM
Could you perhaps try to see what you did different from your previous try? If it does turn out to be a bug I can try to fix it.
About the swf location: if all is right, a save file dialog should have popped up where you could set the location of the output file (.f3dv and if you checked it a .swf viewer)
kishou
07-22-2007, 02:58 AM
ok thx. sry but i forgot what i did differently. also ok when i viewed the .swf file it showed nothing. why is tht?
Gemini82
07-22-2007, 08:19 AM
Does anyone know how to get the file to work on a website. It works fine on my desktop but when I uploaded the file to mysite it doesn't appear.
Here is the source code, which I borowed from someones site
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-4" />
<title>mobla</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="350" height="384" id="mobla" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="t_v.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="t_v.swf
" quality="high" bgcolor="#ffffff" width="350" height="384" name="Clickme" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
</body>
</html>
Pjanssen
07-22-2007, 08:37 AM
ok thx. sry but i forgot what i did differently. also ok when i viewed the .swf file it showed nothing. why is tht?
I can't really tell without some more details. Does the .f3dv show anything when you open it in the flash player?
Does anyone know how to get the file to work on a website. It works fine on my desktop but when I uploaded the file to mysite it doesn't appear.
Here is the source code, which I borowed from someones site
One thing I see that isn't correct is that you've got </body> and </html> twice. I'm not sure if that's causing the problem though. Try this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Flash 3d Viewer
<style type="text/css">
#container {
position: absolute;
top:50\%;
left:50\%;
margin: %CONTAINERMARGINTOP%px 0 0 %CONTAINERMARGINLEFT%px;
width:%WIDTH%px;
height:%HEIGHT%px;
}
</style>
</head>
<body>
<div id="container">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="%WIDTH%" height="%HEIGHT%" id="f3dV" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="%VIEWERFILE%" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="%VIEWERFILE%" quality="high" bgcolor="#ffffff" width="%WIDTH%" height="%HEIGHT%" name="f3dV" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>
</body>
</html>
You'll have to replaced all %WIDTH%, %HEIGHT% and %VIEWERFILE% with the values that apply to your viewer.
Gemini82
07-22-2007, 12:48 PM
Hey I tried it but it still doesn't work. I know the code is working because I loaded the second swf with all the frames. Its only the file which loads all the frames and lets you rotate around which doesn't load. You can view the site if you like www.chrishatfielddesign.com (http://forums.cgsociety.org/www.chrishatfielddesign.com)
Im assuming this is how it works because it generates two files.
P.S. Thanks for the help man. Noticed you've been really helping people.
Pjanssen
07-22-2007, 04:50 PM
Hey,
again I'm not sure if this is causing the problem, but you've missed %WIDTH% and %HEIGHT% in the object and embed tag. Oh and I see that I've messed up the css style a bit too, so replace this:
top:50\%;
left:50\%;
margin: %CONTAINERMARGINTOP%px 0 0 %CONTAINERMARGINLEFT%px;
by:
top:50%;
left:50%;
margin: -300px 0 0 -400px;
And perhaps an obvious question, but is the .f3dv file in the same folder as the .swf ?
Gemini82
07-23-2007, 04:23 AM
Im seriously about to cry. I've tested everything and it wont load. I loaded Pjanssen's swf files from his site and they work fine. My files work locally but not when loaded to server. If any one can please help feel free. If i cant get it working probably have to switch to Quicktime VR
www.chrishatfielddesign.com (http://forums.cgsociety.org/www.chrishatfielddesign.com)
Gemini82
07-24-2007, 11:12 PM
Ok, I figured out the problem. When I render out the Fsdv file to my local space it writes this in the actionscript
var f3dvFile = "C:\\Documents and Settings\\Chris H\\Desktop\\Heady.swf";
f3dv.loadf3dv(f3dvFile);
The problem is when I upload the files to my server it still looks to retrieve the f3dv file from that location.
I used Sothink SWF Decompiler an created a fla file an edited the action script. The problem now is editing the script messes with the rotating of the images. Images rotate widly without prompt from the user.
Is there a way any way I can fix this via the interface in max
Pjanssen
07-24-2007, 11:24 PM
Hmm that's an odd bug that I haven't seen before. I'll have to look into where it actually occurs (i.e. in the maxscript part or in the compiler). To do this I'd have to find a day on which I can just focus on doing all the bugfixing for this project, and I'm not sure when this will be exactly. I hope that it will be soon though.
For a quick-fix, you're saying that editing the f3dvFile variable in flash messes up the frame order?
ps. Sorry for the fact that I haven't been able to help you on msn, been a bit occupied.
Gemini82
07-24-2007, 11:58 PM
No problem man. I figured you were busy
For a quick-fix, you're saying that editing the f3dvFile variable in flash messes up the frame order?
Yes. When I export the swf to fla via the decompiler some of the code doesn't transfer over the only action script the transfers over is what I posted above.
I think I have to go in manually and replace the missing action script on each sprite.
P.S. I'm a bit of a novice :)
Pjanssen
07-25-2007, 10:01 AM
What you could do is download the source (see opening post) and use the viewer fla from that one. Then you can create a viewer swf for each f3dv you make without too much fuss.
I'm not sure how you plan to use it online, but you can actually use one viewer swf for multiple f3dv's. In the fla you'd just have to remove the first line
var f3dvFile = "%F3DVFILE%";
Then in your html you pass the variable containing the file you want to load to the viewer:
<PARAM NAME=movie VALUE= "viewer.swf?f3dvFile=yourF3dVFileHere">
<EMBED src="viewer.swf?f3dvFile=yourF3dVFileHere"
This is not the whole part of the html code ofcourse, just the part where the difference is from the normal embed.
Good luck!
Gemini82
07-25-2007, 06:05 PM
Ok I think im brain dead. I tried but no success. Here is my code
<body>
<div id="container">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="400" height="300" id="f3dV" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param NAME=movie VALUE= "f3dv_stripped.swf?f3dvFile=bumblebee2test.f3dv">
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<emed src="f3dv_stripped.swf?f3dvFile=bumblebee2test.f3dv" quality="high" bgcolor="#ffffff" width="400" height="300" name="f3dV" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>
Gemini82
07-25-2007, 09:38 PM
Ok, I got it to work. Thanks Pjanssen. I failed to export the nl folder from the source files. So the viewer is working now. Finally I can stop posting,lol :)
Here is a rough version of the model.
http://www.chrishatfielddesign.com/f3dv_stripped.swf (http://www.chrishatfielddesign.com/f3dv_stripped.swf)
Pjanssen
07-25-2007, 10:04 PM
Ah cool! Glad you got it working. :)
Gemini82
09-14-2007, 05:25 PM
Ok, Its me again. The problem king,lol.
I'm trying to load the swf viewer file in my flash website. When I test the file via flash the file works fine, (I've fixed the previous problem). I loaded the file to my server and it opens fine and plays. When I link to the swf via action script and apply it to a button file does not play
Trans_btn.onRelease = function() {
load_imagesAd.loadMovie("f3dv.swf");
}
http://www.chrishatfielddesign.com/Multimedia.swf
(click Transformer button)
After solving a few problems I'm almost to the finish line can someone please help.
Gemini82
09-14-2007, 05:38 PM
Ok, Delay my last.
Its working now :)
aphexx
12-21-2007, 08:48 PM
Ok, Delay my last.
Its working now :)
hi gemini82..no your flash is still not working...well at least for me :)
@ pier: the latest version has a path problem. the application only works within the folder where it was compiled.
nor other folders nor internet html implementation will work with theses f3dv files.
WORKAROUND: use version 111
http://www.threesixty.nl/maxscript/f3dv_111_setup.exe
this will work. and for the compilation of the frames you best use a batch file.->
navigate to your rendered frames directory and copy all files from
3ds Max 9\scripts\f3dvExporter\f3dvCompiler to this location.
create a textfile and place a line like this inside
f3dvCompiler "yourframefilewithoutnumbers.jpg" "youroutputfile.f3dv" 10 5 4 4 true 1 true false
(pier please add this example to your compiler help; it took me hours to find the right syntax ;) even with this help)f3dvCompiler <String jpegFilename>
<String outputFile>
<Int hFrames>
<Int vFrames>
<Int hFrameStart>
<Int vFrameStart>
<Boolean fullHRot>
[Int rObject:1]
[Boolean createViewer:true]
[Boolean deleteTempFiles:false]
NOTE: you have to re-render your frames with the old script package.
if you used the newer version of this script first, the nomenclature of the saved frames differs to the old.
the compiler searches only for the old nomenclature.
after creating the textfile rename it to *.bat
double click it.
...
see the compiler fail...correct your typos and syntax ;)
...
double click it.
see the beautiful compiler work like a charm.
put the files *.f3dv and *.swf anywhere you want and drag and drop the swf file into a browser window or icon.
or use the cool html file you can create in the old version, when rendering, for a template to publish the film on the web!
Pjanssen
12-22-2007, 10:29 AM
Hmm that's a nasty bug indeed.
I'll see if I can look into it somewhere this week or the next.
Thanks for pointing it out!
krillmcrawl
02-12-2008, 09:19 PM
It would be very cool to be able to add hotspots to the 3d models, for example by combining your current solution with semi transparent low poly papervision 3D objects. This way we could have clickable objects. Adding this xtra feature would make this solution closer to feel like real interactive 3D. Let me know what you think.
Thanks for this nice tool! Keep up the good work.
Fortunatus
03-26-2008, 01:11 AM
Heya, is the above mentioned workaround with v.111 the only one solution how to make it working?
thnx. Fs
Pjanssen
03-26-2008, 12:03 PM
If you have flash you can also compile the viewer manually from the source files.
I haven't really had a moment to look into the problem yet.
I should actually start thinking about any further plans with this project. For one, conversion to AS3.0 might be a good idea. Restructuring the flash code is quite necessary too I think.
Adding interactivity might be a fun thing to explore too.
However, the large file sizes will remain a problem to take into consideration.
Fortunatus
03-26-2008, 06:54 PM
Ok, Thnx. for your answer.
I would like to say that this project of yours is really great and I like it:)
Iīm looking forward for newer versions if you will find some time to make them.
FS
mroranger
06-03-2008, 02:39 PM
Hello,
Ive trying to use your script and its funcioning partially.
Are there any possibilities to generate pure swf file instad of swf+f3dv. It seems that Im not able to run the swf with f3dv on some servers and its sometimes very dificult.
Now Im using v 1.2 for rendering or pure max for rendering, than renaming rendered frames to v1.1 compiler rules and everything seems to be ok(swf is runnng localy and also on other server).But on some servers swf is not able to load f3dv.
Any suggestions?
Thanx for super script
Mr.Or
Pjanssen
06-04-2008, 04:21 PM
I have indeed heard about these kind of problems before. I can't say what is causing it exactly at this point.
I will have to look into it if I ever get to rewrite the whole thing. But I'm not at all sure when that would be...
adrianfava
06-08-2008, 03:52 AM
Hi ppl! well i'm so tired..! but finally I found it. In page 8 some guy got a trouble where the issue was an error saying IO Image Error, and it happend like the script couldntīmake the image or render. Well actually i found why, and this is very helpful cuz i spent like 5 hours trying to fix it, even i installed, re-installed max, and intalled in another computer, it was a really mess, the thing is VERY simple, you SHOULD put the temp directory equal as the directory where you are creating the output file.
It could sound very silly but it took me like 5 hours just to discover this haha. Is that simple, save everything in the same directory and you got it. I was driving me crazy! cuz i have this final project for this monday and my professor ask us to do exactly what this script does. Finally I got it :D thanks SO MUCH! really appreciated!
INDIAN
06-08-2008, 08:55 AM
I was looking for something like this 2 days now . I wanted to make presentation in such a way for some models . This script is really awesome . Man you rock thank you very very much Pjanssen . I appreciate your work .
askhamdesign
06-12-2008, 04:25 PM
Really like it Janssen, thanks for sharing and hopfully you get time to iron out a few items & take it further, possible could make you some money I would be happy to pay for a more final version.
Calydon
08-09-2008, 08:28 PM
I would really like to use this script, but every time I tryto install (have tried with 3DSMax 8, and now 3DSMax 9)
I get this error: --Unknown property: "setTitle" in undefined
Is it because I'm using XP 64 bit?
Pjanssen
08-10-2008, 09:49 AM
Apparently the macroscript that starts the tool isn't initialised by the time the 'create menu item' script is run. What you can do is go into the stdscripts directory and remove the menu script.
After that you'll have to assign the macroscript to a button or menu item manually to run it.
Calydon
08-13-2008, 07:51 AM
I really appreciate your help with this, Pier.
What I did was go into
C:\Program Files\Autodesk\3ds Max 9\stdplugs\stdscripts
and rename f3dvExporterMenu.ms to something else.
Then I went to the main menu > customize > menus tab.
I can see that there is a menu group (lower left pane) called Flash 3D viewer, but I don't see anything related to Flash 3D viewer in the Action pane.
Does this mean the script did not install properly?
Pjanssen
08-13-2008, 08:18 AM
If you only rename the script it will still be executed when max starts. You'll have to remove it completely from the stdscripts directory.
I can't remember exactly where the macroscript puts it's entry, but if the script itself initialised properly, the entry should be somewhere in the list. I think it's in a category like f3dv.
Calydon
08-14-2008, 09:11 AM
I thought I should report back my findings in case they can be of some help.
I tried deleting f3dvExporterMenu in program files, but I still didn't see any f3dv category or actions items, so then I did a system-wide search for f3dvExporterMenu. I also found it in the C:\Program Files (x86)\stdplugs\stdscripts folder (a feature of XP64 windows). I was unsure if this is part of your script install or a remnant from my Max8 attempt. Or possibly even just a failure to pick the correct folder the first time I installed?
I then deleted all the script files from the program files (x86) folder. I re-installed the script, without the max8 fix or the menu item option. I did a fresh search for f3dvExporterMenu, and it was clean.
When I ran 3DSMax and chose customize > menus, I didn't see any f3dv category or action item.
When I have the opportunity I may try installing on a different 32-bit windows environment to see if that will work.
aphexx
11-15-2008, 02:13 PM
hey pier, how are you? dont you want to fix the bug in the newer script?
it cant be more than a typo or one line that has to changed, i think?
meanwhile look at that stone i published with your old script: HERE (http://www.saschahenrichs.de/blog/3dviewer/stone_01/stone_only_02.html)
but be aware of the ~ 9 MB that this is.
thnak you again for this grat thingy. currently this is the only possibility, to publish normal mapped and "shaded how its meant to be" geometry on the web.
Pjanssen
11-20-2008, 06:41 AM
Hi Sascha,
I've been really busy lately and haven't had any time to look into the problem with this tool. It is probably as you say just a single line causing the problem. But I'll have to get back into it to see how I actually made this whole thing to fix it, since it's been a while since I wrote it. And that takes some time.
I hope I can do something about it before too long.
Th3DEAD
04-17-2009, 02:57 AM
Hello,
I already hold in excuse me of my low-grade English.
I thank you for script and congratulate you.
But I have a problem, me cannot exceed 100 frames of animation.
And I have 301 frames ! After 3 hours of rendering, at the time of compilation, script plants and I can make nothing more.
I still have pictures, if you had a resolution.
Thank you definitely!
Pjanssen
04-18-2009, 11:35 AM
Does the script crash?
Th3DEAD
04-18-2009, 02:03 PM
The compiler more precisely.
It is apparement not made to exceed 100 frames in animation...
Pjanssen
04-18-2009, 06:38 PM
Are you getting any error messages?
Alternatively, did you try using the manual compile?
Th3DEAD
04-18-2009, 07:26 PM
It crash and it is a message of windows as what software is going to close.
I have try manual compilation, but it crash even when I use 100 frames or more of animation...
Fortunatus
04-18-2009, 07:31 PM
I have the same experience as Th3DEAD
Pjanssen
04-18-2009, 07:41 PM
Is this just with 100+ frames of animation? Or 100+ frames in total? (including rotations)
See if the crash dialog has something like "show details", that might reveal something useful about what's going wrong.
Th3DEAD
04-18-2009, 09:04 PM
It is minimum 100 frames and it up to the infinite.
Me I try 301 frames of animation and it crash with rotation including.
There is not relationship of error, only the message as what he must stop...
If they use the compiler manually, they can note that he cannot exceed 100 frames in animation.
Is it already normal?
Thank you
Edit :
I have other one, but baby worries!
I would have liked to know if it had there no possibility of having the animation which takes all zone without having the menu?
You can realize it by you even:
http://th3dead.free.fr/Index2.php
It makes not very aesthetic ^^
Pjanssen
04-19-2009, 08:33 AM
I'm afraid I can't give any proper support to solve this problem at the moment, since I'm very busy with other things. I've had a quick look at the compiler source, but didn't really spot any problem.
If you know C#, I'd suggest you download the source code and dig around in it.
As for the question about esthetics: the provided viewers were meant more as an example than something you'd actually use. Especially the one for animation isn't very pretty indeed, and is more to show the capabilities. The viewer is written to make it very easy to change the appearance and behavior of the viewer and it's components.
Th3DEAD
04-19-2009, 04:05 PM
Thanks, i can wait for the moment, is not a problem.
I know vb6 ,if I knew C# I would have try to resolve problem by me even...
pifitas
05-18-2009, 01:28 PM
Hi.
Thanks! excellent tool. that's exactly what I was looking for :)
I've trying it on 3DS Max 2008 x64 / vista ultimate x64 and vray 1.5.17 x64 with no problems at all, except that final * f3dv file keeps "spinning". Why?
I've disabled auto-rotate option but nothing happen. How can it be fixed?
or there is another software to assembly images? I was looking for someting to produce a QTVR objet in Quicktime format.
Thanks!
nickybrownell
08-09-2009, 10:20 AM
Hi,
After looking around for a way of rotating round a diamond image this sounds perfect!
I say 'sounds because currently I can't get it to work... I've put a test object in (cube) and one camera.... ran the script and I get:
Image I/O Error (window header)
D:\Documenten\3dsmax\sceneassests\images\_Camera01+1_1_1.jpg
This has 'retry' and 'cancel' buttons with it.... retry doesn't do anything but bring up the same error message, and cancel moves onto the nest frame with the same error (with the camera/frame numbers obviously chnaging).
Shame cos this sounds great and it seems people have had it working for them on here.
I'm running 3D Max 2009 on XP x64 (I've also tried it on XP x84... same error)
I'm probably doing something very stupid... any pointers??
Thanks again for the script.... should make alot of people lives that little bit easier : )
Pjanssen
08-10-2009, 01:03 PM
It looks like you forgot to change the temporary frames directory.
It is set to D:\Documenten\something by default. I must admit that this has been a bit of a bad design decision when I made the script. It should ideally point to an existing location by querying max for a temp directory.
I hope that helps.
nickybrownell
08-12-2009, 08:12 AM
Cheers for that.... bit of a thick move on my part.
Though I was also wondering if there was a way to take the .swf file and the .F3DV file and combined them into 1 .swf file.... just that I'm having problems if I move the .swf somewhere... is there an adress built into the script, where it loads the frames??
Can I change this address so it doesn't try to find "c:/My Documnets... "etc??
Thanks again,
Nicky :thumbsup:
Pjanssen
08-13-2009, 02:18 PM
Merging the swf and f3dv (which is actually still a swf) will be a tricky thing to do without the flash dev environment. You should be able to use the f3dv and swf in any location though, as long as you keep them together. The link to the f3dv should be a relative path.
If you want, you can manually include the f3dv in your player swf by using flash. Just importing the f3dv into your own project and go from there. You can use the provided fla files and actionscript 'framework' as a base to start from.
leviatan1001
12-13-2009, 03:33 AM
Hi everybody.
Im trying to add a viewer to my blog. But the .swf cant 'call' the .f3dv file. It seems it cant load it or something.
I tried to show just the .f3dv file 'alone', using the extension .swf and it works, all frames are showed looped.
Well, im not a web developer, im just trying to add some cool stuff to my site, hehe.
This is my code:
<embed width="200" src="http://sites.google.com/site/dmgd3d/home/files/8.swf?file=http://sites.google.com/site/dmgd3d/home/files/8.f3dv" height="200">
</embed>
Source files:
swf viewer (http://sites.google.com/site/dmgd3d/home/files/8.swf?attredirects=0)
f3dv frames (http://sites.google.com/site/dmgd3d/home/files/8.f3dv?attredirects=0&d=1)
Thank you for this amazing tool.
Pjanssen
12-13-2009, 10:25 PM
This is a known issue with the current version. Some people seem to have found some kind of workaround, but it hasn't been properly fixed.
One thing you can do is compile a proper viewer yourself from the supplied viewer source files.
I don't think I'll have the time to fix this issue any time soon (actually the whole thing could use a rewrite...).
leviatan1001
12-14-2009, 12:01 PM
[...]
One thing you can do is compile a proper viewer yourself from the supplied viewer source files.
[...]
Can you please release the actionscript code of the viewer? I tried to open the .fla you released, but it crashes. You included lots of code files, i dont know what are they for.
elheroes
02-15-2010, 06:10 PM
First of all : many thanks for this great plugin !
I'd like to share my experience regarding the problem of using the flash viewer on a web page.
I've spent a couple of hours trying to figure out what was wrong since it perfectly worked locally but couldn't load the data file when installed on a web page.
I don't know if I should agree with the recent opinion expressed by Steve Jobs on Adobe but...
The solution was... to change the file extension !!
Hence, my data file named test.f3dv could be loaded if renamed as test.swf
I don't know if this is a flash "feature" or more probably a bug but it took me some time to solve.
And sorry for my english
Webflashing
06-09-2010, 03:18 AM
Hi! I recently discovered your project, and I must say that according what you show on your portfolio, it seems pretty amazing. The links you provide in the first post are broken =(, is there any chance you could reupload them? Or send me an email, pm, or whatever?
Thank you very much!
Web-
embryotic
06-27-2010, 08:04 AM
anywhere that we can still get this script? - I liked it
Pjanssen
07-09-2010, 07:58 AM
I've uploaded the latest version of the viewer and exporter again:
Flash 3D Viewer 1.2
Installer, .exe, 375KB (http://script.threesixty.nl/f3dv/f3dv_121_setup.exe)
Source, .rar, 6,58MB (http://script.threesixty.nl/f3dv/f3dv_12_source.rar)
rokazas
07-19-2010, 10:08 AM
thank you, Pjanssen, for updating links to your tool
i find it quite useful, but the bug that makes it usable only in the folder it was originally created still exists. You mentioned workaround using flash to recompile viewer. Aren't there any other ways yet?
Nupsi
02-20-2011, 11:09 AM
Hi there,
maybe itīs just me but I canīt load the f3dv-File through the swf-viewer, no matter what I try. It seems that the original file-path is somehow encoded to the swf-Viewer, because if I open the file from the path where Flash3dViewer saved the swf- and f3dv-Files to, there is no problem at all.
But as soon as I move the files to another folder and start the swf-viewer from there, the screen in Firefox just stays blank. Even calling the f3dv-file like Pjanssen suggested, makes no difference (src="f3dv.swf?file=thef3dvfile.f3dv").
Any help would be great! Thanks in advance!
Nupsi
P.S.: Please excuse my poor english ;)
Insanto
02-20-2011, 04:19 PM
hey,
i took a look at the Minas Tirith project and i remember the geometry shown in the first post here from some movie.. dont recall the name but had John Noble in the role of the king..
well my point being: do you have a version of the website in english if there is still one up?
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.