0
$\begingroup$

This question already has an answer here:

I am using the examples already given here, i.e. Convert depth/z value to RGBA

The problem I am facing here is to increase the depth. If one sees clearly a blue pattern starts from a close distance of the camera. I need to push it further. Please enter image description here

I have tried changing the values of the nodes but it is not working.

$\endgroup$

marked as duplicate by Duarte Farrajota Ramos Jun 14 at 10:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Is it important to you to map to the full 32 bit resolution? I don't think your reference answer is actually doing that.. the A is not independent, it could be calculated from the R,G and B, and so is redundant? $\endgroup$ – Robin Betts Jun 12 at 10:08
  • $\begingroup$ @RobinBetts: I am very new to Blender, if you can please elaborate your suggestion more? I didn't understand how to map to the full 32bit resolution, and what exactly to map? $\endgroup$ – Muttahir Mumtaz Jun 12 at 12:23
  • $\begingroup$ Please describe in detail what you actualy want to achive. $\endgroup$ – J.Doe Jun 12 at 14:41
  • $\begingroup$ @J.Doe: I need to show the depth of field in a way that an object nearer to the camera should be seen as red and furthest from the camera should be violet. But in the middle, there should be a transition of colour. E.g. as the object starts moving away from the camera it should start to turn from red to orange, then to yellow, then to green, then to blue, then indigo and at the furthest point, it turns to violet. At the moment the object suddenly turn violet(blue in my case) just as soon as it moves a little back from the camera. $\endgroup$ – Muttahir Mumtaz Jun 12 at 14:52
  • $\begingroup$ @J.Doe: If you see in the first GIF, in the link I have attached, just a little distance away from the camera monkey face turns blue. I want to increase this distance. $\endgroup$ – Muttahir Mumtaz Jun 12 at 14:59
2
$\begingroup$

Your setup is fine. You take depth Values (a number of some value per pixel representable as an grey scale image). And dependent on this number you chose a color from the HSL spectrum. So you just need to scale your depth value right to controle for which depth wich color should apere.

enter image description here

$\endgroup$
  • $\begingroup$ Thank you so much the help :) $\endgroup$ – Muttahir Mumtaz Jun 12 at 17:29
  • $\begingroup$ Just one question. If need to the same on the material rather than on the view. Then? $\endgroup$ – Muttahir Mumtaz Jun 12 at 17:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.