stig-atle / io_scene_pbrt Goto Github PK
View Code? Open in Web Editor NEWExporter for blender that exports the scene into pbrt's ascii file format.
Exporter for blender that exports the scene into pbrt's ascii file format.
Fix so that render panel only shows up when PBRT render engine is selected.
Add support for 'medium' in material \ world.
Export button calls the 'render' call, which opens the render output window,
we should not show that window, but show some progress bar instead.
Hi, thanks for this plugin, its really cool!
Is there support for projector light sources?
Add so that pbrt is started in the background when scene is exported then show result in render output window when the rendering is done.
Some times materials has to be removed fully, then re-apply to make it export again, this happens some times when switching the material from one type to another, for example matte to glass.
Not entirely sure why it happens, needs to be fixed.
Hi Stigatle,
Do you have any idea of how to handle the area light source in Blender?
For example, these light sources are pretty common on Blendswap's model (for example, https://www.blendswap.com/blend/17404 with the screenshot below)
For now, I have a working prototype that converts this type of light source into rectangular area lights. But the problem is that the light source will be visible (even if I use "none" BSDF!).
Do you think that the blender needs to export such type of light? Because I think these type of light that are invisible inside the scene is not compatible with PBRT.
Add all the various settings to the spot \ point light types, with their own GUI for PBRT specific settings. Currently the spotlight's parameters are hard coded (strength etc).
I stumbled upon the solution on how to enable textures in the viewport with the custom nodes while working on the pbrt-v4 support, each custom material node class simply has to have 'show_texture = True' in the class definition (for example just below 'bl_icon = 'INFO'').
You can then show the texture from the inputs in the viewport like this:
Backport this to the current master branch and test it to make sure you do not have to create new instances of materials to make it work, if new material instances are needed - then update all the sample scenes as well.
Fix so that export_texture_from_input(...) returns 'none' if no texture is assigned.
Currently the exporter gives a error if you export meshes with no material defined.
We should catch this and not try to export materials if none is assigned.
That way pbrt will assign a default material.
The function that is going to export the environment map fails if no texture is defined.
This function is currently commented out, need to be enabled and fixed.
Possible fix:
Add a button to the render settings dialog where you specify what texture to use as environment map.
The exporter currently expects a camera to be in the scene for it to export properly.
It should rather export with the 'perpective' view as camera view, and create a 'dummy' camera at that position if there is not camera in the scene.
Now we just export default materail for all unsupported materials assigned.
Convert the blender shaders over to a PBRT shader on export, and use as many settings as possible to make it look similar.
When manually setting the output directory (as opposed to choosing it with the dialog), when you don't append a / then the exporter will create new directories ply and textures whose names start with the name of the base directory, so e.g. if output dir is /Username/pbrt then the plugin will create /Username/pbrtply and /Username/pbrttextures instead of /Username/pbrt/ply.
Currently the shader nodes does not show anything special in the viewport.
It should show the diffuse (Kd) color (or equivalent) or texture map.
Fix so that the .pbrt and exr output file has a proper names.
The texture export in disney material is currently missing.
Add support for it.
Trying to test your exporter. Probably the error is sitting in front of the screen, but whenever I hit "Export scene" blender opens the render dialog. Render engine is PBRT_Renderer and I have entered an output folder path. I'm on macOS 10.13, Blender 2.8 beta. When hovering over "Export scene" Blender actually shows a tooltip saying "Render active scene.":
When I try to export, I have this messsage with the new version.
Traceback (most recent call last):
File "/home/samuel/.config/blender/2.80/scripts/addons/io_scene_pbrt-master/render_panel.py", line 16, in execute
render_exporter.export_pbrt(bpy.data.scenes['Scene'].exportpath, bpy.data.scenes['Scene'], '{0:05d}'.format(frameNumber))
File "/home/samuel/.config/blender/2.80/scripts/addons/io_scene_pbrt-master/render_exporter.py", line 974, in export_pbrt
export_geometry(pbrt_file,scene)
File "/home/samuel/.config/blender/2.80/scripts/addons/io_scene_pbrt-master/render_exporter.py", line 889, in export_geometry
bpy.context.scene.update()
AttributeError: 'Scene' object has no attribute 'update'
location: :-1
The color slot should be overridden if there's a RGB node plugged into a color slot.
Right now it only exports the slot itself, not the one you plug in to override.
Only image texture is being exported if plugged into color slot.
Currently it just exports a single frame.
Add so that it exports all the data it needs between the start and end frame.
When I assign multiple materials to one mesh (to different parts of the mesh), only the first one seem to be affect to the whole mesh. I wonder if it's a problem of the exporter or of PBRT itself and if there is a way to do this.
I have noticed an important difference on the field of view (FOV) on the Blender viewport and the rendered image. I think I know a part of the problem :
For blender, the FOV is the maximum of horizontal angle and vertical angle. But pbrt use the minimum !
So I changed you line 132 in render_exporter.py
from :
fov = bpy.data.cameras[0].angle * 180 / 3.14
to :
fov = bpy.data.cameras[0].angle * 180 / math.pi * bpy.data.scenes['Scene'].render.resolution_y / bpy.data.scenes['Scene'].render.resolution_x
The result is more consistant but not actually the same.
Add support for hair.
Implement all new features in Pbrt-v4 format, so that we support it natively.
When a modifier is used, the mesh is not exported correctly unless the modifier is apply and the mesh turn in edit mode.
I use blender 2.82. The exporter work but if I use the subsurface modifier :
I think there is the same problem with many (all ?) modifier. A very cool solution would to have a checkbox like "apply modifier before export" in order to keep the modifiers in the blend file.
We need to fix the shader nodes, so that they show up again in the shader editor in the pbrt-v4-support branch.
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.