Jump to content

Photo

Transparent Activators.


  • Please log in to reply
23 replies to this topic

#11

    NifSkope Otaku

  • Account closed
  • PipPipPipPip
  • 1,972 posts

I have made an invisible activator with an editor marker (easier to spot and move in GECK), should I share it?

Also, any texture would work (like a 4x4 in DXT1), it doesn't need to be transparent (DXT5), just bring the Alpha of the NiMaterialProperty to 0.



#12
EPDGaffney

EPDGaffney

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 1,872 posts

I would love that, yeah.  Thanks.  I already hate working with this thing, so I'm curious about how you have something visible in the editor.

 

Edit:  I'm considering requesting that you upload it to the Nexus as a modder's resource.  Is it so simple to make that it wouldn't be worth it?  Maybe a short tutorial with the file for people that don't understand?  Once I have your file, I can do it if you don't feel like it.


Edited by EPDGaffney, 05 May 2018 - 03:50 PM.


#13

    NifSkope Otaku

  • Account closed
  • PipPipPipPip
  • 1,972 posts

Unfortunately I'm not at my place and won't be before tomorrow, so a little patience is required :)

I'll leave a note on how to add a marker to a nif.



#14
EPDGaffney

EPDGaffney

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 1,872 posts

Sounds good to me.  Thanks.



#15

    NifSkope Otaku

  • Account closed
  • PipPipPipPip
  • 1,972 posts

Here you are.
 http://www.mediafire...leActivator.nif
Place and resize to your liking.
The texture used is 64x64 (found in textures/shared).
The mesh is made invisible by nullifying the Alpha of the NiMaterialProperty
 
To add an Editor Marker to a nif it must have the following structure:
A NiNiode named "EditorMarker" containing a NiTriStrips named "EditorMarker:0"
Nomenclature has to be respected.
The Shader of the  NiTriStrips must be a BSShaderNoLightingProperty with SF_VertexAlpha ticked.
The Color of the marker is changed by altering the Vertex Colors in the NiTriStripData.
Bit 5 (Editor Marker Present) has to be ticked in the BSXFlags.
 
That's about it. Let me know how it goes.

 

I might consider to upload it as a Modder's resource along with other little things supposed to facilitate Modder's life. :)

Thanks for suggesting.



#16
dubiousintent

dubiousintent

    Resident poster

  • Premium Member
  • 6,500 posts

Updated 'Tip: Transparent Activators' with that information as well.  Useful.

 

-Dubious-



#17
EPDGaffney

EPDGaffney

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 1,872 posts

Absolutely absolutely absolutely fecking brilliant.  I haven't tested activating it yet but it's highly professional looking in the editor.

 

However, I would love to improve on this further if possible.  These are the three things I would ideally want:

1.  First and foremost, I want to be able to resize it in the editor like a trigger or collision box.  Have you any idea how to achieve this?

2.  I want to fill in the faces on the editor marker's mesh (did this one already).

3.  I want the editor marker to have about half opacity.  The vertex colours' alpha did not help me here.

 

I've tried copying all the string data from the collision box NIF but it didn't seem to do it for No. 1.

 

Thanks a million.  Though I'm trying to refine this a bit, this is really useful as is and is something I've wished for on numerous occasions.



#18

    NifSkope Otaku

  • Account closed
  • PipPipPipPip
  • 1,972 posts

Nothing that haven't been done before, just my own version, but thank you. :) I hope it works for you.

 

1. I don't think that's a possible feature for an ordinary nif, and if it is I have no idea how, sorry. But why aren't you using a collision box as an activator? It has all the feature you want.

2. I guess you raised the Alpha in NiMaterialProperty.

3. Same principle, go to the NiMaterialProperty of the EditorMarker NiTriStrips and bring the Alpha down to 0.5

 

I'm glad I could be useful, for once.



#19
Mktavish

Mktavish

    Faithful poster

  • Premium Member
  • 1,704 posts

 

1. I don't think that's a possible feature for an ordinary nif, and if it is I have no idea how, sorry. But why aren't you using a collision box as an activator? It has all the feature you want.

 

 

Cuz activators are a lot easier to work with.  And ya just change their texture ;)



#20
EPDGaffney

EPDGaffney

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 1,872 posts

1.  You're right, to a degree at least.  I believe the NIF does need to have a lot of this stuff already built in with flags and string data and such, but testing some stuff with the collision box mesh proves that the engine needs to be told to take advantage of these NIF features before it will look for them.  Chiefly, if you don't use one of the editor buttons on the top toolbar to drop in one of these resizable boxes (collision box, trigger box, acoustic space, and so on), it won't have the Primitive tab in the Reference window.  Additionally, it doesn't have a model if you select its base object in the Object Window.  Meaning the engine does use that NIF but not the way we conventionally would.  Also, setting it as the model for my activator gives the exclamation mark error mesh.  I think I'll set this aside for now.

2.  Oh?  I didn't think there were any editor marker polygons there, so I grabbed the inner corner vertices in the vertex data and put them all at 0, <unchanged>, 23, effectively making a face on either side.

3.  This worked flawlessly, thank you.  I really wanted the outer edges to remain opaque but have a transparent rectangle face for the back and front, but I assume I'd need a second mesh for that?

 

Actually, I copied in your original mesh and love the result:

https://prnt.sc/jemoym

 

My internet is doing horribly this week, but when it's not so poor, I'll look into making resizable primitives for the editor, if we can even do that ourselves.  For now, this is great.  Thanks again, Pix.  And you're always helpful, so I don't know what that last line is about.






Page loaded in: 0.767 seconds