Projected texture from spotlight doesn't scale with spotsize when changed in-game via python #40362

Closed
opened 2014-05-26 08:42:36 +02:00 by Liam Richardson · 5 comments

System Information
Windows 7 Professional 64-bit, Geforce 560 Ti video card
I'm unable to test it on a separate computer myself, but it was also experienced by a separate user in http://blenderartists.org/forum/showthread.php?337845-Changing-spot-size-of-spotlight-with-Python-doesn-t-adjust-texture-mapping

Blender Version
Broken: 2.70a (from Blender.org)

Short description of error
As the spot size is modified with the KX_LightObject.spotsize variable, the texture size remains constant. Changing the spot size with the slider in the Blender UI outside of the game engine causes the texture size to change as well, and whatever size is set there is the size it uses in-game.

Exact steps for others to reproduce the error
Open the attached .blend
press P while the cursor is over the 3D view

The light on the left is animated with the script (the spot size changes according to a sine wave), the light on the right is animated with curves to show expected behavior (it moves in and out, animating the spot size with curves doesn't appear work in-game, but the approximation is close enough for demonstration).
While the game engine isn't running, note that you can adjust the spot size of the light on the left, and the texture scale will change, and then remain at that size while the game runs.
Additionally, the Size properties in the texture panel don't have any effect in the viewport or in-game.

Spotlight_Texture_Projection.blend

**System Information** Windows 7 Professional 64-bit, Geforce 560 Ti video card I'm unable to test it on a separate computer myself, but it was also experienced by a separate user in http://blenderartists.org/forum/showthread.php?337845-Changing-spot-size-of-spotlight-with-Python-doesn-t-adjust-texture-mapping **Blender Version** Broken: 2.70a (from Blender.org) **Short description of error** As the spot size is modified with the KX_LightObject.spotsize variable, the texture size remains constant. Changing the spot size with the slider in the Blender UI outside of the game engine causes the texture size to change as well, and whatever size is set there is the size it uses in-game. **Exact steps for others to reproduce the error** Open the attached .blend press P while the cursor is over the 3D view The light on the left is animated with the script (the spot size changes according to a sine wave), the light on the right is animated with curves to show expected behavior (it moves in and out, animating the spot size with curves doesn't appear work in-game, but the approximation is close enough for demonstration). While the game engine isn't running, note that you can adjust the spot size of the light on the left, and the texture scale will change, and then remain at that size while the game runs. Additionally, the Size properties in the texture panel don't have any effect in the viewport or in-game. [Spotlight_Texture_Projection.blend](https://archive.blender.org/developer/F91035/Spotlight_Texture_Projection.blend)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @LiamRichardson

Added subscriber: @LiamRichardson

This issue was referenced by 5c5ca1355f

This issue was referenced by 5c5ca1355fd079fa5a4ee6540b1800170f2aaadd

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 5c5ca1355f.

Closed by commit 5c5ca1355f.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#40362
No description provided.