[Free Addon] The CutAway Shader

I have just released a free addon that is half python based and half OSL shader based, so I am positing in both forums!
I hope this is OK.


After 3 years in the making - I’m excited to announce the alpha release of the CutAway Shader - a free addon for Blender for artists, architects, scientists and engineers.

(YouTube demo video link:http://bit.ly/2gIdMVO )

If you’ve ever wanted to cut away a cross section of a model, perform an architectural reveal or carry out some tricky special effects then this is the tool for you!

It works for still images and for animations.

The CutAway Shader can be used for:

  • Model cut aways.
  • Architectural reveals.
  • Scientific and engineering images.
  • Filming through walls (without damaging or re-dressing the set).
  • Special effects (e.g. turning a winter scene into a summer scene).
  • Wire frame to solid model transitions.
  • … plus much more!

For more information on downloading, and video tutorials checkout the following link:

Cheers

Dylan :slight_smile:



Credits: Models used to demonstrate the CutAway Shader
Apollo Stage 3
Name: Saturn 5 Launch Vehicle
Author: Hlynkac
Link: http://www.blendswap.com/blends/view/41852

Apollo Command and Service Module
Apollo 3D: Command Module and Service Module Block 2
Author: Frederick E. Schulz
Link: http://www.blendswap.com/blends/view/46564

LEM Module
Apollo Lunar Module
Michael Carbajal.
https://nasa3d.arc.nasa.gov/detail/lunarlandernofoil-c

House
Name: Clean and Simply Mini Architectural
Author: alverhothasi.
Link: http://www.blendswap.com/blends/view/76012.

1 Like

Wow !! Great addon iReboot, thanks for sharing!!

Verrry Good Job, iReboot!
Congratulations!..and a GREAT Thanks :cool:

Is it very difficult to write a pynode, please? Where can I find a documentation, please?

Wow, at last!!! Really is great to see it out and about :wink:

Wow ! Not only this addon is super great, but I’ve never seen a script so well documented ! Congrats and thanks iReboot !

1 Like

Hi Spirou4D - Thanks!

Like most API’s - it can take a little while to get the hang of what’s going on (I’m still getting the hang of it!)
Here’s a video link that may help: https://vimeo.com/90065481

Also, there are examples already built into Blender:
From a Text Editor window: Templates->Python->Custom Nodes

A good way to get going is to take a working example – and then change a few things (like text strings to start with) and move on from there.

Thanks guys - and thanks David for the encouragement over the last few years!

Thanks to you, Dylan, for your very good job and today your answer!
Tks for vid…I go speed to look it!

>>>A good way to get going is to take a working example – and then change a few things (like text strings to start with) and move on from there.
Yes I make the same with BGL in this time and it’s a large catalog…Wooow.

I will see your code to understand how run this kind of node! Congratulations and at soon…
Byebye
Spirou4D

iReboot

I studied the pyNodes today. Great idea to create an add-on with it!
I have a project for PBR multi-shader like this, what do you think of that?

I have a little remark: you can make a loop to register/unregister your class, not?
An array of class names and a loop to un/register() --> Speeder, I mean.
But why not :
bpy.utils.register_module(name)

Do OSL shaders work in viewport without Cycles running? Like in material mode?

Hi Spirou4D:

>>I will see your code to understand how run this kind of node!
This shader has quite a lot of code – so it is a big one to start looking at!

For this shader, the actual pyNode code starts at line 1023: class CutAwaySetupNode(Node):
Two important methods of all pyNodes are:
- init(self, context): – this is on line 1208
and - draw_buttons(self, context, layout): – this is on line 3809

>> I have a project for PBR multi-shader like this, what do you think of that?
Great! Here’s a really good site that might help. If you are creating a shader, you’ll probably have to write it as an Open Shader Language script (OSL). (The custom-pyNodes do not affect the actual shading)

Here’s a great OSL site that could help with this. http://blog.michelanders.nl and also https://www.smashwords.com/books/view/368598

Also thanks for the register/unregister tip – I have seen other pyNodes use this and I agree it looks pretty good - I have yet to try it out!

Good luck with the programming

Cheers

Dylan

Hi David,

The OSL shaders don’t render in the normal Open GL viewports (they make objects go black in the Material viewport display setting!).
I often set the “Maximum Draw Type” of cutaway objects to either SOIID or WIRE to make things easier to see in the OPEN GL viewports – and almost always have one of the 3D windows set to RENDERED to see the actual result of the cutaway.

:slight_smile:

Dylan

@ iReboot

Thanks for sharing this Addon.

This very cool. It is going to help me big time on a project. Is there a way to fill in the areas of where the walls, in my case, are being cut? Can be filled in with a color? like a poche effect. I see a fill parameter but not sure what it is intended for.

Thanks

I see the rim options. i will have to play with it.

I noticed that after adding the cut away shader, sometimes it takes awhile for the material to update. If I try and render before the material updates, Blender will crash.

yup, had experienced many engines stall & crash, if are not let to think it through (building shaders)… comes with the territory

Im trying to revice this addon for 2.80. thus far i get it working, but not all settings seem to work properly on the child object or materials. It does cutaway as it should, however those settings for the rim dont transfer over properly.

Im not familiar with OSL language, i understand the python code of the addon. At least most parts of it.
Ill post a new repo link and perhaps others with OSL knowledge would like to try or help

4 Likes