PDA

View Full Version : need output to .swf? :)


MasonDoran
01-23-2003, 02:24 PM
on Highend there around 5 or 6 different kinds of toon shaders and there is also inkworks that renders direct to swf.

Swiffworks sucks because cuz you cant use any proper lighting information...just a flat shade with an outline that does not vary in line weight. Inkworks is better cuz you get lighting information....but the renderer bites cuz it produces a lot of errors in the render...seems to be a problem with reading the z depth.

The toonshaders on highend are nice but you dont get any .swf output.....and i wanted to do something natively in 4.5. So here is what i did AND get output to .swf.

Swf works best when you use toon shader type graphics....and Flashes Trace Bitmap function is the best on the market...its both very fast and accurate.

Create 2 rampshaders....one for color information: Interperolation set to Linear, and color input set to brightness. Play wth the colors you want.

The second Rampshader is for the line: In the incandescence slot....set interpolation to none, add a white color swatch....and drag to around the middle...this will decide the thickness of the line. Black on the left...and white on the right.

Now create a Layered Shader....hook up the rampshader for the line on the far left so it is on top....and the colored rampshader so it is on the right. Set the composite flag to layered texture. Now connect the Line Rampshader to its own transparency slot in the Layered Shader....this is so it will render only the black line on top of colored rampshader and not the white.

Now test away....get the line the way you like it....and the colors so they look good. Once you are ready to render...you will need to make 2 passes....one for color information...and one with the line information....and then composite in Flash using the trace bitmap. It is easy to do, just render the color information by flipping the order of the shaders in the layered shader and changing the composite flag to Layer Shaders.

Its very import to render out as TGA format so you can convert to PNG format to preserve the Alpha Mask in Flash(flash doesnt support tga)

Now import the 2 passes on 2 seperate layers....then trace bitmap. I found the corner threshold set to normal and the curve fit set to smooth is a nice setting.

At this point...make sure the line layer is on top...and that you delete all of the white......and then merge the layers.


This method is a little bit of work....but is more accurate then Inkworks...you get a better line...and it is more accurate.

Chappo
01-23-2003, 06:00 PM
Uhm...... could you post some experimental work of yours while using your technique ?? :)


How would you tackle animations that are over 100 frames ??

Would you independently trace bitmap every 100 frames ??


P.S. :applause: for your .swf output idea ... it's nice to have alternatives over swiffworks !!

jairbair
01-23-2003, 07:08 PM
thanks for the info 2byts

I haven't done alot of tracing in flash. How would the file size compare to video? Say a 100 frames of vector (traced maya output) to 100 frames of video. I heard some traced images in flash can create larger files than video.

I have a project coming up that I'm hoping I can give this a try.

I haven't seen anything done in swiffworks that is inspiring. Illustrate for max samples look great but I think David is a pretty busy boy so who know when he'll release a version for maya.

Thanks for giving me something to explore.

take care, jairbair

monotypic
01-23-2003, 09:40 PM
wow.......... thats....... that's allot of work for long animations...

illustrate for max is the best. i wish i wish it would get made for maya... that would be soooooo nice.

but yeah... :applause: for the work around the problem...

MasonDoran
01-24-2003, 11:01 AM
yeah...certainly is a lot of work :( But then again...if you have animations that are 100 frames you shouldnt be posting it on the net ;) Its wiser to use instances to keep the files sizes small.

but it also depends on what you are doing.....cuz i really dont think it is any MORE work then the other options we currently have and it still guarrentees the best quality. The current project i am working on doesnt require lots of animations...mostly stills that need to be in vector format.

First of all, trace bitmap is very fast and accurate......but everything is mostly brainless donkey work...so if you do it right the first time....you dont do much more then use hotkeys to do the entire process. If there was a way to render the images in png format or be able importa tga format that would also cut down the workflow very fast. One could always use Deep Exp. to convert animation files at once! I havent yet figured out how to setup the shader so it only renders the black line and not the white....cuz that will leave room for headaches later...also...if you are lucky....you can do the render at one pass instead of 2....which cuts the workflow in half. I do it in 2 passes mostly to avoid any trace bitmap errors cuz i want to stay in the lines.

MasonDoran
01-24-2003, 11:10 AM
The danger of Trace Bitmap is that the better the quality....the more points are used...and this is what creates large file sizes. Flash can literally trace every single pixel if you want it to. One option is to import the vector file into Illustrator and then reduce the points....depending on the quality you are looking for you can reduce the points to by 80% and still have a decent image. This isnt very practical for animations...but for vectorized backgrounds it would work well.

I know there are also a lot of apps that can compress .swf files very will.....anyone know their names? And which are recommended?

I havent tried illustrate....so i cant compare

Chappo
01-24-2003, 11:41 AM
I know there is www.optimaze.biz , it's a neat program that cuts your filesizes, but haven't been able to work with it :(


anyway.. could you post some of your work ??? i am very interested into this, as i want to be able to merge webdesign and maya together.

bjarneheden
01-24-2003, 12:30 PM
I hope that Swift3D will be available for Maya. They have versions for 3dsmax, Lightwave and XSI, but not for Maya at the time?

I´m a former Max user and have worked with Swift3D, and it worked pretty well most of the time.

Strange that they have not made it for Maya...


/Bjarne

Chappo
01-24-2003, 01:13 PM
I heard it was because Maya don't wanna give development support to those guys....

Don't know why.....


Maya is - in my eyes - not doing very good in the marketing department..... you can correct me if i'm wrong :)

MasonDoran
01-24-2003, 01:55 PM
i didnt know that swift3d exported to .swf?

CGTalk Moderation
01-14-2006, 06:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.