OSL Camera

3D Studio Max Plugin (Export Script Plugins developed by [gk] and KilaD; Integrated Plugin developed by Karba)
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here http://render.otoy.com/forum/viewforum.php?f=18
Post Reply
Rik
Licensed Customer
Posts: 423
Joined: Wed Jul 28, 2010 8:57 pm

Any idea where the instructions for the OSL camera are? Been looking on the forums and googling but can't find anything.

When I use an OSL camera the image looks very squashed in the vertical. I get the feeling the camera is trying to make a square image but my rendering resolution is 1280x720.
In the attached images the disk in the doorway is/should be circular.

Any ide how to make the render scale correctly?

Not sure if it's relevant but I have nothing in the OSL shader section. Should there be something? It currently says No shader.

Can't find any shaders.

Where are all the OSL shaders and their instructions kept?

Cheers
Attachments
1280x1280_Denoised_beauty.jpg
1280x720_Denoised_beauty.jpg
samsue
Licensed Customer
Posts: 388
Joined: Thu Jan 17, 2019 10:04 am

Hey

do you have read this part of the manual?

https://docs.otoy.com/3DSMaxH/3DSMaxPlu ... Camera.htm
Rik
Licensed Customer
Posts: 423
Joined: Wed Jul 28, 2010 8:57 pm

Yup. Couldn't see anything about why it was rendering a square aspect ratio though.

I'd expect to see somewhere a list of the .osl camera files with a description of what they do.

I know absolutely nothing about coding and don't think I should be expected to - I'm only a humble artist and not bright enough to do the code :?

However, I cut and pasted this from the Octane how to code OSL camera shader documentation and made an OSL file.
Hoped it would make the OSL camera bahave like a standard camera and somehow it seems to work. Got lucky for once.


shader OslCamera(
output point pos = P,
output vector dir = 0,
output float tMax = 1.0/0.0)
{
float uv[2];
getattribute("hit:uv", 2, uv);
vector right = cross(I, N);
dir = I + right * (uv[0] - .5) + N * (uv[1] - .5);
}


Here's the OSL file if anyone's interested. Not sure why it isn't included as the default...

Also attached a strange fisheye camera OSL and a projection one that doesn't work but hey.

As far as I know this is currently the world's only supply of Octane OSC cameras. :cry:
Rik
Licensed Customer
Posts: 423
Joined: Wed Jul 28, 2010 8:57 pm

So the OSL standard camera osl will render at the right aspect ratio but doesn't appear to have any DOF target focus options.

So can't really think of a reason to use the OSL cameras. Plus, they're no quicker.

Will just stick to the normal Octane camera instead and abandon OSL cameras (again) until I need some freaky fisheye effect going on :roll:
User avatar
paride4331
Octane Guru
Posts: 3821
Joined: Fri Sep 18, 2015 7:19 am

Hi Rik,
https://docs.otoy.com/osl/camera/
Osl fish-eye camera to download.
Regards
Paride
Attachments
FishEyeCamera.rar
(838 Bytes) Downloaded 228 times
2 x Evga Titan X Hybrid / 3 x Evga RTX 2070 super Hybrid
Post Reply

Return to “Autodesk 3Ds Max”