주소복사 | 조회 수 31593 추천 수 1 댓글 14
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 게시글 수정 내역 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 게시글 수정 내역 댓글로 가기 인쇄
Extra Form
투명도와 심도 때문에 문제가 발생했는데요..

첨부이미지
(첨부가 프로그램에 이상이있는지 안되더라구요..ㅠㅠ 하는수없이 링크로..)


투명한 물체안에 보이는 뒷쪽 배경은 심도의 영향을 적용받지 못하고있습니다...


이와 비슷한 것으로는 알파값을 줬을경우.. 나머지 보이지 않는 부분에 비치는 뒷배경은

피사계 심도의 영향을 받지 못하는데요.. 이문제.... 해결할 방법은 없을까요...?????emoticon

  • profile
    길동 2009.01.06 14:02 채택
    네이버는 깨집니다.~


    뎁스로 빼서 포샵에서 하셔도 됩니다.~
  • ?


    네이버 깨진다고 하셔서 댓글로 첨부해요~~  뎁스로 해도 안되네요 ... ㅠㅠ;;;
  • ?
    존재와당위 2009.01.06 17:19
    알파로 빼준 후 뒤에 나오는 물체는 심도에 영향을 안받더군요
    아무리 해봐도 시네마 자체에선 안되나봐요.

    길동님 말씀처럼 따로 빼서 포토샵으로 하는 수 밖에 없나요?
  • ?


    뎁스파일 이런식으로 나오네요..;;;; 에고고..
  • profile
    길동 2009.01.06 17:50 채택
    아...

    일종의 버그일수도 있는데요..
    해결 방법은 있습니다.

    Xpresso를 이용하시면 됩니다.

    True Depth of Field

    The Depth of Field effect in cinema 4d has been rather puny to say the least up until Version 8, but now we have depth of field that's actually noticeable on an image larger than a postage stamp "Hurrah!" I hear you say. Well, don't get too excited, there are a number of problems with this ne DOF filter "Boo!" but don't despair. I'm here to help you with a rather neat workaround that should with careful work give you the results you dream of.

    Let's begin with a basic scene. Here we have three cubes on a reflective plane.

    Really life couldn't get much simpler than this, so let's see what happens when we use the brand new DOF effect in release 8 of Cinema 4D...

    Well, not bad, on a first cursory glance it seems to be ok, but let's take a closer look, in the next image I've highlighted a few problem areas.

    Ok so what are the problems here?

    1) Notice that as the cubes side passes the focal point on the plain there's a sudden jump from being nice and soft in the foreground, to nasty and hard against the background.

    2) The reflection from this object in the distance isn't blurred, yet the object is, very bizarre effect.

    3) Here the object is in focus, yet it's reflection is blurred.

    So what the hells going on?

    Simply put the DOF effect in C4D is in fact a post effect which uses what's known as the Z-Buffer to determine blurriness. Ok so firstly you might want to know what a Z-Buffer is In 3D space there are three directions, left/right, up/down and forwards/backwards. These are shortened to their mathematical names X,Y and Z. A Z-Buffer is a representation of the distance objects are away from you the viewer. Here's one of our scene:

    All the DOF effect does is take this information and depending on the value at that point in the Z-Buffer it blurs by a set amount. Think of it like an alpha channel for blurring in this case. Everything Mid gray in our image will be left intact, but to either side it will get progressively more blurry, of course if the focal point was nearer then C4D would know to change the range of values that get blurred and those that don't.

    Now here's where our problems come in though, due to the nature of using this method things that are transparent and things that are reflective get blurred only by the value of their surface in the Z-Buffer, for instance if you look a the floor in the Z-buffer image you'll notice that it's a uniform gray gradient all the way up. This means that any color on that surface, even if it's a reflection will get blurred if it's not in the mid-tone section, and any reflection that's in the mid-tone section (our distant cubes reflection) will remain sharply in focus because this is a pixel filter(it takes the value of the pixel and it's neighbors and calculates the result from that), very much like the filters in Photoshop. This isn't true depth of field. However I figured that with a little ingenuity you could create the true effect using motion blur to your advantage, by simply shaking the camera around while keeping it focused on a point you should get true DOF, so how do we do this?

    How to make True Depth of Field in Cinema 4D 8 (this can be done using Blunt Trauma in C4D Version 7.3)

    I used the following objects and hierarchy in my scene to control my camera for this.

    1) First off create a Camera with target object.

    2) Select the camera object in the object list and group it by pressing 'G' on the keyboard. Name this new group "camera holder", make sure that "Camera"'s object co-ordinates are 0,0,0

    3) Duplicate the target tag from "Camera" onto "camera holder"

    4) Make two new nulls and call them "camera pivot" and "blur" group "blur" under "camera pivot"

    5) Make a new sphere object and call this "focus area", make this so that it wont render by clicking the lower red dot till it turns red, and if you want putting a compositing tag on it and deselecting all the options in there. Then switch of X-Ray in the AM for this object, and make sure that it's centered on the "camera holder" object by making it's position 0,0,0.

    6) Group all of this and call it "Focus Blur Camera" for easy reference. Add a User Data field in the Attributes manage for this object and make it a "Real" % with no maximum value, make it's name "Blur Amount". Don't ever move this object, instead always move the "camera holder" object and the "Camera.Target" to track around the scene.

    So what are we going to do here?

    When I said we wanted to move the camera around it's no good for us to move the camera around completely randomly. This is because if you do you'll end up with flickering frames. What we want is a nice controlled set of samples. The easiest way to do this is to rotate the camera around a point, that's why we've grouped the camera under a null. However if we were to simply rotate the "camera holder" null the camera would rotate also which wouldn't be desirable. Now the simplest way to deal with that would be to rotate the camera in the opposite direction, however that would firstly make animating the camera difficult, and secondly would spoil the fun of learning a little Xpresso. So here's what we're going to do. Instead of rotating the camera, or it's null, or putting it under another null and rotating that, we're going to rotate the camera pivot object, have the blur object slightly offset from the camera pivot object to give us our wobble, and we'll take the blur objects position relative to the camera pivot and translate that directly onto our camera objects position relative to the camera holder object. This means that we shouldn't move the camera pivot object or the blur object from the zero axis, nor should we move the camera object directly, but we can move the camera holder object, and the camera target object.

    Now you'll notice on the Camera Pivot object is an xpresso expression, and here it is in all it's glory.

    Yikes! Ok take a moment to scan through this and the remarks I've put down on it. Now this isn't as scary as it looks, and it will help you a lot. The most complex part is the bit in the middle, the RangeMapper node which makes the blur object move in and out so's not to have just a purely circular motion (as that wouldn't give as good blur effect).

    So let's build this up. Firstly of course you're going to need to add a new Xpresso expression to your camera pivot object, do so and in the new window that opens up right click to choose New Node->Xpresso->General->Time. Make sure this node has the following outputs "Real" and "Frames per second", we're going to multiply the time by the frames per second to get the frames in whole numbers because if we were to use "Frames" as an output it would only update the movement at each frame, seeing as we're using Motion blur to achieve our effect it's important that we have a smooth motion even between frames.

    Next add a Math (Right click New Node->Xpresso->Calculate->Math) connect "Real" and "Frames per Second" to the two inputs on the Math node, then click on the left hand blue box on the math node and select "Input" to add a new input. Now you'll notice that it's actually set to add, so with the Math node selected go to the attributes manager and change the function to "Multiply", and in the input field there type in "2*pi", Cinema 4D knows that value of PI and will substitute that for you, we need to use that value as angles within Xpresso tend to be in radians (where a whole rotation is two times that mathematical value PI).

    Add another Math node, make it into a multiply node and set the second input value to 7. Then connect the output of the first math node to the first input on this math node. We're multiplying by seven because it creates a nice range of samples by rotating the camera pivot object seven times while the blur object moves out, this way it wont be blurry on one side, but not on the other( due to a spiral like set of samples. Now drag and drop that camera pivot object from the object list (click and drag the icon) onto the Xpresso workspace. From the inputs select Position->Global Rotation->Global Rotation.B. Then connect this to the output of our second Math node. Now the camera pivot object will rotate 360 degrees each and every frame, regardless of what the frame rate of our document is.

    Next add a RangeMapper node, you'll find this under Calculate and this is one of the most useful nodes you will come accross. What it does is it takes a input range, and converts it to a different range, sort of like the curves in Photoshop (you can even make a curve in it just like in photoshop). Only here you have even more power as you can choose any value and range to be remapped, not just colours, you can even use it like a mini timeline envelope (provided you connect a time value in to it of course) if you have Use Spline selected and you play around with the Spline Curve!

    We're going to use it to map our time in radians from the previous Math node to a position value for our blur object. The way to do this is as follows.

    With the RangeMapper node still selected go to the Attributes Manager and make sure the following options are selected in the RangeMapper. Data Type must be Real, Input Range set to Radians, this will automatically fill in the value of 1 Radian (6.283) into the Upper input value. Output Range will be User defined. So by doing this we've made it so that values coming in between 0 and 1 Radian will come out as values between 0 and 1 (as those are the default user defined output values). Then you should make sure that Module is selected (this takes the result of a divide function, which for us means that because the output of our Math node is always going to be going up way beyond 1 Radian the RangeMapper output will cycle, i.e. 2 Radians will output 1, but 2.1 radians will output 0.1, and 5.8 Radians will output 0.8 for us.

    Now add another Math node, make it a math Multiply, and add another input to it. Connect the output of the RangeMapper node to the first input. This node will be the one that multiplies all the factors that determine how much blur there is and turns that into a value for the position of the blur null object.

    To get the Blur amount value that we created as a User Value on the Focus Blur Camera Null you have to first drag the Focus Blur Camera null onto the the Xpresso workspace (from the object manager list) and then select from the outputs User Value->Blur Amount. It's as simple as that. Because as it currently stands any blur above 10% would be way too much and even at 10% it's a lot we'll divide this value to make it smaller before inputting it into our mixing math multiply node.

    Add another Math node, make it into a divide node, and I suggest putting in a value of 30 into the second input. Connect the output "Blur Amount" from the Focus Blur Camera object to the first input. Then connect the output to the second input of out mixing math node we create a couple of steps back.

    Next we need to calculate the distance the camera is from the target, two reasons. Firstly we don't want the camera moving about as much if the camera is close to the target, otherwise it would never work, second reason is we want to make life easier for ourselves and I've developed many ways of making my life easier, one of those secrets i'll let you into right now. When i need to work on a scene that involves depth of field the camera object has no gizmo to really show exactly what will be in focus and what wont. So what i do is i attach a sphere to the camera and then set the radius equal to the focal point distance. This shows me exactly what will be in focus and what wont, and that's what we're doing here, that's what the "focus area" object we added at the beginning is here for.

    So to work out the distance between these two objects we drag them onto the Xpresso workspace first off, we'll use the camera holder object rather than the Camera object simply because we don't want this value to change as the camera "shakes". For all intents and purposes the camera holder object is now our camera object when animating. Then we drag the Camera.Target object onto the Xpresso workspace. For both objects make their Global Position output visible. Then make a new node, again under calculate, this one is called Distance, and it does exactly that. Connect the outputs of our two objects to the inputs of the distance node, and then connect the output of the distance node to the last free input of out math multiply mixer node.

    Then in order to control the size of our sphere so that it shows us the focus plane, drag the focus area object onto the Xpresso workspace, and from the inputs on it select Basic Properties->Radius. Then connect the output of the distance node to the input of the focus area node. Now you will be able to see what is in focus by seeing what that sphere intersects. Always make sure that the sphere is centered on the camera holder object (it's local/object position should be 0,0,0 in the Co-ordinates manager).

     

    We're nearly there now, the math multiply mixer node is all ready to output, but first we have to convert it's output which is a real into a vector for input into the blur objects x position. We wont change the math nodes type to vector instead we'll use an Adapter node. So make a new Real2Vector node (you'll find this under right click New Node->Xpresso->Adapter->Reals2Vector). Connect the output of our Math multiply node to the X input of the Reals2Vector node.

    Next drag the blur object onto the Xpresso workspace to create a new object node and make the Position.X input visible, then connect the output of the Reals2Vector node to this input. Now the blur object will move in and out from the camera pivot object over the course of a single frame by the amount specified in blur amount multiplied by the distance that the camera is from the target ;).

    To finish this network off we need to connect the global position of the blur object (which is its position in the overall workspace) to the position of the camera object (which is it's position relative to it's parent object camera holder). This is simply done by dragging the camera object onto the Xpresso workspace and then making the Global Position output visible on the blur object node, and making the Position input visible on the Camera node, then connecting the two.

    Congratulations you've just finished the Xpresso part of this. Now to put in the finishing touches before we render.

    For motion blur to work you will have to of course switch it on. You will need to switch on Scene Motion blur in the effects part of the render settings dialog box, set the number of Samples to 25, you want it to be as smooth as possible, also bring up the dither if you want.If you want you can soften the blur a little more by using filters like Softem, or Median. I suggest switching Antialiasing off to speed things up quite a lot, don't worry due to the nature of taking so many samples you should still end up with a nice aliased image.

    Next you should set a value for the amount of blur using the User Value on the Focus Blur Object. Just do this by selecting the focus blur object and under the User Value tab in the Attributes manager change the percentage to whatever you like. I suggest 50% as a good starting point.

    Then position your Camera by moving the camera holder object, and the Camera.Target object into place.

    Once you render you should get a result not unlike this one.

    Notice the true reflections? Lets compare it with the Z-Buffer DOF

    Moving the camera produces a much better (truer) result. Of course this method will work with transparency too which is an added bonus, but it's render times can be quite high as a result of the way it has to render out 25 frames compared to the single frame with Z-Buffer DOF. Also it's smoothness is limited by the number of samples that scene motion blur takes in C4D8, so the smoothest it will get is with scene motion blur at 25 samples with dither.

    And here are the scene files (for C4D 8 only)

    REAL DEPTH OF FIELD C4D (ZIP) FILE

    CAMERA AS A LIBRARY READY OBJECT (ZIP)


  • ?
    P. 2009.01.06 21:35
    3D상의 뎁스는 할리우드에서도 안씁니다.
    이유가 있겠지요.
    합성툴에서 만져주세요.
  • ?
    스카나비 2009.01.07 09:49
    우와.. 길동님 정말 최고.. emoticon  어떻게 이런 자료들을 찾으실수있는건가요.. 감사합니다^^

    음..P님 말씀대로 합성툴로 만져줘야할것같다는 생각도 드네요.. ㅎㅎ 그래도 전 한번 저위에 방법대로

    해보겠습니다. 감사합니다~~^-^)/
  • ?
    SONYSTYLER 2009.01.07 15:20
    헉!  저방법대로요!? emoticon

    스키나비님 대단하십니다.   전 내용 보자마자 기브업!!
  • ?
    존재와당위 2009.01.07 16:20
    저도 기버업합니다. ㅠ.ㅠ
  • ?
    스카나비 2009.01.07 16:20
    한번 해보니 저도 기브업!!!!!ㅠ_ㅠ!!!!!!
  • ?
    terryko 2009.01.08 18:46
    졌다.. 이런 방법이...emoticon
  • profile
    선계용 2009.09.11 19:37
    이런방법이..ㅠㅠ
  • ?
    바보왕 2009.11.24 17:36
    아....어렵다
  • ?
    거시기 2011.01.10 17:54
    ㅋㅋ~

