Aller au contenu

Photo

Converting Trigger GIT files to Walkmesh Helpers


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
rjshae

rjshae
  • Members
  • 4 485 messages

I had a thought this morning. What if you could save a NWN2 trigger to a file, import it into a modeling tool like Blender, then have an export script convert it into a flat walkmesh helper? (Or alternatively just have the import Python script do the conversion into the required walkmesh/surface texture/collision meshes.) It seems do-able, if we knew the format of a Trigger's GIT save file.

 

If the trigger is just a region boundary though, it might prove more difficult to map faces to it. Hopefully it gets saved as a mesh. If not though, worse case it could be imported as a set of joined edges that you can fill it in.



#2
rjshae

rjshae
  • Members
  • 4 485 messages

I had a look last night but I couldn't see a way to readily extract the trigger coordinate information from the saved files. Darn it. It's in there somewhere, but I'd need a file layout.



#3
PJ156

PJ156
  • Members
  • 2 982 messages

What would be the benefit? Are you thinking that we could have triggers as a placeable object?

 

PJ



#4
rjshae

rjshae
  • Members
  • 4 485 messages

What would be the benefit? Are you thinking that we could have triggers as a placeable object?

 

What I was thinking of was the ability to outline a bunch of, say, dock pieces with a trigger, then have a scripted means to convert that trigger region into a flat walkmesh helper via an intermediary program, such as Blender.



#5
Tchos

Tchos
  • Members
  • 5 042 messages

Which would bake more easily than a bunch of helpers placed next to each other.  I see how this would be helpful.



#6
kamal_

kamal_
  • Members
  • 5 240 messages
When you save a trigger as a blueprint, it sadly loses it's shape. I found that out to my dismay after drawing a nice cutter around some statue groupings that I had reused throughout an area.

#7
Tchos

Tchos
  • Members
  • 5 042 messages

For a blueprint, yes (UTT), but Bob's talking about the file that handles all of the placed instances of things in an area (GIT).  Also, what about prefabs?  I thought I recalled placed triggers retaining their shapes in prefabs.  Just in case that format is easier to parse.


  • rjshae aime ceci

#8
rjshae

rjshae
  • Members
  • 4 485 messages

For a blueprint, yes (UTT), but Bob's talking about the file that handles all of the placed instances of things in an area (GIT).  Also, what about prefabs?  I thought I recalled placed triggers retaining their shapes in prefabs.  Just in case that format is easier to parse.

 

Let's see, I think I have to add it to a group then export it in order to create a prefab blueprint? I'll give it a test.



#9
rjshae

rjshae
  • Members
  • 4 485 messages

Let's see, I think I have to add it to a group then export it in order to create a prefab blueprint? I'll give it a test.

 

I gave that a try (storing the trigger in a prefab) but I didn't see much information related to the trigger region. What I was expecting was a series of x/y/z coordinates. I did see the trigger blueprint name, but apparently nothing I could use after that. Unfortunately I don't know the .pfb file format, so I couldn't be sure. The trigger wasn't restored on import.

 

I'm thinking I need to do some delta comparisons: start with a vanilla area then bake and save as directory 1; add a large trigger region with a multitude of points and save it as directory 2, then compare the two. Hopefully something will show up. Perhaps it will work better using a tiny interior area so there is less mesh storage?

 

Ed.: Okay it's stored in the .git file. The file is longer and I can see a bunch of what look like floating point values. Hmm...