Home Technical Talk

Rendering Real-Time Shaders

polycounter lvl 10
Offline / Send Message
Microneezia polycounter lvl 10
Hello.

Like you, I am excited by real time shaders. The ones around here are particularly nice. I would like to composite some realtime animation sequences but getting the entire finished shot into the viewport is impossible.

I was taking screenshots frame by frame and matching the viewport color in the composite but its obviously limiting... I wonder if its possible to somehow get a transparent background for the real time character performing animation in my viewport window?

Maybe im just not seeing things clearly?

Replies

  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    maybe a screen capture software like fraps (does this work here?!) or camtasia or cam studio would help to get the animation


    but in general (I'm hijacking this thread a bit) .. is there a way to get a screen shot in a higher resolution? or using something like a virtual desktop to run the app like max in that is using a higher resolution.
    ... To say is short.. is there ANY way to get past the resolution your monitor dictates you?
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
  • cman2k
    Options
    Offline / Send Message
    cman2k polycounter lvl 17
    There are scripts for 3dsmax to capture your viewport at a higher resolution and write it out to a file (GrabViewport Script – by Leslie Vandenbroek)

    I would be willing to bet you could modify one of these to take a screenshot, advance to the next frame, take another screenshot, advance to the next frame, etc. This is similar to the script ZacD just posted, but not quite.

    As for "transparent background", I'm guessing that isn't possible. But I would suggest going for a "Green Screen" approach and using an obnoxiously bright color for your background (just on a polygon) that you could key out in your video application of choice.
  • Piflik
    Options
    Offline / Send Message
    Piflik polycounter lvl 12
    Are you using Max? You can use 'Make Preview' (in Max 2011 it has been moved to Grab Viewport) to create an animation from the viewport...the resolution is a percentage of you render resolution, that you can specify...
  • Brice Vandemoortele
    Options
    Offline / Send Message
    Brice Vandemoortele polycounter lvl 19
    if you're using maya you can render out cgfx shaders at highres using the hardware rendering mode.
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 18
    In Maya you can use Window > Playblast as well. Just hide all the UI and set a preferred background color.

    Although this won't give you a transparent backdrop. If your cheeky you could set a key-color as background and use your compositing software to mask it out. :)
  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    cman2k: this link is pure gold

    I've updated the script with an resolution-refresh button and now it's on my absolute fav script list :)

    thx man!
  • Microneezia
    Options
    Offline / Send Message
    Microneezia polycounter lvl 10
    changing the background is what I was thinking too but Brad had the best idea in a thread a couple over. Make the background black and apply a totally white shader to your model. This gives you an alpha you can save out next to your beauty shot to take out the background....
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    If you need the mask, you could just render it twice (why not, it's realtime/fast). Once with the realtime shader, and once where the object has a constant white material with a constant black background.
  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    another way for single renders with transparent background is to disable (!!) viewport aa (nvidia or ati control panel)
    and use the "green screen" method (in fact the "green" should be a color(value) you don't use in the models texture),

    now you need to take the screenshot twice as big as your final resolution if you want a 4 sample aa

    then simply use the magic wand tool with an tolerance around 5% to select and delete the background and reduce the image size by the amount you rendered it bigger then needed (here half the size)

    this gives you perfect aa on a transparent background while rendering only once

    of course for motion the 2nd render in black and white is the way to go, here you should also render in a higher resolution or (if possible) use viewport aa
  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    @rollin: he want´s to render his works with a realtime shader so no rendering process there...
    This is only a solution to his second question and it only works without realtime shaders
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    @rollin: he want´s to render his works with a realtime shader so no rendering process there...
    This is only a solution to his second question and it only works without realtime shaders
    Which method? Both sound quite plausible to me.
  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    SpeCter: I don't understand what you're trying to tell me. I DO talk about rt shader and when I say rendering I'm referring to what max does to render the 3d/material data to a picture in the viewport and the maxscript saving this picture to an image file on the hd.

    And on the other hand I'm more answering my own question then answering his, this was done by others already.
  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    rollin wrote: »
    SpeCter: I don't understand what you're trying to tell me. I DO talk about rt shader and when I say rendering I'm referring to what max does to render the 3d/material data to a picture in the viewport and the maxscript saving this picture to an image file on the hd.

    And on the other hand I'm more answering my own question then answering his, this was done by others already.

    Then i said nothing, nevermind me:poly142:
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Do like rollin says but try using, select-> colour range. or create a mask with the channel mixer.

    That way you get a clean alpha, work in 1 pass and you can use a green ground plane to get screenspace AO and contact shadows. If you have access to a compositor then use that, most keyers can 'despill' the green or blue which will remove green tints from shadows

    Rollin: wouldnt you be more inclined to use the method for motion? i mean if your doing motion your going to comp in a compositor and the compositor will have a good automatic keyer like keylight.
  • cman2k
    Options
    Offline / Send Message
    cman2k polycounter lvl 17
    This alpha-channel stuff is all well and good, but this guy is talking about animations here. If you are doing a decent-length animation, doing it all in photoshop with select -> color range is going to be a bitch.

    Going the "green-screen" route, you can capture a sequence of targa's and feed them directly into a video program like adobe premiere. These types of apps have specific tools for working with green-screened video and can parse out the background just as well as photoshop...but it would probrably be way easier.

    The amount of time this would save you is likely directly proportionate to the actual amount of animation you need to handle but still, the point stands. And if you are working with animation I assume you are going to put this all into a video application at some point anyway.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Totally, and if your using Max2011 you get Composite for free! The keyer is actually pretty nice.
Sign In or Register to comment.