HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Omnilight Problem...

05-27-2004, 02:26 AM#1
Shiv
I'm trying to add an OmniLight to Units\Creeps\Watcher\Watcher.mdx that I want to show up only during the attack sequence. Originally I thought it would be simple enough to implement, so I copy and pasted the omnilight code from the custom marine model with a light. After reassigning it's ObjectID and giving it a 0, 0, 0 Pivot Point I tried it out.

The timing works on the light, but weird stuff happens.... (see attatchment)

So, after that, I tried changing the position of the OmniLight in the MDL file to the way it is in the marine model and removing the visiblity section. Same thing happens. Next I tried doing that, reassigning the ObjectID to be in sequence with it's new position, and then bumping up all the following Pivot Points. Still no luck. Tried changing the OmniLight to the one in TorchOmniLight.mdx. Yet again, it fails to help. So... what am I doing wrong? Are there any special things you have to do to properly implement an OmniLight?
05-27-2004, 10:32 PM#2
Ari
I believe lights NEED to be placed after bones but before helpers. I seem to recall having similar weird issues when I tried arbitrarily placing lights in the mdl. I'm away from my home comp right now, so I can't confirm, but try moving the light (and its pivot point) to a position after all bones but before the helpers. If that doesn't work, try moving to immediately after the helpers. To be sure, you might want to try opening a model that uses lights, and see where the lights are.

PS - needless to say, if you insert in an object ID, don't forget that all object ID's AND ALL "PARENT" REFERENCES to anything following what you inserted need to be raised by 1:

objectID20 //bone1
...
objectID21 //bone 2
...
objectID22 //bone 3
parent 21 //bone 2
...
objectID23// bone 4
parent 20 //bone 1
...

if you add in a light as 21, you have to raise by 1 any references to bone 2, bone 3, and bone 4 but NOT bone 1 (don't raise by 1 the "parent 20" in other words)
05-27-2004, 11:04 PM#3
Oinkerwinkle
Not to be redundant, but here's the ordered list of components if you have any other order-related problems.

Code:
   [MDLX]--\				   [HELP]--|--Helper
   [VERS]--|--Version			           |
   [MODL]--|--Model			   [ATCH]--|--Attachment
   [SEQS]--|--Sequences			[KATV]__/  |  \__Visibility
   [GLBS]--|--GlobalSequences		           |
   [MTLS]--|--Material			   [PIVT]--|--PivotPoints
[LAYS]--|  |  |--Layer			   [PREM]--|--ParticleEmitter
[KMTA]--|  |  |--Alpha			[KGTR]--|  |  |--Translation
[KMTF]__/  |  \__TextureID		[KGRT]--|  |  |--Rotation
           |				[KGSC]--|  |  |--Scaling
   [TEXS]--|--Textures			[KPEV]__/  |  \__Visibility
   [TXAN]--|--TextureAnims		           |
[KTAT]--|  |  |--Translation		   [PRE2]--|--ParticleEmitter2
[KTAR]--|  |  |--Rotation		[KGTR]--|  |  |--Translation
[KTAS]__/  |  \__Scaling		[KGRT]--|  |  |--Rotation
           |				[KGSC]--|  |  |--Scaling
   [GEOS]--|--Geoset			[KP2S]--|  |  |--Speed
[VRTX]--|  |  |--Vertices		[KP2L]--|  |  |--Latitudes
[NRMS]--|  |  |--Normals		[KP2E]--|  |  |--EmissionRate
[PTYP]--|  |  |--...			[KP2V]--|  |  |--Visibility
[PCNT]--|  |  |--...			[KP2N]--|  |  |--Length
[PVTX]--|  |  |--Faces			[KP2W]__/  |  \__Width
[GNDX]--|  |  |--VertexGroup		           |
[MTGC]--|  |  |--Groups			   [RIBB]--|--RibbonEmitter
[MATS]--|  |  |--Matrices		[KGTR]--|  |  |--Translation
[UVAS]--|  |  |--...			[KGRT]--|  |  |--Rotation
[UVBS]__/  |  \__TVertices		[KGSC]--|  |  |--Scaling
           |				[KRVS]--|  |  |--Speed
   [GEOA]--|--GeosetAnim		[KRHA]--|  |  |--HeightAbove
[KGAO]--|  |  |--Alpha			[KRHB]__/  |  \__HeightBelow
[KGAC]__/  |  \__Color			           |
           |				   [CAMS]--|--Cameras
   [BONE]--|--Bone			[KCTR]--|  |  |--Translation
   [LITE]--|--Light			[KCRL]--|  |  |--Rotation
[KLAI]--|  |  |--Intensity		[KTTR]__/  |  \__Translation
[KLAV]--|  |  |--Visibility		           |
[KLAC]--|  |  |--Color			   [EVTS]--|--EventObject
[KLBC]--|  |  |--AmbientColor		[KEVT]__/  |  \__...
[KLBI]__/  |  \__Intensity		           |
           |>>>				   [CLID]-----CollisionShape
05-28-2004, 12:33 AM#4
Ari
wow. At least I'm vindicated, though :)

Knowing that emitters and emitter2s are technically "different" in terms of order would have been *great* to know a few months back, though ^_^
05-28-2004, 05:59 AM#5
Shiv
That helped a lot, you guys are awesome. Positioning was one of my problems, forgetting to bump up parents of objects was the other. Much deserved rep. points coming your way.