Hiding Flare behind 3D Model

Nuwanda
Nuwanda HamburgPosts: 177 Enthusiast
Hi everybody,
I want to add an engine exhaust effect and had placed and sticked a flare to a 3D model - but the flare effect is not hidden by the model itself, it shines through.
engine_flare.jpg
Can you kindly tell me what does the trick to hide the flare correctly behind the model, respectively
to make the model obscure ?
Many thanks :)
«1

Comments

  • spydurhank
    spydurhank Posts: 3,193 Expert
    I just tried the same thing.
    Try this...
    1. Add a 3D point to your timeline and place it exactly in 3D space, wherever you need your engine exhaust to be, then parent the 3D point to your model.
    2. Add a plane to your timeline, "it needs to be below the 3D model" and add the lens flare effect to it. in the Hot spot position, choose layer and then choose the new 3D point that you created earlier.  
    You should be good to go.
  • NullUnit
    NullUnit Posts: 791 Just Starting Out
    Ah, I'm glad this came up. I've done this same technique successfully but, a problem that I encountered is that if you use "distance fog" it will also effect the plane with the light flare on it, thus revealing the plane itself by "fogging" it. Is there a way around this? I couldn't figure it out.
  • AxelWilkinson
    AxelWilkinson Posts: 5,255 Staff
    Apply the Flare to a Grade Layer?
  • Nuwanda
    Nuwanda HamburgPosts: 177 Enthusiast
    @spydurhank
    Many thanks for your reply. I tried this out - pls see my video as the result.
    The flare is not sticking well in the 3D space unfortunatelly. Again any idea ?
    http://youtu.be/I5DqBWGif10
  • spydurhank
    spydurhank Posts: 3,193 Expert
    edited March 2013
    Whoops, sorry man. I forgot to mention that.
    1. On your timeline, scroll to the midway point of where your flare should start to appear in front of your model.
    2. Clip the flare layer in half, do not duplicate it, just cut it in half. Leave the first part of the flare effect below the model and move the 2nd part of the flare "the one you just cut" effect above your model on the timeline.
    3. On the first flare layer, scroll to the end of the clip layer "where you cut it" and key frame it's opacity to zero, then go back 3 to 5 frames and set the opacity to 100.
    4. On the second layer, follow the same steps from step 3. except you add the opacity key frames at the beginning of the layer.
    I hope I explained this properly. If not let, let me know and I'll post a few screen capture pics.
    Edit.
    Oh, and your flare's position is actually fine, it's behind the ship, you just need it to be in front of the model as it turns.  
  • Spielberg
    Spielberg Posts: 49
    I think you're getting that effect on the rotation because Lens Flare is a 2d effect.  Ive had similar issues with the lightning effect for the same reasons.  
    Have you tried adding a light to that point on the exhaust, and then applying a grade layer with the Auto Lens Flare effect?  This will cause the lens flare to occur when the light passes over the Auto Lens Flare Effect point, giving it a Blade Runner feel.
  • Nuwanda
    Nuwanda HamburgPosts: 177 Enthusiast
    edited March 2013
    spydurhank & Spielberg,
    I tried it both out but more or less it is not working properly. Seems that I still making some kind of mistake.
    Would you mind to verify the project file itself, modify it and place it for download as well in return ?
    Due to this I could much better understand and reproduce your suggestions and workflow.
    Much appreciated and again thanks a lot for your support :)
  • spydurhank
    spydurhank Posts: 3,193 Expert
    edited March 2013
    Here you go, 
    I forgot to mention that you need to set the plane's blend mode to add or screen.
    Look close and you'll see the the Flare effects and their key frames overlap a little bit.
    Whoops... gimme a second, I can't seem to upload the .rar file... maybe I need another format?
    Okay got it. :)
  • Nuwanda
    Nuwanda HamburgPosts: 177 Enthusiast
    edited April 2013
    spydurhank - thanks a lot for your support ! I did a quick test and the effect looks really great.
    http://youtu.be/3cwp0a0_mFc
  • spydurhank
    spydurhank Posts: 3,193 Expert
    Very nice... great work.  :D 
  • TheRealJayWalker
    TheRealJayWalker Posts: 219 Enthusiast
    That looks great.!
  • SimonKJones
    SimonKJones Posts: 4,448 Enthusiast
    edited April 2013
    I'd love to have 3D models work within the main 3D space a bit more efficiently in a future version. It would make stuff like this so much easier to do and open up all kinds of interesting possibilities.
    I was having a play around this morning and did manage to create a procedural lens flare that behaves appropriately in 3D space as a camera rotates around a model. It's a bit of a faff, though:
    http://youtu.be/gUf-EpI1_6Q
    (note: I didn't spend any time to set up the model itself to look nice, it's just bare bones)
  • OrangePekoe
    OrangePekoe Posts: 478
    I'd love to have 3D models work within the main 3D space a bit more efficiently in a future version. It would make stuff like this so much easier to do and open up all kinds of interesting possibilities.
    I was having a play around this morning and did manage to create a procedural lens flare that behaves appropriately in 3D space as a camera rotates around a model. It's a bit of a faff, though:
    http://youtu.be/gUf-EpI1_6Q
    (note: I didn't spend any time to set up the model itself to look nice, it's just bare bones)


    Simon, curious how you went about doing that?  I've found one way of doing something similar but always looking for other / more efficient ways of doing certain tasks.  Furthermore, if you were to give it a more chaotic camera / model movement, do the flares hold their respective positions well?  Is there a limit in distance / size of the thrusters where the lens flares can no longer stay tracked to them?
     

  • RossTrowbridge
    RossTrowbridge Posts: 423 Enthusiast
    Couldn't you use the Auto Light Flares Axel did a tutorial on a while ago if there was a bright object inside each engine?
  • spydurhank
    spydurhank Posts: 3,193 Expert
    rtrowbridge... I've tried the auto light flares thing and it works very well if the light source is facing the camera... the only thing is, there needs to be light and some glow, being emitted from the ships engines, even when the light source is behind the ship, or the engines are facing away from the camera. It looks really weird when the light flares just "pop" or turn on all of a sudden.
    It would be really cool though if we could, as Simon said, have 3D models work better in the main 3D space so that they could appear to interact with other 3D objects like particles and Light Flares. That would be sweet. :D     
  • SimonKJones
    SimonKJones Posts: 4,448 Enthusiast
    edited April 2013
    I basically made a duplicate of the ship, customised so that only the rear engine material is visible, and bright white. I then applied auto flares to that, and set that layer to Add blend, on top of the main ship model. Parented the light layer to the main ship, and that was that.
    Spydurhank - for a continual glow that's always there, you could just have some permanent lens flares parented to the engine locations in 3D space, and on a 2D layer that's always below the main model. That way the glow would always be behind the model, but coupled with the technique I mentioned above I think the effect would work rather well.
    Edit: here we go, works pretty well, I reckon:
    http://youtu.be/_mWgQBxprd8
  • spydurhank
    spydurhank Posts: 3,193 Expert
    Simon... dude... your last render was pretty damned awesome!  :D 
    Also, aside from the auto Light flares... that's exactly how I do it.
    I use 2 planes set to add with Light Flares.
    On the timeline, one layer is below the ship and the 2nd layer is above the ship. They have opacity keyframes so that the Light Flares are constant and appear behind the ship or in front of the ship, depending on what part of the ship is facing the camera.
    The Light Flares are parented to 3D points, which are parented to the ship in the exact location of the engines.
     
    Really cool stuff.  :D 
  • SimonKJones
    SimonKJones Posts: 4,448 Enthusiast
    Right, so by that method you need to manually keyframe lights on and off, right? For some shots that'll definitely yield higher quality results. However, my more procedural method would be pretty handy if you were doing a big space battle with potentially hundreds of individual light elements.
  • spydurhank
    spydurhank Posts: 3,193 Expert
    Definitely.  :D 
  • OrangePekoe
    OrangePekoe Posts: 478
    I basically made a duplicate of the ship, customised so that only the rear engine material is visible, and bright white. I then applied auto flares to that, and set that layer to Add blend, on top of the main ship model. Parented the light layer to the main ship, and that was that.
    Spydurhank - for a continual glow that's always there, you could just have some permanent lens flares parented to the engine locations in 3D space, and on a 2D layer that's always below the main model. That way the glow would always be behind the model, but coupled with the technique I mentioned above I think the effect would work rather well.
    Edit: here we go, works pretty well, I reckon:
    http://youtu.be/_mWgQBxprd8

    Interesting, was the rear engine material already a separate material or did you have to modify it in another 3D program?  It sounds very similar to the way I'm going about it!
    That permanent lens flares method sounds great I was having troubles with that in a few of my shots....  totally stoked to try that out!

     

    However, my more procedural method would be pretty handy if you were doing a big space battle with potentially hundreds of individual light elements.


    Read my mind... :O
     

  • SimonKJones
    SimonKJones Posts: 4,448 Enthusiast
    Yeah, that particular model happens to have loads of different materials to play with. If you didn't have multiple material options, you'd have to go and alter the texture itself, presumably, so that everything was black except the engine bit.
  • WedgeOz
    WedgeOz Posts: 226 Enthusiast
    I was actually stuck with this problem myself for a while....so I cheated a bit.
    I took all of your suggestions and added them all together. I was able to attach a light flare to a point, then parent it to the rear of my spaceship (Spaceship #1)......(and yes.....the flare shone through it).
    So I duplicated my spaceship (Spaceship #2) and removed the flare from that one, and changed the blend so that it was opaque.
    Whilst Spaceship #2 sat on top of Spaceship #1, the flare was hidden behind it. Then whilst I animated the ship flying past the camera, I quickly faded out (made transparent) Spaceship #2, thus leaving the flare continuing to shine behind Spaceship #1.
    Though for the purpose of this test I didn't really spend a lot of time adjusting the intensity or scale of the flare in relation to the distance from the camera. But with more tinkering of flares, missile smoke, rays etc.....I think I can pull of some groovy space fly-bys. :)
    http://www.youtube.com/watch?v=yQj6Uk-j1DE
  • Triem23
    Triem23 Posts: 20,507 Ambassador
    http://m.youtube.com/watch?v=ZBNzy_JwWFw&desktop_uri=%2Fwatch%3Fv%3DZBNzy_JwWFw

    What I did for this shot was create a plain white, lo res sphere in BLENDER, non-illuminated. Then I moved instances of the spheres into position behind both ships, and parented them to their respective ships. Auto light-flares and glows, good to go. That's the same way I did the engine flares on the shuttle crash shot as well. Because I have spheres, I seem to be getting proper occlusion in 3D space, which would be very obvious if I just did a render rotating around the Starfury, since that baby has things protruding past the rear nozzles. And I don't have to swap layers to get the engine glow occluded by the ship
  • Triem23
    Triem23 Posts: 20,507 Ambassador
    Hmmmm.... Ok, I semi lie. The spheres don't always propely occlude. I did some tests tonight. In my original animations, it just happened that it lined up right. Odd, because I really thought putting in a damned (that's the uber-Shakespearian 'Damn-ned.') 3D sphere in 3D space would work to drive auto flares. Because I was going to blur and glow the spheres layer, and take the glows off the flares to tone things down.
  • Triem23
    Triem23 Posts: 20,507 Ambassador
    Ok, how about this. If I built a particle sim that just dropped that basic circle from a point. Zero speed, life: one frame, particles per second: , scale: (i. e. 0,0,0, position and orientation, but after scaled for the scene.). Blur, glow, auto-flare? Something to try tomorrow.
  • Triem23
    Triem23 Posts: 20,507 Ambassador
    Wedge, I like that fly-by. It has a bit of a Flash Gordon feel to it with the lovely sweep of the fins on that rocket. The flickering flare feels retro as well.
  • MichaelJames
    MichaelJames Posts: 2,034 Enthusiast
    When I was trying this I had grade layers up it blocked the lighting..  The model went flat because of the lighting... so why is that?  I had to futz with a lot of stuff to realize that
  • Triem23
    Triem23 Posts: 20,507 Ambassador
    Were the lights above the grade? Remember, 2D layers in Hitfilm "flatten" 3D layers below.
  • MichaelJames
    MichaelJames Posts: 2,034 Enthusiast
    Even when the grade was turned off?
  • Triem23
    Triem23 Posts: 20,507 Ambassador
    edited December 2013
    Yeah. Ugh, I can't think exactly where it's been stated before, but Axel and Simon have noted that a 2D layer "separates"  and "flattens" the 3D space. 3D elements separated by a 2D layer are in separate instances of 3D space. I think the design logic for this was to provide for layer-based composites rather than location-based compositing.
    It's also a bit similar to how 3D models are in a separate 3D space from 3D planes.
    Duplicate your lights and move the duplicates below the grade layer--it's a pain at times, but it works. I've had a couple comps where I had two or three copies of the same light setup going.
    *Edit* further info:
    In this thread:
    http://community.hitfilm.com/index.php?/topic/4282-tutorial-for-a-circling-light/?hl=layer#entry34708
    Simon Jones says (boy, was it tempting to just say "Simon Says." *Dodges Simon's inevetable eye-roll and smack upside the head for the joke I'm sure he's sick of.):
    "- Are there are 2D layers in-between the light and the logo layers on the timeline? If a 2D layer is between 3D layers, it'll split those 3D layers into separate render passes, meaning they can't go around each other (this is deliberate and sometimes very useful, but can catch you out sometimes)."
    So, yeah, I think you'll need to do what I said above--duplicate the lights and move a copy below the grade. Or just put lights below the grade if you don't need them above. Grades are 2D layers.