Incorrect radius & tuberadius calculations?
by Gary Haussmann · in Artist Corner · 01/06/2005 (8:48 am) · 3 replies
I was having a problem with my blender-exported players not generating shadows. With some debugging, I found that my TSShape's had a radius value of 0. D'oh!
Looking at the exporter script I found this around line 1593:
I'm pretty sure it should be something like this...
This appears to fix my shadowing problem. I imagine it might also fix the detail-level problem other guys are seeing....
Edit: that's in the Dts_Blender.py file.
Looking at the exporter script I found this around line 1593:
# Radius... self.tubeRadius = (self.Shape.bounds.max - self.Shape.center).length() # Tube Radius... self.tubeRadius = (self.Shape.bounds.max - self.Shape.center).length()
I'm pretty sure it should be something like this...
# Radius... self.Shape.radius = (self.Shape.bounds.max - self.Shape.center).length() # Tube Radius... self.Shape.tubeRadius = (self.Shape.bounds.max - self.Shape.center).length()
This appears to fix my shadowing problem. I imagine it might also fix the detail-level problem other guys are seeing....
Edit: that's in the Dts_Blender.py file.
#2
01/27/2005 (6:54 am)
The two lines should be something like :# Tube Radius.
dist = self.Shape.bounds.max - self.Shape.center
self.tubeRadius = Vector2(dist[0], dist[1]).length()
# Radius...
self.radius = (self.Shape.bounds.max - self.Shape.center).length()
#3
01/27/2005 (8:24 am)
James, you are the man.
Associate James Urquhart
Thanks for noticing that odd typo. I'll look into is ASAP.