Include demo scene in Blender for easy rendering and benchmarking

should be able to use this, without having to download and install an addon
An addon can do this just fine. It then allows other people to contribute and improve it rather than shoving that workload onto the core developers who could better use their talents on more important development. You could then have different addon scenes focused on specific use cases.

So demo files already exist… and people want a one-click mechanism for retrieving these files (with file sizes ranging between 3MB and 230MB).

This sounds like a great entry-level add-on that just about anyone could write. If you want it, write the code for it. The Coding forums here, the bf-python mailing list, and the #blenderpython IRC channel are available to help you.

You are right, I realized today that an add on would be a perfect starting point. I have never done one, and I can’t do C, but know python and it is doable.
My idea is to keep things together, not host things off site, because links break or files change. The idea is to make sure a certain scene will work with a certain release of Blender and that it is one package, not several things that can break. The idea is to have a standard, just very few scenes that maybe don’t change for years so that people can benchmark them. There might be a way to submit the render times into a database, where you can go look up how fast which GPU or CPU is. But that comes later, I will start simple. Thanks for pointing out these scenes, they will work to start. And later on, I might get some feedback from some users that say “wow, why did you take this ugly thing of a scene? Take mine instead” which will also work fine.

Through the addon I can even let people here test it and give feedback.

hi, in this folder there’s 5 example addons for creating simple scenes:
https://github.com/meta-androcto/blenderpython/tree/master/scripts/addons_extern/AF_add_objects_specials
(the ones that start with scene_ )
feel free to use them as a start point for your addon.

Oh cool, let me do it… I hope so.

The demo files (the first one, labelled 2.74 Demo files) on the page I linked are typically kept up to date with the latest version of Blender (developers will often use those for doing regression tests to make sure everything still works). The BMW scene on that page has been the defacto benchmark scene for a long time now… though the Production benchmark from Cosmos Laundromat is a much more intense test.

These files will work really well. The good thing is also, that they are diverse, an architecture scene, an indoor scene, a car, very good material. I was not even aware this existed. Now doing the addon should not be too hard. I think about a pop up window, that shows 3 scenes, probably the BMW scene (simple), the classroom scene (medium) and the Barcelona house scene (large), with thumbnails/previews what they look like and clicking on it loads the scene. I’m thinking of bundling the scenes in the addon, to not have to fetch them via the internet. Currently, nothing in blender does that and “calling home” without the users consent is always a little dicey. Also, to not make the user wait for the scenes to load or stuff breaking during loading, or one scene being downloaded, but the next one not, plus informing the user that this thing will now download 60 mb from the internet, all these things can be avoided by packaging everything in one zip: The user can see immediately, how large it is when he/she downloads it.

I linked to them in post 5 of this thread – nobody pays attention to me :stuck_out_tongue:

Now I don’t understand what you are referring to. The demo files? We are constantly talking about them, I downloaded them and as I said will want to package them, not link them, the the reasons I have indicated in my last post.

The way to do that would be to just go the addon route and try to get it bundled with Blender, it would be far better at least than bundling a gigabyte of files (zipped) in each download and might pave the way for a hardcoded solution done as an extension of the Asset Browser project.

Well, I did not know before. So what that tells me is that many other users don’t know about the demos, I don’t know how long they have existed, but it might be that when I entered Blender, they did not and then they got created, but I never heard about it.
Right now, the 3 scenes are almost exactly 100 mb, (compressed). The demo scene addon will not work well, if it downloads the scenes separately, and therefore it will never even get close to get included (which will take a long time in any case, as I still have to convince the people in power of it), so showing some success will be the door opener.

How do you know that? You don’t. And you won’t know for sure one way or the other until you try (which, as has been pointed out, would be pretty easy).

Start with the lowest barrier to entry: make an add-on that downloads the demo files separately. Get that add-on in contrib. Move forward from there based on what you learn.

I like the fact that Logic Pro (now-Apple’s definitive music DAW program) has one demo that’s easily accessible from the Help menu, and I still wish that you could get the ones that were available in earlier releases. I think it would be a good idea to have “more of an available starting-point” than a blank cube and a monkey. :yes: (Not that this would be “the default scene.” I don’t mean that …)

An add-on macro could of course do this trivially, and the user would neither know nor care.

Since we do want to continue to keep the core download as delightfully-small as it now is, we could build a separate, optional installer for the various platforms which would install and properly-configure this add-on macro. (Yes, “an installer” is important, and we must remember that the user might have chosen a different place to put Blender. The installer would have to be properly coded, e.g. to check that certain expected directories already exists, and so forth.)

I think that a demo should be part of what we talk about in future documentation, and that we should provide if possible both the blend-files and a finished render-output. We could have a nice contest here.

