Jump to content

Curling ray trace / black hole


Recommended Posts

Hello everyone,

I'm trying to set a blackhole effect like gargantua in Interstellar, in a low cost way.

The idea is to us a grid as a renderer, parented to a camera (sticked to its frustum), to send a ray from camera position, through the grid, to a sphere and if the ray sent is in the periphery of this sphere it curls/bend. I have found the script to do that in another software but I don't know how to get the global ray direction information and how to use it.

I thought use a snippet in a material to write the script and put the material on the grid.

 

Maybe it's not even the most relevant idea to do this effect. I'am open to other solutions

 

Don't know if I'm really understandable ^^'

Thank you anyway in advance

Link to comment
Share on other sites

  • 2 weeks later...

Thank you Hazoc,

it could be, indeed an other way to solve my problem, but it isn't exactly what I try to do, if you are familiar with "rayhit" and to use snippet in materialbuilder, I could send you a scene with the draft map script I'm trying to create?

 

Regards

Link to comment
Share on other sites

Hi,

I wanted to do exactly the same thing when I would have some time. My idea was to do it in VEX in SOP context, inspired by what this guy has done (he shared his file) : 

I would have used a volume to bend the ray progressively as it is going forward, and using gravity to do it (you calculate a force % to 1/Distance^2 to the black hole). My idea was to replicate a gravitational lens effect :-) But did not have time to start.

Let us know what you are obtaining with your technique !

Link to comment
Share on other sites

Hello again Hazoc,

Sorry for the delay, hard week for me : here is a first scene, pretty raw, where I have a sphere (symbolizing the black hole, will be black), a null and a plane parented to the camera: this plane is receiving the blackhole shader.

you will find in the material tab a material_builder with a simple snippet: the script is in it, but I don't know in Houdini what to link to what.

Hope you'll find out :)

 

thank you in advance

 

 

snippet_blackhole_shader.hip

Link to comment
Share on other sites

It's impossible to exactly tell what you were after for here just by looking at an unfinished shader that doesn't even try to return any value. Maybe if you can draw a concept picture what the effect is exactly supposed to look like people could propose techniques to achieve the desired effect.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...