Notifications
Clear all

[Closed] Flash 3d Viewer (using maxscript rendering)

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

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.

Awesome script! I tried it out quickly today and i came up with this, thanks.
btw, the Minas Tirith project is really coming along very well, good luck with it.

1 Reply
(@flexgiddy)
Joined: 11 months ago

Posts: 0

error loading it…make sure that your html file, .f3dv and the .swf are in the same folder. (maybe)

I’ve updated the script to version 1.11 fixing the following things:
[ul]
[li]Scripts directory problem (double slash) causing immediate crash of script.[/li][li]Check if viewer swf exists before rendering.[/li][li]f3dv filetype no longer strictly necessary, other filetypes can be set before rendering.[/li][/ul]For the download location, please take a look at the opening post

@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…

[color=DarkOrange]@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
[/color]

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

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.

1 Reply
(@flexgiddy)
Joined: 11 months ago

Posts: 0

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

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…

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

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.

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.

No problem at all. I’m glad you’re pointing these things out.

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

Page 4 / 16