I don’t think it should be for “benchmarking.” If you want that, it should be provided separately. And I’m not sure how useful it would actually be, because the “performance” of a computationally intensive activity like rendering depends completely on your hardware.

You are right, I don’t know that, it is my opinion and assumption, from experience and other projects I have done. I will do a two pronged approach and create both addons and see which one becomes more popular, the all in one or the one that requires additional download. Bandwidth wise they are exactly the same, in one you download the scenes all at once, the second one just downloads them later (and makes the user wait for that and has a possibility that download fails and then causes the addon to malfunction)
In my opinion, lowest barrier of entry is what the user perceives as

  1. easiest to use
  2. least likely to fail

We will see which one will work better for people.

I have made some progress in creating the addon, I should have a working prototype pretty soon.

Voila! The beta Version of the addon is ready to be tested:

(the addon is 51 mb and includes all three scenes)
Please find the new function in the Scene Tab of the properties panel:


I would welcome any feedback you might have. I’m very new to python in Blender and addon development.
My next step would be to have this in the help menu, so that newbies can find it faster.

though I like the Idea of examples and benchmarks, but I do not think it is a good Idea to put Benchmark and example scenes in Blender, example and benchmarks should be separate download links.

The scenes are now located in the “help”-menu, also fixed the missing return value of the operators and set the category to “System”.

# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

import bpy 

bl_info = {
    "name": "Blender Demo Scenes",
    "author": "Markus Bawidamann",
    "version": (1, 0),
    "blender": (2, 75, 5),
    "location": "Info -> Help",
    "description": "Demo scene loader for easy access and benchmarking. It includes 3 scenes: BMW (simple), Pavillon Barcelone (medium) and Classroom (complex). They can easily loaded with just a push of a button, making this ideal for newbie Blender users that just want give Blender a spin and see what it can do with their new shiny GPU or CPU. This can also be used for benchmarking, as these scenes are standardized and do not change. My original intention is that his functionality will become part of Blender Master and be available for all Blender users via the help menu. This addon is a proof of concept and prototype for this. Credits go to: Classroom scene: Christophe Seux, BMW27 Scene: Mike Pan, Pavillon Barcelone: Hamza Cheggour, Claudio Andres and Ludwig Mies van der Rohe",
    "warning": "",
    "wiki_url": "nourlyet.com",
    "tracker_url": "",
    "category": "System"
}

addon_file_path = bpy.utils.user_resource('SCRIPTS', "addons")+"/Blender Demo Scenes/demo_scenes/"

#
# Operators
#

class LOAD_OT_bmw27_scene(bpy.types.Operator):
    bl_idname = "load.bmw27_scene"
    bl_label = "Load BMW Scene (simple)"
    
    def execute(self, context):
        filename1=addon_file_path+"BMW27.blend"
        bpy.ops.wm.open_mainfile(filepath=filename1)
        return {'FINISHED'}

class LOAD_OT_pavillon_scene(bpy.types.Operator):
    bl_idname = "load.pavillon_scene"
    bl_label = "Load Pavillon Barcelone Scene (medium)"
    
    def execute(self, context):
        filename1=addon_file_path+"pavillon_barcelone_v1.2.blend"        
        bpy.ops.wm.open_mainfile(filepath=filename1)
        return {'FINISHED'}
        
  
class LOAD_OT_classroom(bpy.types.Operator):
    bl_idname = "load.classroom_scene"
    bl_label = "Load Classroom Scene (complex)"
    
    def execute(self, context):
        filename1=addon_file_path+"classroom.blend"
        bpy.ops.wm.open_mainfile(filepath=filename1)
        return {'FINISHED'}

#
# Interface
#
        
def helpDemoScenes(self, context):
    layout = self.layout

    layout.separator()
    layout.menu("info.help_demoscenes")

class helpDemoScenesMenu(bpy.types.Menu):
    bl_label = 'Demo Scenes'
    bl_idname = 'info.help_demoscenes'
    
    def draw(self, context):
        layout = self.layout
    
        layout.operator("load.bmw27_scene")
        layout.operator("load.pavillon_scene")
        layout.operator("load.classroom_scene")
    
#
#   Registration
#
   
def register():
    bpy.utils.register_module(__name__)
    bpy.types.INFO_MT_help.append(helpDemoScenes)
    
    
def unregister():
    bpy.utils.unregister_module(__name__)
    bpy.types.INFO_MT_help.remove(helpDemoScenes)
    
if __name__ == "__main__":
    register()

Hey, thanks so much for providing a working example!

So question: HOW do I get this in contrib? What is the definition of contrib?`Who to contact, what is the next step?