BGE texture module: Camera texture will always fail when the scene is restarted. #36779

Closed
opened 2013-09-20 05:22:10 +02:00 by Adam Friesen · 10 comments

Category: Python

%%%The setup; Win7, an ATI HD 7xxxx GPU, 16 gigs of RAM, and an i7.

To reproduce; open the .blend file, press P and notice that the camera texture simulating a reflection works properly, press R to restart the scene though and the camera texture fails to reinitialize and instead show the base texture that it was supposed to overwrite.

Bug since; always, the video texture module, as far as I know, has always been unable to handle scene restarts. It gets even worse though, in some scenes, Blender will actually crash if you restart a scene using video textures. The videoTexture module as a result is practically useless, trying to work around it by replacing the scene restart with setting the scene to the same one does not work either, implying that you really can't use it in a game because it will fail when the scene changes. (only useful for pretty graphics demos to fly around in at the moment).

If a dev. here can look at this and fix this issue, then that would be great.

Thanks.%%%

**Category**: Python %%%The setup; Win7, an ATI HD 7xxxx GPU, 16 gigs of RAM, and an i7. To reproduce; open the .blend file, press P and notice that the camera texture simulating a reflection works properly, press R to restart the scene though and the camera texture fails to reinitialize and instead show the base texture that it was supposed to overwrite. Bug since; always, the video texture module, as far as I know, has always been unable to handle scene restarts. It gets even worse though, in some scenes, Blender will actually crash if you restart a scene using video textures. The videoTexture module as a result is practically useless, trying to work around it by replacing the scene restart with setting the scene to the same one does not work either, implying that you really can't use it in a game because it will fail when the scene changes. (only useful for pretty graphics demos to fly around in at the moment). If a dev. here can look at this and fix this issue, then that would be great. Thanks.%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Member

Added subscriber: @JorgeBernalMartinez

Added subscriber: @JorgeBernalMartinez
Member

Hi Ace,

the problem is that the reflection and refraction variables are not freed when the scene end.
I have uploaded a blend showing how bypass this issue until the bug is fixed

Hi Ace, the problem is that the reflection and refraction variables are not freed when the scene end. I have uploaded a blend showing how bypass this issue until the bug is fixed
Member

backtrace added

backtrace added
Member

Added subscriber: @BenoitBolsee

Added subscriber: @BenoitBolsee
Member

@BenoitBolsee, Could you take a look to this report? Is it really a bug or the bypass I uploaded is the right way to restart the scene?.

@BenoitBolsee, Could you take a look to this report? Is it really a bug or the bypass I uploaded is the right way to restart the scene?.
Member

Hi,

after investing a little bit more we have seen that it is the right procedure, we mean:

bge.logic module must not be freed at SCENE restart because it is useful to store variables after scene restart (maybe you want access to variables from other Scene), and also to store data at all moment during runtime.
bge.logic must only be freed in the case we use restart GAME with actuator or python API.

Therefore, you can use the method provided in the blend attached or you could check that the Texture into bge.logic is valid or not:

bge.logic.reflection.invalid

I will close this bug when I add a explanation in bge.logic documentation.

Thanks for your time.

Hi, after investing a little bit more we have seen that it is the right procedure, we mean: bge.logic module must not be freed at SCENE restart because it is useful to store variables after scene restart (maybe you want access to variables from other Scene), and also to store data at all moment during runtime. bge.logic must only be freed in the case we use restart GAME with actuator or python API. Therefore, you can use the method provided in the blend attached or you could check that the Texture into bge.logic is valid or not: ``` bge.logic.reflection.invalid ``` I will close this bug when I add a explanation in bge.logic documentation. Thanks for your time.
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Aaron Carlisle self-assigned this 2019-06-29 02:20:22 +02:00
Member

This task is being closed because the BGE has been removed in Blender 2.8.

This task is being closed because the BGE has been removed in Blender 2.8.
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#36779
No description provided.