Localisation using a Distance Shader

Started by schmeerlap, December 29, 2007, 08:21:56 AM

Previous topic - Next topic

schmeerlap

This is prompted by advice I gave to Chroner recently in the Support section.
It seems the only co-ordinates from which to centre localisation in a Distance Shader are from Cameras. If I created a Camera at a given X-Z co-ordinate, and used that as a reference point for the centre of localisation, I think I would have to be viewing from that Camera for it to work. My question really is: would it be possible to have a localisation for the Distance Shader centred on a specified reference point on the terrain, rather than from a camera from which you have to be viewing.
I hope I realise I don't exist before I apparently die.

Alfamike

Yep, that's possible.

You can render from one camera and have another camera as origin for a distance shader, or for the image map shader.

Just create a cam where you want it and plug it into the distance shader.

Good luck.


AM.

schmeerlap

Thanks Alfa, that's good to know. It might be a good idea for the Planetside team to use the positioning (via X, Z co-ordinates) function of a Camera, and with it create a simpler terrain reference point function (something like a flag in Mojoworld). Having this simple Reference Point function one (that's a Royal one) can use that as the focal point of a Distance, Distribution, or other shader. Then we won't have to leave cameras strewn all over our terrain for people to trip over. I've got this horrible feeling that someone's gonna tell me this function already exists in one way or another.
I hope I realise I don't exist before I apparently die.

MooseDog

they're half-way there.  you can add a null to your scene atm.  you should be able to use it in the manner you described.

moodflow

Ive been using an additional camera as a point location and cueing the distance shader from that.  I think the distance shader should cue off ANY object though - not just a camera... but for now, it works either way.
http://www.moodflow.com
mood-inspiring images and music

bigben

It's also fairly straightforward to make a similar mask using functions. based on the distance from a specified XYZ input. If/when it becomes possible to link values between nodes this may be more practical in some situations than creating a separate camera for each distance shader.