Jump to content
Sign in to follow this  

How to bake/render "inverse panorama" of the object.

Recommended Posts

Like that.

I want to bake for example fire as texture to cylinder with uv.
And where the cylinder in this case acts as the "camera".

I would be very grateful if you gave an example of setting up the shader for such baking.



Share this post

Link to post
Share on other sites

You can set up an inward cylindrical projection (based screen coordinates ranging from -1 to 1) like this:

vector pos = v@P * M_PI;
float r = chf('radius');
float h = chf('height');

v@P.x = sin(pos.x) * r;
v@P.z = cos(pos.x) * r;
v@P.y *= h;

v@N = normalize( v@P * {-1, 0, -1} );

Inside a lens shader v@P would be called P and v@N would be I.

Unfortunately SideFX recently changed the way to create CVEX operators. Does anyone know how to use CVEX in Houdini 17?


Also make sure to check out Paul Ambrosiussen´s tutorial (for H16.5): https://www.sidefx.com/tutorials/lens-shaders-for-gamedev/



  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this