|
Steely Dane
|
 |
« on: November 21, 2009, 12:49:59 AM » |
|
Is there a way to script the visibility of an object so that it can gradually appear or disappear, rather than the either on, or off switch? Or would it be better to use a ball around the object with a scripted variable transparency, but no collision physics (so stuff can pass through it)? The idea is to achieve a cloaking or decloaking effect like Star Trek, or even perhaps Predator (although that would require another low poly duplicate model slightly bigger than its parent object rather than a ball, assuming that either is possible).
Any thoughts?
|
|
|
|
|
Logged
|
|
|
|
|
ross.rockafellow
|
 |
« Reply #1 on: November 23, 2009, 10:17:37 AM » |
|
I use ObjectMax(Min)DepthFade X (in meters) to transition between LODs for buildings and foliage and such. Like this:
LoadObject h3_export.obj ObjectMaxDepth 100 ObjectMaxDepthFade 10
LoadObject h3_lod1_export.obj ObjectMinDepth 100 ObjectMinDepthFade 10
If the second object was invisible that could be something close to what your looking for. There is probably a better way to do it, I'm still a beginner with the scripting stuff.
|
|
|
|
|
Logged
|
|
|
|
|
Steely Dane
|
 |
« Reply #2 on: November 24, 2009, 05:38:06 AM » |
|
That's an interesting approach. The reason I suggested the "ball method', etc., is at allows for a shimmering effect to be added to it's surface, like the Star Trek de-cloak thing. Maybe utilising the water shader.....
|
|
|
|
|
Logged
|
|
|
|
|
pixel_legolas
|
 |
« Reply #3 on: November 25, 2009, 04:58:07 AM » |
|
you can "animate textures" by script with moving UV also but water shader could be a nice effect too
|
|
|
|
|
Logged
|
|
|
|
|
gekido
Guest
|
 |
« Reply #4 on: January 06, 2010, 03:33:53 PM » |
|
you can modify the transparency of surfaces from script fairly easily - but doing a 'shimmer' effect would be a little more complicated...
object.GetMesh("MeshName").GetSurface("SurfaceName").SetVisibility( float value);
the 'value' is from 0 to 1 and could be set to cycle / pulse etc - I'll see if I can get ross to whip up a script to do something like this.
|
|
|
|
|
Logged
|
|
|
|
|