bge.texture Replaced Material Updating Issue #40914

Closed
opened 2014-07-02 03:09:53 +02:00 by solarlune · 6 comments

System Information
Windows 7 64-bit, AMD Radeon HD 7700

Blender Version
Broken: 2.71 6/30/14

Short description of error

Okay, this is an obscure one, and is dealing with the bge.texture module's replacement of textures on materials.

The first time you load the blend file and run the engine, the replacing object isn't onscreen and the material never updates. Every other time you press play, it will.

In the standalone player, it's basically always "the first time", so unless the replacing object is onscreen when the game begins, the material will never update.

Note that you can force the texture to update if you do something with the texture's source image every frame - for some reason, that seems to "kickstart" the process. In the example, if you un-comment the "print(id(obj['RenderToTexture'].source.image))" line and then run the standalone player it will update correctly, whether in the standalone player or the embedded player. It's almost like the engine forgets the object's supposed to be render-to-texture enabled.

Exact steps for others to reproduce the error

Press P to see the closest falling cube not update its texture on the first play. It will work correctly on the subsequent plays. Use the standalone player to always see the closest falling cube never update its texture.

VidTexNotOnscreenBug.blend

**System Information** Windows 7 64-bit, AMD Radeon HD 7700 **Blender Version** Broken: 2.71 6/30/14 **Short description of error** Okay, this is an obscure one, and is dealing with the bge.texture module's replacement of textures on materials. The first time you load the blend file and run the engine, the replacing object isn't onscreen and the material never updates. Every other time you press play, it will. In the standalone player, it's basically always "the first time", so unless the replacing object is onscreen when the game begins, the material will never update. Note that you can force the texture to update if you do something with the texture's source image every frame - for some reason, that seems to "kickstart" the process. In the example, if you un-comment the "print(id(obj['RenderToTexture'].source.image))" line and then run the standalone player it will update correctly, whether in the standalone player or the embedded player. It's almost like the engine forgets the object's supposed to be render-to-texture enabled. **Exact steps for others to reproduce the error** Press P to see the closest falling cube not update its texture on the first play. It will work correctly on the subsequent plays. Use the standalone player to always see the closest falling cube never update its texture. [VidTexNotOnscreenBug.blend](https://archive.blender.org/developer/F96263/VidTexNotOnscreenBug.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @solarlune

Added subscriber: @solarlune
Member

Added subscriber: @JorgeBernalMartinez

Added subscriber: @JorgeBernalMartinez
Member

I can not confirm the bug. For me, the cube is rendered over the other cube from first try (both embedded and player)

I can not confirm the bug. For me, the cube is rendered over the other cube from first try (both embedded and player)

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Porteries Tristan self-assigned this 2015-05-16 11:33:56 +02:00

@solarlune: you don't have any material on the object Cube.001, it will render as black in the blenderplayer, or your texture font is also black on the object Cube so we see nothing, but if you create a material on Cube.001 all works.

@solarlune: you don't have any material on the object Cube.001, it will render as black in the blenderplayer, or your texture font is also black on the object Cube so we see nothing, but if you create a material on Cube.001 all works.
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#40914
No description provided.