News
Introduction
Pictures
Installation
Building a Black Hole
Rendering a Black Hole
Limitations
Troubleshooting
News
| * |
Note that this information here is quite outdated since I worked on a mental ray port meanwhiles and also found a different better approach. (Dec 17 2008) |
| * |
Picture section added. |
| * |
The Plug-In was used the for the Einstein Cross-Media-Opera 'C-The Speed of Light' produced by phase-7 and 'Wissenschaft im Dialog' shown at the 'summer of physics 2005' in Berlin. |
| * |
The Plug-In was presented at the 2nd high end visualisation workshop in obergurgl. |
| * |
New Version 0.3 alpha availabe. Minor code changes. A mel script that creates a new black hole was added. |
| * |
Animation of 2 blackholes added in rendering section. |
| * |
Sample scene 'blackhole_sample_3.zip' added into download directory. It demonstrates 2 animated blackholes surrounding each other. |
| * |
There was an error in the connection setup described in the earlier 'building' section. Because of that the render results in maya batch renderer were not correct. Building a Black Hole section was updated. The first two sample scenes still contain the wrong setup. |
| * |
Sample scene 'blackhole_sample_2.zip' added into download directory. It demonstrates a scene were a blackhole outer sphere is enclosed by another. |
| * |
Troubleshooting 'smoother border' added. |
Introduction
The Relativistic Black Hole Shader is a plug-in for Maya by Alias. The plug-in allows you to render gravitational lens effects caused by black holes in 3D. The shader uses a fast geometrical approximation. The implemented method is exact for weak fields of gravitation. The nearer you are at the black hole the less accurate the result will be. But you can achieve very nice results with it.
The shader must be used on a sphere object (nurbs, polygons or subdivs). In the picture on the left side you can see a scene without distortion. The grey transparent circle is a nurbs sphere. The picture on the right shows the scene after having applied the black hole shader on the nurbs sphere. Note that the red sphere now appears twice in the picture. It even can happen, that you see an object more often and from different sides at the same time.
 |
 |
normal scene |
scene with black hole |
Pictures
Here is a collection of some higher quality images or videos created with help of the plug-in or previews version of it.
Installation ( for internal use only )
1) Download plug-in (0.5 beta Version) here.
2) Unzip the blackhole.zip.
3) Copy the blackhole.mll into your ../Maya/bin/plug-ins/ folder.
4) Copy the render_RelativisticBlackholeShader.xpm and create_RelativisticBlackhole.xpm into your ../Maya/icons folder.
5) Copy the AERelativisticBlackholeShaderTemplate.mel into your ../Maya/scripts/AETemplates folder.
6) Start Maya. Open the plugin manager (Window > Settings/Preferences > Plug-in Manager) and tick the load-checkbox next to Blackhole.mll.
The Shader should now appear in Hypershade.
7) Open the Script editor. In the script editor: File->open script Blackhole_create.mel. Ctr-a, or select the whole script with the mouse and then drag the script with the middle mouse button to a shelf. Open the shelf editor, select the script, click 'change image' and select the create_RelativisticBlackhole.xpm. Now you have a nice button that creates a new black hole for you.
Building a Black Hole
Execute the script Blackhole_create.mel to create a new black hole.
Or do everything by hand.
Rendering a Black Hole
Before you are ready to render, some more settings must be done. Type in the name of the camera you are going to render from in the RenderCameraName attribute of the shader. If the given camera does'nt exist, the shader will turn red.
Be shure you have enabled raytracing in the render globals of Maya. Without raytracing the shader will not work and will produce a black sphere.
The camera position must not be inside the outer sphere, otherwise no distortion will be calculated.
Objects may be inside or cut through the outer sphere. If you have objects that are inside the outer sphere and have a shorter distance to the camera than the midpoint of the outer sphere, be sure that the Render All Objects Inside attribute of the shader is enabled. If it isn't, objects may appear cut off. Enabling will slow down rendering time a bit.
 |
 |
2 blackholes in a higher resolution picture rendered scene: 'blackhole_sample.ma' |
2 blackholes, smoother borders rendered scene: 'blackhole_sample_2.ma' |
|
|
 |
|
2 animated blackholes rendered scene: 'blackhole_sample_3.ma'
mov small resolution, 1.2 MB
mov full resolution, 9 MB
|
|
Limitations
Camera must not be inside of the outer sphere.
When having more black holes in one scene they(their outer spheres) should not intersect or enclose each other. This is not generally true. But if they do, it depends on the camera position whether a correct effect is achieved or not. (See second point in the troubleshooting section for a more detailed description)
No support for mental ray. (yet)
No redshift is supported. (yet)
...
Troubleshooting
The transition at the border of the blackhole is not smooth enough in batch render mode. or
The render result is very different in batch rendermode.
A connection of radius or scaling of the outer and inner sphere to the shader could be the problem. (f.e. outer_sphere.scaleXYZ -> shader.infinity_radius). The connection in the other direction works without problems. (f.e. shader.infinity_radius -> outer_sphere.scaleXYZ)
The transition at the border of the blackhole is not smooth enough.
Try making the outer radius of the black hole as big as possible. The camera position is a limiting factor here. If you have more blackholes in one scene, then this could be a problem too. Make the radius of the (first) blackhole that has the shorter distance to the camera very big. (The camera must be outside.) The second black hole lies behind the first. Set the radius of the second blackhole's outer sphere as big as possible. It may even enclosed or intersected be the other outersphere. BUT the second black hole's sphere surface must not reach into the semisphere of the first outer sphere showing in camera direction. Have a look at a picture, showing 2 outer spheres and the camera here.
If I render one black hole it appears black.
Is the RenderCameraName attribute set correctly?
Is raytracing turned on in the render globals?
Is Double Sided in the Render Stats of the outer sphere disabled?
The black hole is red.
Is the RenderCameraName attribute set correctly?
The black hole is purple.
You have 0.5 beta installed and have not check the check box 'render all objects inside'.
If I render 2 (or more) black holes that overlap in the picture the second one appears black.
Increase the quality of raytracing by increasing the Reflections value to at least 2 in the Render Global Settings. The rays that are sent from the black hole are treated as reflection rays.
A black hole seen in the reflection or refraction of another object is black.
Increase the quality of raytracing by increasing the Reflections or Refractions value in the Render Global Settings.
The black hole produces tiny black artefacts at the border of the outer sphere in the rendered picture.
Increase the number of polygons that build the outer sphere object. When using a NURBS sphere increase the U(and V) Divisions Factor found in the outer_shpereShape under Tesselation.
I feel like going insane when looking on a picture distorted by many black holes.
Hitting the head against the keyboard for ((number of black holes visible in the picture)^2 - 1 ) times will help ;).
|