Depth based shader ?

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Depth based shader ? // Archive: Tech Forum

1  |  

Post by Emmanuel // Jan 8, 2007, 6:20am

Emmanuel
Total Posts: 439
pic
I am in trouble.

I have to make a technical animation of an industrial process involving a moving mechanism inside a device. I am sorry I can't show pictures of it because it is an order under secret agreement. I will try to explain my problem as best as I can though.


The camera is revolving aroud that mechanism to show how it works from every angle of view : it looks at the center of the scene, and moves along a 360° path around it.


But the mecanism fits into a machine and we want to show the inner surface of it too ! The goal is to show the contact areas between the machine and the mobile parts.


The solution is to render with a plain solid shader the mecanism and section of the machine behind it, and with a transparent or semi-transparent shader the portion of the machine between the camera and the mecanism.


That's easy to design for a still rendering.

But... HOW CAN I ANIMATE IT :confused: :confused: :confused:


I have made some try outs using the PSD export format and the Depth channel but it doesn't seems to make the trick.

I wonder if trueSpace7's D3D shaders are capable of playing with the transparency value according to the distance from the camera.


Any ideas, someone ?

Post by Norm // Jan 8, 2007, 7:09am

Norm
Total Posts: 862
pic
If I remember correctly, some folks were using panoramic camera and quicktime mov format to do just that. Not sure I remember exactly how, but I remember a nice car spinning around and the hood would go transparent so we could see under it as you spun this mov around.


Anyone else remember this?

Post by Bobbins // Jan 8, 2007, 7:15am

Bobbins
Total Posts: 506
I remember a blue car you could spin around and see inside. It used a transparency shader where the amount of transparency was based on the distance from the camera. Close to the camera, things were transparent. The further away you went, the more solid it became. I'm pretty sure it was a ShaderLab shader, perhaps a ShaderMagic one. Does this jog any more memories because it sounds exactly what Emmanuel needs?

Post by Emmanuel // Jan 8, 2007, 7:35am

Emmanuel
Total Posts: 439
pic
Yes, it sounds like the same case.

After some investigation, I found it could be Tom's TG Distance Transparency(& 2) Ramp (http://www.tmgcgart.com/ShaderLab/html/tg_pack_3.htm) shader for ShaderLab.


Thanks everyone ! :)

Post by TomG // Jan 8, 2007, 7:50am

TomG
Total Posts: 3397
That shader should indeed do the trick. You should be able to control the distance from the camera at which point the object is "maximum transparent" and the point at which the object is "maximum opaque" as well as controlling just how transparent max transparent is, and how opaque max opaque is.


There's a regular version without a ramp, but the ramp would actually be more controllable as you aren't just limited to a linear gradient between max transparent and max opaque, so hopefully you'll have all the control you need there Emmanuel.


I hope all goes well! While sharing renders may not be possible, let us know how the project works out :)


Thanks!

Tom

Post by Chester Desmond // Jan 8, 2007, 8:05am

Chester Desmond
Total Posts: 323
I just did a quick test (apparently I was working while all these other guys just type ;) ) with the Depth Transparency from Shadermagic .. worked pretty good and these are just default settings. The only thing is that it doesn't seem to work with one object behind the other...ie if the mech was painted with the same shader it wouldn't render it that way, only the box. but I didn't play around much with settings. Tom's shader may not have this issue.




ps any chance of getting .avi as an allowable attachment??
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn