ocupe / projectors Goto Github PK
View Code? Open in Web Editor NEWA Blender add-on for simple projector creation and modification.
License: GNU General Public License v3.0
A Blender add-on for simple projector creation and modification.
License: GNU General Public License v3.0
Hello, as we were saying, I am not sure if I am doing this wrong.
My Blender version is 2.91.0.
I do the following steps to get a result. But I cannot follow your tutorial in the previous git Issues.
Create projector object:
Orient projector manually:
Go into Shading, upload an image:
Maybe I am doing something wrong:
This seems to fix:
This is a really useful add-on! I am trying to project different images onto a scene in blender and had a few doubts:
Is the H x W hardcoded with the aspect ratio? e.g. 1000x1000 with square? What happens if my image being projected is 400x400 - would it be stretched to 1000 before projecting?
Throw ratio is decided based on the width and distance to the plane where we project. But what happens if we want to project onto a 3D surface with varying depths?
Hey ! TY for the work, it looks great.
Unfortunaly I got this error when i want to create a projector :
Python : Traceback (most recent call last):
File "C:\Users\Utilisateur\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Projectors-main\projector.py", line 555, in execute
projector = create_projector(context)
File "C:\Users\Utilisateur\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Projectors-main\projector.py", line 505, in create_projector
add_projector_node_tree_to_spot(spot)
File "C:\Users\Utilisateur\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Projectors-main\projector.py", line 245, in add_projector_node_tree_to_spot
loc = root_tree.nodes['Emission'].location
KeyError: 'bpy_prop_collection[key]: key "Emission" not found'
Ty for your help
Hi, I just tried to install on Blender V 3.6.2 - module will load, but upon activation I get the error ...
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\scripts\modules\addon_utils.py", line 333, in enable
mod = import(module_name)
ModuleNotFoundError: No module named 'Projectors-0'
Hi!
The addon doesn't work in Blender 3. The problem is related to the fix of the spotlight in Blender 3. This is a bug: Spot light no longer projecting an image texture in Blender 3
Hi! Nice addon, thank you.
Could you, please, think of functions regarding a mist volume.
I don't care the projection itself on a plane, but the "volume" domain materializing the rays.
When I put a mesh in the beam, I would like to having it stopping all the rays, also I cannot hide that object in the rendering, which is what I'm after
Thanks in advance.
As reported here: #41
Hi!
I appreciate your code. But I am having some difficulties on make it work. How do I project a custom image on a basic Blender plane?
Could you provide a quick first-steps tutorial?
Thanks
Love this add-on. It is a great tool and thank you for creating it. I know it must be really tricky but is there a way to calculate and display the distance of the projector from a selected surface directly on the light path ??? Would be really helpful.
Thanks for your time
Anemovatis
Hello! I have a question:
Where can I download it? Because I don't see a download button and I need help with the download. Thank you!
Hi, my projector setup throws erros after saving and reloading.
Atomic Data Manager throws "Missing File Detection" for all "_proj.tex.xxxxx" files.
Not sure what is wrong - it says it can't find the textures for "Color Grid", but it's still showing the projected image.
Any hints or is this a bug?
projection-test-V01.zip
This might be a difficult to explain and complicated addition to make, but would make blender and your addon very powerful in competition with software like Mapping Matters. Essentially, what it is is being able to input one image like an unwrapped UV map (or perhaps the same image input into all projector objects) and have one or more projectors project the texture onto the object. of course the inverse would be amazing too, to be able to take an object with an image texture, select the projectors you want to create a mapping for, and click a bake button which will bake the object textures into projector images that the beamers project, and set the object's material to a matte white.
I don't expect this to be added but its something to consider
If I change a projector's throw ratio, the shift offsets are not recalculated, although their calculation depends on the throw ratio.
In the test scene I have three projectors with a throw ratio of 1 and a lens shift of 50% (after applying #26).
If I now change the throw ratio to 0.8, I get the following result.
If I then just type in the same numbers again for the vertical shift (which will trigger update_lens_shift
) I see the expected result.
: Python: Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Projectors-master\projector.py", line 523, in execute
projector = create_projector(context)
File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Projectors-master\projector.py", line 477, in create_projector
add_projector_node_tree_to_spot(spot)
File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Projectors-master\projector.py", line 231, in add_projector_node_tree_to_spot
loc = root_tree.nodes['emission'].location
KeyError: 'bpy_prop_collection[key]: key "emission" not found
This is pretty silly, but there's an edge case where when there are 2 or more projectors present there's some possible occlusion generated.
The issue can be resolve by changing beam shape to 179 degrees instead of 180:
After changing the spot size:
Not a major issue, but thought you might want a heads up on this one.
Add the ability to copy/duplicate an existing projector, instead of having to create a new projector, and copy the parameters
Hi Jonas!
I was pleased with your Projector Add-on for Blender :) And I have a suggestion for changes that, in my opinion, are necessary for this add-on 1) throw ratio, for some ultra-short-focus beamers it parameter starts from 0.18. 2) Some beamers have offset ,
(Figure 1), this addon has a similar vertical shift parameter, but it is not enough. It will be very cool if it can be done. 3) is it possible to adapt this add-on for luxcorerender, because there you can adjust the reflection of the projection from the mirrors.
Hello, I want to change projection image in python script.
projector = bpy.data.objects['Projector']
projector.proj_settings.projected_texture = 'custom_texture'
bpy.ops.projector.image(filepath="image_path")
but projection image does not change.
Do you know the solution?
Great project!
I was wondering if it would be possible to add lens distortion to the model? Or is it already in it?
I would also not mind coding a bit, maybe you could point to where I should make that addition?
Thanks!
I know it's too soon but there it is :)
Hello!
After I upload an image to project in custom_textures, I have to reupdate the throw ratio. I have the feeling that the uploaded image is updating some fields, which then override the fields as defined by the throw ratio.
Try this: with throw ratio 1, render a scene. Then try to reproject that render onto the scene. For me it is often scaled in the wrong way, the throw ratio is still 1. After I reset the throw ratio to 1, the reprojection is correct.
Are you able to reproduce this behavior?
having issues with the Mix001 Node connection it seem. Have you seen the addon break in blender 3.4?
amazing work, would love to give some suggestions
The amount of light per watt is very different for a LED/laser projector versus a traditional UHP projector. Specifying the light output as ANSI lumens would give much more predictable/true to life results.
how to display image sequence
Hello! First of all, fantastic add-on. Pretty much exactly what I was looking for.
I am a video programmer for theatre / tv & film. I am experimenting with different ways to preview video content. Your add-on is a great way to double-check the throw of the projector. However, a lot of times the projector covers more than the surface we want to cover. This would normally be solved in the video software we are using, It would be amazing though for better / a different option for visualization if there was a way to do it with your add-on.
A potential way I could see this working is for there to be an include or exclude objects option. So if you are spilling onto a back wall, you could exclude that object, or only include the projector surfaces?
Thank you for your time!
Thank you for this wonderful addon.
I've noticed that if I update proj_settings values such as throw, lens shift etc via drivers (e.g. linking one projector's settings to another) or via python (e.g. obj.proj_settings.throw_ratio = 0.5) the settings in the UI do update, but the viewport or render does not. It still shows the projection with the old settings. I need to just click enter on a value to force a viewport or render update. See attached blend for example (blender 3.6.4)
projector_test.zip
Here is a screenshot. The Blue projector has its settings linked to the red projector via drivers. They show they same values in the UI and in python.
Add an easier way of attaching a physical body to a projector.
This could be used to make a 3D model of the projector, and then add the projection characteristics as a child.
If the projector is parented to an object. duplicating the object would also duplicate the projector.
Python: Traceback (most recent call last):
File "/home/bzk/.config/blender/3.6/scripts/addons/Projectors-master/projector.py", line 523, in execute
projector = create_projector(context)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bzk/.config/blender/3.6/scripts/addons/Projectors-master/projector.py", line 467, in create_projector
bpy.ops.object.light_add(type='SPOT', location=(0, 0, 0))
File "/usr/share/blender/3.6/scripts/modules/bpy/ops.py", line 113, in __call__
ret = _op_call(self.idname_py(), None, kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Operator bpy.ops.object.light_add.poll() failed, context is incorrect
The title explains the issue well enough, but this is actually a common issue that still hasn't been figured out, and the node setups that are currently available don't provide any dynamic lighting.
When there are multiple projectors on stage, the rotation of one affects the other projections, casting strange shadows.
The problem happens systematically, there are some relative rotations and relative positions between projectors that are more problematic than others, however even in the simple attached scene the strange shadows make the addon difficult to use in situations with multiple projectors. Hope it can be fixed.
Thank's for your great job!
Really nice addon!
Hi, I have found this tool very useful, especially for simulation.
I do video mapping,and this tool is great because of the ability to project on object’s faces. once finished And rendered my animation , I will like to test it without having a physical object.
Here, your plugin.
The problem is that to play animation I have to use external mapping sw, which can send video over Ethernet using ndi.
But this plugin can play video/photo files only.
Can you add this feature? Keep in mind that ndi should be an open source protocol.
Thanks, Regards KGabe
Hi @Ocupe, can you explain the definition of lens shift used in your implementation? To make the projector vertically aligned with the bottom of the image, I have to enter 28.125% which I determined empirically. Please see the attached screenshot.
It would be great to add a description or a link to some document in the Wiki or README so that it's easier to see how the numbers should be interpreted. I found several different definitions of the lens shift in percent, but neither matches what I currently observe within Blender.
https://helpguide.sony.net/vpl/xw5000/v1/en/contents/TP1000558303.html
https://norxe.com/wp-content/uploads/product-support-norxe-lens-shift-explained.pdf
Or maybe this is also a problem related to Blender version 3.6? I saw that there is already a case distinction for different versions when the camera settings are adjusted based on the lens shift.
https://github.com/Ocupe/Projectors/blob/master/projector.py#L307C21-L312
Thank you!
Could it have a soft border?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.