Add Active Camera geometry node #105761
Labels
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
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#105761
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since geometry nodes is always processed in the context of a scene (at least it is now), there is typically a single camera object that's currently used for rendering. It can be useful to extract information from it, and the first step is just being able to access its transform.
https://blender.community/c/rightclickselect/VQ2W/
Add a node that outputs the active camera object. Users can then use the object info node to retrieve data about the object's transform. The task includes investigating and adding dependencies between the two objects so that geometry nodes reevaluates when the active camera is moved. That is done in
process_nodes_for_depsgraph
.Still, how to handle cases when there are several cameras and they switch?
I would like to pick up this issue! Just a heads up though, I have college exams from tomorrow till friday, ie, from 15th to 17th March.
Will it be okay if I can submit a PR by the 20th?
@Piyush-Aniruddha-Udhao Whenever you want, it's not urgent.
Doubt 1: Does it imply that we have to make changes in
process_nodes_for_depsgraph
, or use this function in our node implementation?Doubt 2: What two objects, is it the camera and the node object?
You need at least basic knowledge of the dependency graph, this task has become more difficult
But to simplify, take a look at
node_needs_own_transform_relation
and add analog for new nodeOkay, I will research dependency graph properly.
Understood! Thank you :>
Hey @mod_moder, do you know any closed issue that had to create a new geometry node? I'm trying to find one, so that I can see how new nodes are built.
@Piyush-Aniruddha-Udhao An example of the simplest node: #104602
thanks a lot!
@mod_moder could you please explain what
NODE_STORAGE_FUNCS()
does? I see that it is used beforenode_declare()
by nodes whose structs were declared inDNA_node_types.h
. Is it required to call it for the active camera node? Could you explain the difference between the nodes that use it and the nodes that don't?Define the definition of the data structure to use for bnode.storage, you don't need this if you don't want to have any properties for the node. For me, it's better to use custom1 if that's enough
I'll keep an eye on this too.
Hi everyone
This design was implemented as a plugin node by StrikeDigital, it could become a "camera info" node with a few more useful informations. If interested by an implementation please poke me, looks like a good node to learn blender source code
https://devtalk.blender.org/t/extra-nodes-for-geometrynodes/20942
Wasted opportunity to have a Scene Info node
active camera is part of blender scene description
Is it possible also have vector conversions from world coords to camera and back?
Same conversion that is possible in material shaders "Vector convert" node
@IPv6 It is possible, however to convert into a camera will require more than two vectors (pos, dir), it can look clumsy for the know and a "camera type" will not have much of any use alone in the context of Geometry Node. I'm thinking maybe a "Edit active camera" node is more useful, which then allows you to plug in those arguments to affect the view of the final render.
I'm not sure if we can allow changing of FOV since it's hooked to the output dimension, this might be provided as a read only value.
I see. Just for the context - for my usecases vector-based conversions are more useful than affecting camera itself. Currently there is no way to alter mesh geometry relative to "screen" - but there is a lot of effects that would benefit from it. To name a few
Some of this can be made via material, some via constraints, but all this add additional complications. Making this via GN would ease some indie devs pains
@ChengduLittleA @IPv6 Global-Local transformation isn't related with this task.
No it doesn't need to have that. Here we could consider the value being always global.