Author Topic: distance shader & active camera  (Read 760 times)

2022-11-29, 11:28:46

Konichowaa

  • Active Users
  • **
  • Posts: 94
    • View Profile
can you use the distance shader with the active camera as the 'from object' ?

I have a really large scale sc
Koen Van haesendonck
3D-lab - www.3d-lab.be

2022-11-29, 12:15:32
Reply #1

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3864
  • Bengamin
    • View Profile
    • Cormats
Hi there, may I ask what exactly you're trying to do? I think it should be possible but would need more info. ;)
Bengamin Jerrems l chaos-corona.com
3D Support Specialist - Corona l contact us
Corona Uploader l Upload
Portfolio l Click me!

2022-11-29, 12:48:32
Reply #2

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5462
    • View Profile
Sure is, I used to use this to do "slicer/cutaway" effects which made surfaces transparent as the camera moved closer. (now, I'd use the Slicer ;) )
Tom Grimes | chaos-corona.com
Product Manager | contact us

2022-11-29, 13:51:09
Reply #3

Konichowaa

  • Active Users
  • **
  • Posts: 94
    • View Profile
hi Tom and Bengamin,

sorry some of my message hasn't posted well...

I'm working on a large scale project (a house with a few hectares of field/vineyard around it) and I'm trying to do the grass fields with scatters.
There is actually no need to scatter them too far away because my final image will be only 4000 pixels wide and the scatters themselves wouild not be visible.
Therefore I want to see if I can use the near/far clippin in the scatter object to limit the clones, but the soil is actually brown, so when I clip the scatter, in the distance my surface is still brown whereas it should be greenish.

Thus, I would like to limit the scatter p.e. at 10.000cm, and change the soil from brown to grass shader with a distance shader around that same distance (matching the green colour of the scattered elements).

In my project I  have about 50 cameras throughout the terrain, in a stgae object. I can use a specific camera as the distance shader object, but not the keyframed (active camera) in the stage object.
Koen Van haesendonck
3D-lab - www.3d-lab.be

2022-11-29, 14:52:38
Reply #4

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3864
  • Bengamin
    • View Profile
    • Cormats
I'm wondering if the LOD object and camera clipping would be useful here? You could have multiple variations in detail of the scattered object and then use the settings to determine what level of detail is visible close range to the camera etc.
Bengamin Jerrems l chaos-corona.com
3D Support Specialist - Corona l contact us
Corona Uploader l Upload
Portfolio l Click me!

2022-11-29, 23:45:03
Reply #5

BigAl3D

  • Active Users
  • **
  • Posts: 879
    • View Profile
If neither of those ideas work for you, I would suggest not trying to do everything in one shot with only one tool. In other words, you can easily solve some of your issues manually. If that distant area of land should have either low-poly foliage or none, just cut the ground object there and apply a texture of your foliage. Would look fine at a distance and render super fast. You could render a still of the foliage in the distance and use that as the texture.

I assume you are also taking advantage of the Scatter Camera Clipping feature. This will at least remove all the clones on either side of the view. Just use the Extend View feature to ensure you don't get gaps or funky shadows. In fact, you can use a spline to eliminate clones in those far off area. Super easy.