Attaching effect shaders

Post » Wed Jun 20, 2012 3:23 pm

Does anyone know the logic behind what can type of objects can have an effect shader applied? I am doing some testing and some activators I have created seemingly cannot have a shader applied and before I do a ton more testing I was wondering if anyone knew the logic. For example, can it only be actors? Does it have something to do with the mesh like needing to have a skeleton? etc

Thanks!
User avatar
Monika Fiolek
 
Posts: 3472
Joined: Tue Jun 20, 2006 6:57 pm

Post » Wed Jun 20, 2012 9:50 pm

It has to have 3D data for the most part. You can actually attach shaders to any objectreference and it's a kind of trick to get the objectreference of forms that actually aren't actually objects. It just won't render properly if there's no 3D data associated with it. If you turn on papyrus logging you will see a warning that the shader wasn't applied because the object contains no 3D data. Now, the next question you have I can't answer. What 3D data is it referring to? I have no idea.

If you can't get what you want with effect shaders, you might be able to achieve it with visualeffects.

FYI: To get the objectreference of something you just place an instance of it at itself or some actor. PlaceAtMe returns an objectreference even for things like Weapons and Activators which don't inherit from ObjectReference.

objectreference item = Player.PlacetAtMe(SomeActivatorObject)

-MM
User avatar
Code Affinity
 
Posts: 3325
Joined: Wed Jun 13, 2007 11:11 am

Post » Thu Jun 21, 2012 2:00 am

Ok, if 3d data is needed then I will just stop right there since I have no patience for Nifscope. I'll try to create my effects a different way then. Thanks!
User avatar
Quick Draw III
 
Posts: 3372
Joined: Sat Oct 20, 2007 6:27 am


Return to V - Skyrim