Blender 2.5 v0.62dev plugin for SLG v1.6beta2

Discussions related to GPU Acceleration in LuxRender

Moderators: jromang, tomb, Dade, coordinators

Blender 2.5 v0.62dev plugin for SLG v1.6beta2

Postby Chiaroscuro » Wed Jun 16, 2010 9:50 pm

Hi, took a little time to try out some experiments with the Blender plugin (instead of another silly animation?).
Give it a try if you want (attached). It should work with the latest SLG v1.6beta1 and a recent version of Blender.
I’ve broken down the plugin into different parts internally to enable me to divorce it from the Blender render engine and experiment with some real-time features. Testing a few different things out, and their performance, still learning Blender.

Here’s what’s new:

==> Ability to render stills and animations without using Blender’s render engine. (optional)

It’s a multi-threaded export and render operator that’s non-blocking. That means you can still use Blender during the export.
Look at the bottom right of the main viewport for the three additional icons (hover over them in Blender for a description):
SLGBPoperators.jpg
SLGBPoperators.jpg (3.01 KiB) Viewed 5484 times

They are: Export and Render Still / Export and Render Animation / SLG Live (see below)
Or, you can access / add the operators where you want (e.g. press space in the viewport), they start with SLG.
I’ve been tryng to avoid the Blender render engine due to its remaining bugs (under Windows at least). Most of my SLG animations were rendered without using the Blender render engine. The Blender render engine is not really needed for SLG, so this also saves time and overhead (for example, animations don’t need to load each frame saved by SLG back into Blender only to save them back out again.
For animations, make sure you set the Blender output filepath (using # as placeholders for frame numbers). If Blender’s render output path is valid, the plugin will use it, along with the specified file format. You can’t use any of the video file formats, only some image formats are supported.

Note that you can still optionally render using the Blender render engine, just like before.

==> SLG Live! mode

This exploits SLG’s telnet interface to update parameters in real-time while SLG is actively rendering a scene.
The only supported telnet fields at this time are:
film.tonemap.type (Linear or Reinhard ’02)
film.tonemap.linear.scale
film.tonemap.reinhard02.burn
film.tonemap.reinhard02.prescale
film.tonemap.reinhard02.postscale
scene.camera.lookat (camera position)
scene.camera.up
scene.camera.fieldofview
scene.camera.focaldistance
scene.camera.lensradius
scene.camera.motionblur.enable
scene.camera.motionblur.lookat
scene.camera.motionblur.up
scene.materials.*.*
Update: now you can also modify materials and emitters in live mode, see page 4
Update you can now also modify world environment and sun&sky

To use: activate the Telnet option in the Blender SLG options panel then export and render with SLG.
Once SLG is running, activate the SLG Live mode operator, it should establish a connection.
Now you can move the camera around the scene, even use fly mode (Numpad 0 to select cam, Shift+f) and the camera in SLG will be updated automatically.
You can also change the tonemap options in the SLG options panel.
You can change the tonemap parameter values, and even slide them in real-time.
This probably works best if you have two monitors (I don’t), but it’s still pretty neat.

I’ve fixed a few minor things at the same time, (like participating media params).

Still very little error / exception checking; check the console output for errors / clues.
Has some bugs, I could have broke things that used to work. No worries, they'll get fixed… eventually. I’m just inconsistent with time right now, so updates won’t be regular.

Keep in mind that Blender is still alpha (read the red box warning :P ), I’m using new features and callbacks and all of this is a little bit of a hack job, and I've only tested it on my Windows PC. But we’re having fun! :)

EDIT: Updated 2010-06-26 (see this post), note: requires most recent revision of SLGv1.6b2
EDIT: updated 2010-07-04 (see this post)
EDIT: Updated 2010-07-09, support for mesh instances (Alt+d, duplicate linked as well as Dupligroups)
EDIT: Updated 2010-07-18 (minor update)
EDIT: Updated 2010-07-24 for SLG v1.6beta2 release (alloy material); get SLG executable from thread at top of GPU Forum
Attachments
engine_render_smallluxgpu.zip
Blender 2.5 (! rev. >= 30577 !) v0.62 plugin for SLG v1.6beta2 (2010-07-24)
(14.36 KiB) Downloaded 576 times
Last edited by Chiaroscuro on Wed Jul 28, 2010 8:02 am, edited 31 times in total.
Chiaroscuro
Developer
 
Posts: 856
Joined: Thu Jan 21, 2010 10:46 am

Re: Blender 2.5 v0.61test plugin for SLG v1.6beta1

Postby tomb » Thu Jun 17, 2010 1:29 am

:shock: :lol: very nice work! Looking forward to playing with this when I get home :)
User avatar
tomb
Developer
 
Posts: 2477
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: Blender 2.5 v0.61test plugin for SLG v1.6beta1

Postby Dade » Thu Jun 17, 2010 2:08 am

Chiaroscuro wrote:==> SLG Live! mode


OMG, moving the camera and seeing the SLG output updated in real-time is so cooooool. Awesome :!:

P.S. on the air next week: real time material editing ... people will just kill for this stuff.
User avatar
Dade
Developer
 
Posts: 6362
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Blender 2.5 v0.61test plugin for SLG v1.6beta1

Postby agremlin » Thu Jun 17, 2010 2:26 am

Hello.
May be you know more events except 'POST_PIXEL'. For example: if you need update texture or color on object. POST_PIXEL worked in this case?
I searched other event, but not find.(blender 2.5)
agremlin
 
Posts: 23
Joined: Fri Feb 12, 2010 4:53 am
Location: Kaliningrad

Re: Blender 2.5 v0.61test plugin for SLG v1.6beta1

Postby pxl666 » Thu Jun 17, 2010 3:12 am

Dade wrote:on the air next week: real time material editing

mmm i think that this is the most awaited feature of realtime scene adjustments + lighting change
User avatar
pxl666
 
Posts: 396
Joined: Sat Jun 28, 2008 7:09 am

Re: Blender 2.5 v0.61test plugin for SLG v1.6beta1

Postby peterr » Thu Jun 17, 2010 3:39 am

It's working , wow. :ugeek:
win xp 64 ,one of newest blenders, core2,gf4850.
thats great..
Blender 2.53 , c2q6600+p45 Blood iron+ ati 4850 + 4gb ddr2 +winxp64
peterr
 
Posts: 83
Joined: Sat Jun 12, 2010 12:12 pm

Re: Blender 2.5 v0.61test plugin for SLG v1.6beta1

Postby pxl666 » Thu Jun 17, 2010 5:00 am

nice feeling indeed - one comment ->> when u move the camera - wouldnt it be better if slg refreshes camera position AFTER u move it in viewport? it allows for smoother moves within blender window...

damn...i cant imagine how will it feel when u'll able to adjust ALL settings from within blender...matts , lights etc...better than octane for many of us!

great work!
User avatar
pxl666
 
Posts: 396
Joined: Sat Jun 28, 2008 7:09 am

Re: Blender 2.5 v0.61test plugin for SLG v1.6beta1

Postby Chiaroscuro » Thu Jun 17, 2010 6:46 am

agremlin wrote:May be you know more events except 'POST_PIXEL'. For example: if you need update texture or color on object.
They're not related, but that callback is triggered by any viewport update. Notice that I'm also hooked in via SLG options panel redraws (since they're not in the viewport, not part of the callback) and I'm also hooked in to some user input and timer events via the operator itself if needed. For materials I'll simply hook in on mat panel redraws as well.

pxl666 wrote:nice feeling indeed - one comment ->> when u move the camera - wouldnt it be better if slg refreshes camera position AFTER u move it in viewport? it allows for smoother moves within blender window...
I was surprised how smooth it was in Blender considering plugin is not optimized, but I guess that depends entirely on if your CPU has any free threads (hyper-threading might be helping as well). But it's a good point. I was actually debating this while coding: is total real-time necessary? Perhaps I should offer a simple operator that does a refresh on demand instead? Using Python I can't really know when a user has "finished" moving the camera (no callbacks from Blender); however, I can base updates on my own timer as well just to reduce the frequency of them (I'm thinking out loud here). Thanks for the feedback though, it's a good point.
pxl666 wrote:damn...i cant imagine how will it feel when u'll able to adjust ALL settings from within blender...matts , lights etc...better than octane for many of us!
Right, we'll most likely make that happen for materials and lights.

Just keep in mind that changing the scene itself, things like object transforms, actual mesh, UV map (and maybe even textures?) via SLG Live will not be possible. For that we'll just need to re-render, like normal.
Last edited by Chiaroscuro on Thu Jun 17, 2010 7:08 am, edited 1 time in total.
Chiaroscuro
Developer
 
Posts: 856
Joined: Thu Jan 21, 2010 10:46 am

Re: Blender 2.5 v0.61test plugin for SLG v1.6beta1

Postby peterr » Thu Jun 17, 2010 7:07 am

Oh i'd add crop/region render to wishlist (it isnt already ?) 8-)
But of course materials and lights got top priority..
thanks
Blender 2.53 , c2q6600+p45 Blood iron+ ati 4850 + 4gb ddr2 +winxp64
peterr
 
Posts: 83
Joined: Sat Jun 12, 2010 12:12 pm

Re: Blender 2.5 v0.61test plugin for SLG v1.6beta1

Postby pxl666 » Thu Jun 17, 2010 7:25 am

Chiaroscuro wrote:I can base updates on my own timer as well just to reduce the frequency of them (I'm thinking out loud here). Thanks for the feedback though, it's a good point.
Just keep in mind that changing the scene itself, things like object transforms, actual mesh, UV map (and maybe even textures?) via SLG Live will not be possible. For that we'll just need to re-render, like normal.


yepp - i think that small play with the frequency of the refresh might be of help for users with weaker machines - or even a "refresh" button
as for the option for slg react for mesh change or object move - i think noone expects "realtime gpu pathtracer within blender window" as this would be considered as such...personally i think of realtime material/lighting (transparency/color/glossiness/sunsky brightness and such) tweak , but - will it be possible to have influence over bump/normal map depth? (in particular) as this seems to be very helpful when working with bumps...
User avatar
pxl666
 
Posts: 396
Joined: Sat Jun 28, 2008 7:09 am

Next

Return to GPU Acceleration

Who is online

Users browsing this forum: No registered users and 3 guests