Maniphest T32182

Sliding UV Values On Material Slot 2 Not Updating
Closed, Archived

Assigned To
Porteries Tristan (panzergame)
Authored By
solarlune
Jul 25 2012, 10:22 AM
Tags
  • Game Rendering
  • Game Engine
Subscribers
Dalai Felinto (dfelinto)
Mitchell Stokes (moguri)
Porteries Tristan (panzergame)
Raf Colson (raco)
solarlune

Description

Category: Rendering

Hi. So, today I was going to slide around the UV values of a texture I had applied to my mesh, and doing so works normally. However, it seems like the values aren't written back to the vertices for other material slots - using those slots doesn't update the UV values for those vertices.

If you use mesh.getVertex(matid, vertnum) with a material ID other than 0, those vertices won't get their UV values updated more than once, right when the script runs initially. I supplied a test blend file - Press P, and you'll see the front two side textures slide just a little bit right when the BGE starts, but change the matid value in the script to 0, and it will work correctly, sliding the other material's faces constantly.

Event Timeline

solarlune edited a custom field.Jul 25 2012, 10:22 AM
solarlune attached 1 file(s): F18337: MatSlot2UVScrollBugPacked.blend.
Dalai Felinto (dfelinto) added a comment.Jul 25 2012, 7:19 PM

Hi Mitchell, can you take a look at that?

Mitchell Stokes (moguri) added a comment.Jul 26 2012, 8:10 AM

This looks like a potential issue with display lists. If I disable display lists, the scene works. Display lists are useless for this case (they'd get rebuilt every frame), but this should be fixed for more occasional updates. It looks like the lists are getting rebuilt, so I'm not sure why it doesn't work with display lists enabled.

solarlune added a comment.Jul 26 2012, 9:14 AM

I'm not sure if it matters, but as an aside, UV values won't be updated if the vertices are being controlled by an armature. Not sure if that has anything to do with this problem with display lists or not, or if it can be fixed.

Good to hear that this issue deals with display lists and can be bypassed by not using them.

Mitchell Stokes (moguri) added a comment.Jul 26 2012, 11:45 AM

This is starting to sound a lot like this bug: http://projects.blender.org/tracker/?group_id=9&atid=306&func=detail&aid=19876. I'm guessing the two are probably related.

solarlune added a comment.Sep 8 2012, 1:29 AM

As a side note, it would appear that vertex colors changed in-game also aren't updated if the mesh they belong to is being influenced by armatures. Disabling display lists doesn't solve the problem for me - just taking off the Armature modifier works.

Raf Colson (raco) added a subscriber: Raf Colson (raco).Aug 25 2014, 3:42 AM

@solarlune: Could you maybe have a look at this blend file. I had to update yours a bit to make it work in 2.71 (texture lost some info). But it works, I think. Could you make sure I'm not missing anything? And if not, this could be closed then?

Porteries Tristan (panzergame) changed the task status from Unknown Status to Archived.Oct 21 2015, 7:23 PM
Porteries Tristan (panzergame) claimed this task.
Porteries Tristan (panzergame) added a subscriber: Porteries Tristan (panzergame).

@solarlune: You enabled "Invert the order of shown item" in the UI, indeed your first material is "Bricks" and the second "UVSlideThese", is this a bug ???
Anyway i close this task no answer since September 2012 to @Raf Colson (raco).