Forum: Poser - OFFICIAL


Subject: Pose2Lux

LaurieA opened this issue on Feb 13, 2011 · 1102 posts


Snarlygribbly posted Tue, 05 April 2011 at 2:46 PM

Quote -  if lightType in ('sun', 'distant', 'spot'):
  wm = light.WorldMatrix()
  pto = (0, 0, -1)
  pto = dotp(pto, mcol(wm, 0)), dotp(pto, mcol(wm, 1)), dotp(pto, mcol(wm, 2))
  if lightType == 'distant':
   point_from = mul3(pto, [-1, -1, -1])
   lux.point._from = xfm(point_from)
   lux.point.to = [0,0,0]
  elif lightType == 'sun':
   lux.vector.sundir = xfm(mul3(pto, [-1, -1, -1]))
  else:
   pto = add3(pto, wm[3])
   lux.point._from = xfm(point_from)
   lux.point.to = xfm(pto)

 

The problem right from the beginning for me was that there were two versions of Luxpose, and while they retained many similarities there were also many mutual incompatibilities. I chose to use ADP's version of Luxpose as the base from which I would work primarily because none of the files had copyright notices on them, whereas some in your distribution did. At the time I made that decision I didn't realise how many bugs were to be found in the version I'd chosen!

The code you've quoted only produces the correct result if the scene geometry has been written out using your modified version of pydough, whereas I was using ODF's original code as made available under the MIT licence towards the end of the project (assuming it has indeed ended?).

Free stuff @ https://poser.cobrablade.net/