| TSEngineer 的个人资料Rolling日志列表网络 | 帮助 |
|
|
12月18日 On Signals
In the past sprint I worked on investigating what it would take to use the existing animation tech for signals. I was primarily focused on signal lights, how to deal with blinking lights, etc. If you don’t care about the details, the result is that the existing tech will allow us to implement signal lights using effects.
There were two approaches that I considered, colored texture and effects. Using effects is the preferred approach since that is how lights work in the existing system. Here are some of the issues with each approach.
Colored Texture This is what was done for the test signal in the Big demo last month. The colored texture is on a multi-faceted piece of geometry which is rotated to change the aspect of the signal. This is simple a texture, so it is very static.
Issues · No way to turn off the signal. o One workaround is to create a dark texture for one of the facets of the geometry. o Another way is to implement a visibility event which can be inserted at specified animation time to trigger the visibility of a part. · No easy way to create a blinking light. o The animation must be driven by a sim var and it somehow needs to be controlled by either modeldef.xml or some new file. o The animation needs to be updated every frame in the blinking state instead of just when the state changes or is changing. · If the signal is too far away, the small part reject kicks in and doesn’t draw the signal light. o The instance renderer will fix this problem, so this won’t be an issue later.
Effects This will enable blinking lights without extra work.
Issues · A bug in the code which causes effects to be facing the wrong way. · A bug in the code which causes attached objects of attached objects to be positioned wrong. · No way to turn off an effect once its attached.
I decided to see if we can get effects to work. After lots of poking around, with help from various people, I ended up adding a new visibility tag to the animation event manager which allows parts to be turned on or off at the specified time. Adrian will be fixing the max scripts to support this. Steve H also helped fix a few of bugs to get everything working. There is also a draw order problem in the instance renderer that needs to be fixed.
Using effects to do signal lights looks promising and Steve H2 created a test model that works using it. If artists want to use the colored texture to do it, that’s ok as well, but they won’t be able to get blinking lights.
--Gary 引用通告此日志的引用通告 URL 是: http://tsengineer.spaces.live.com/blog/cns!1278F50C4215BAD1!196.trak 引用此项的网络日志
|
|
|