Aller au contenu

Photo

Environment mapping on held items (weapons)


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

#1
MerricksDad

MerricksDad
  • Members
  • 1 623 messages

I am trying to change the environment map on a hand-held item, but I can't get the value to change. It just uses the default for the baseitem line.

 

I've tried TXI, and have previously read that changing the env map in the TXI on items will not do anything at all.

 

How do I change the environment map on a single model, or individual mesh in a model?

 

It seems like there was a MDL file line that could do this, but I can't find it searching through the omnibus. I think my problem is simply that I don't know what words I am searching for.

 

Anybody know this one?

 

If cube mapping would work on items, could somebody explain to me how I would make that work on them?

 

I may try texture replacement then changing the env map on that specific texture. Probably wont work either.



#2
MerricksDad

MerricksDad
  • Members
  • 1 623 messages

I just tried using an emitter to place my shiny effect external from my item and it also does not work. In fact, it has no shine at all, even with env mapping turned on. It also has the side effect of leaving model artifacts where they should not be when unequipped or when having the object's appearance index changed.

 

It also jiggles slightly when I move the carrier around, as if trying to keep up with the inherit property, and not being able to do it on an immediate basis.



#3
Zwerkules

Zwerkules
  • Members
  • 1 324 messages

I may be wrong, but I think the env-map for creatures and weapons is taken from the tileset they are in. That way the 'reflections' in a desert look different from those in a frozen waste.


  • MerricksDad aime ceci

#4
MerricksDad

MerricksDad
  • Members
  • 1 623 messages

I may have to go about this another way. Must brainstorm



#5
_six

_six
  • Members
  • 919 messages

I may be wrong, but I think the env-map for creatures and weapons is taken from the tileset they are in. That way the 'reflections' in a desert look different from those in a frozen waste.

 

Only if they're given the envmap 'default' in the appearance.2da or baseitems.2da respectively. Specifying any other texture name there overrides that behaviour and forces a particular envmap.

 

That applies to any .2da with an envmap field.



#6
MerricksDad

MerricksDad
  • Members
  • 1 623 messages

So from what I can see, there is no way to modify the env map on items at all. What I can do is:

  • Modify the envmap in a tileset, which will affect everything in it not specifying a variant
  • Modify the creature appearance envmap, which will affect anything held by the creature (??)
  • Modify a placeable envmap, which I cannot equip like I am doing anyway
  • Apply envmaps to the creature holding the object using stuff OTR and Virusman were playing with 2012. But does that affect the held items?

If that last one is workable, then I can probably do that, as long as my creature model does not have anything on that will be changed by the env map applied.

 

The only problems there is that 1) I have to then make an onEquip script for my star ruby orbs so that if they get equipped they change the carrying creature's environment map (and onUnequip to undo it) and 2) if my player equips it I either have to NOT do that, or alternately do that and suffer having all my shiny bits on my player character be replaced with star gem shine.

 

Looks like this is a no go all around.

 

I may instead equip the gem with a single emitter so the inner star always faces the camera. The only thing I see wrong with that is that it will not be on the outside of the gem, like you would see with star gems, it will be under the outermost model skin, which will dull the shine.

 

The only other option would be to emit a model instead, and I already know that has some serious issues.

 

Frankly, not currently worth the effort.



#7
_six

_six
  • Members
  • 919 messages

Make a new item type in baseitems.2da - then you can specify an envmap for that item type.



#8
MerricksDad

MerricksDad
  • Members
  • 1 623 messages

What column would that be?



#9
_six

_six
  • Members
  • 919 messages

What column would that be?

 

Part1EnvMap Part2EnvMap Part3EnvMap

 

 

Owait... that's a boolean option? Well bugger me sideways. Apologies for the misdirection I guess :s Weird thing is, I do know for a fact they don't use the envmap of the creature wielding the item. So I guess it must always just assume default. That's disappointing.


Modifié par _six, 15 juin 2014 - 07:27 .

  • MerricksDad aime ceci

#10
MerricksDad

MerricksDad
  • Members
  • 1 623 messages

ok, so those point to actual indices in something? Because I thought that was just a type-global transparencyHint flag. 0 = transparent, 1 = envmap



#11
MerricksDad

MerricksDad
  • Members
  • 1 623 messages

Finally found something else in NWN I have no power over! Took two years but hey!



#12
_six

_six
  • Members
  • 919 messages

ok, so those point to actual indices in something? Because I thought that was just a type-global transparencyHint flag. 0 = transparent, 1 = envmap

 

That's not what transparencyHint does, but yeah it looks like it is just a bool :(



#13
MerricksDad

MerricksDad
  • Members
  • 1 623 messages

Oh well, at least it is figured out. Moving on ... unless somebody knows something we don't.