질문과 답변

question and answer

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 일반 Cinema 4D Education 학생용 라이센스 사용방법 2 그래바 2020.09.03 17809
공지 Octane 옥테인 크래시 관련 자주 올라오는 질문들과 해결하는 법을 정리해보았습니다. 13 file 이효원 2020.04.19 48357
공지 [필독] 단톡방 질문 방식 관련 공지사항 4 file 권오훈 2019.06.27 12788
공지 일반 [필독] 질문 게시판 유의사항 ! 권오훈 2019.06.27 4715
26090 모델링 c4dic 를 보다가 피로드 키? 필리오드키? 가뭔지모르겠네요 7 file 배워주자 2010.01.16 4739
26089 프로그램 믹사모(mixamo)를 이용해서 만든 캐릭터 영상이나 이미지도 저작권이 있을까요? 1 주댕 2017.12.31 4686
26088 V-Ray V-ray로 렌더를 하면 픽처뷰어에서 검은색으로만 나옵니다! 1 file shp1138 2019.12.02 4667
26087 Octane 혹시 옥테인 계정 하나로 두대 피씨에서 번갈아가며 쓰시는분 계신가요? 5 file 디노 2020.01.15 4648
26086 Octane octane render를 돌리기에 적당한 사양인지 궁금합니다.. 6 이현 2015.11.22 4613
26085 PNG 파일처럼 배경없이 오브젝트만 렌더링걸고 싶습니다. 2 file 징징이 2010.02.18 4554
26084 모델링 버텍스 정렬과 오브젝트 정렬을 어떻게 해야 하나요..? 2 왚왚 2014.12.25 4511
26083 기타 면이 뒤집는 방법이 궁금합니다.. 4 file 호랑호랑 2014.03.24 4488
26082 일반 mtl 파일을 임포트하는 방법 3 지원주 2019.05.24 4486
26081 Octane 옥테인 렌더 그래픽카드 셋팅 8 쏘리맨 2019.02.13 4347
26080 Character Mirror Rotation & Weight의 문제 6 file 수옥 2007.12.03 4344
26079 모델링 오브젝트 크기 비례에 맞게 조절하는 방법 5 file 여보게저승갈때뭘가지고가지 2016.04.08 4308
26078 텍스쳐 헤어라인(메탈) 표현하기 질문드립니다. 2 file 지오 2010.07.27 4305
26077 프로그램 시네마 완전 삭제 3 찌질이 2014.03.18 4298
26076 모델링 bake 의 뜻이 정확히 뭔가요? 5 박원석 2007.02.16 4267
목록
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 1745 Next
/ 1745
닫기

마이페이지

로그인을 해주세요