Backplate issue SOLVED

Forums: Backplate issue SOLVED
Houdini Integrated Plugin

Moderator: juanjgon

Backplate issue SOLVED

Postby quadcat » Tue Jun 18, 2019 6:37 am

quadcat Tue Jun 18, 2019 6:37 am
octane 2018.1.3.0
houdini 17.5.173
The Backplate checkbox doesn't works as expexted.
When it is ON - input texture is appear but environment geometry represents as sphere, not as flat image.
May be I doing somthig wrong but it is seems as bug.
Also I tryed modify subnet of rendertarget - no success.
Could you check attached scene?

upd. so it seems like everything work correct. But placing flat texture on background reaching by diffirent way. How?

upd.2 SOLVED

1. from here viewtopic.php?f=21&t=65575
2. create *.txt with
Code: Select all
shader CameraMap_env(
    output point uvw = 0)
{
    vector p = transform("camera", I);
    float fov;
    int res[2];
    getattribute("camera:fov", fov);
    getattribute("camera:resolution", res);
    uvw[0] = 0.5 + 0.5 * p[0] / p[2] / tan(fov / 2) ;
    uvw[1] = 0.5 - 0.5 * p[1] / p[2] / tan(fov / 2) * res[0] / res[1];

3. Go to octane render target (right click > allow edit content) and create PROJECTION OSL node
4. Load *.txt
5. Feed all interested Texture Imager nodes trough projection port - in Camera_Environment group for example
Attachments
temp.zip
(1.56 MiB) Downloaded 325 times
quadcat
Licensed Customer
Licensed Customer
 
Posts: 3
Joined: Wed Aug 16, 2017 4:14 am

Re: Backplate issue SOLVED

Postby juanjgon » Tue Jun 18, 2019 4:05 pm

juanjgon Tue Jun 18, 2019 4:05 pm
Great! Yes, this is a nice example of how a simple OSL projection shader can help with this task. Thanks for sharing your solution.

Thanks,
-Juanjo
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Backplate issue SOLVED

Postby asamaniego » Thu Feb 13, 2020 3:37 am

asamaniego Thu Feb 13, 2020 3:37 am
Hello,

I'm putting in the .txt in the projection OSL and when I go to compile and build GUI I get a syntax error. When I pasted the code in and connect to the projection part of my texture, it's still spherical. Please help, I just need a simple backplate for a scene. Thanks.
asamaniego
Licensed Customer
Licensed Customer
 
Posts: 18
Joined: Thu Apr 27, 2017 10:46 pm

Re: Backplate issue SOLVED

Postby juanjgon » Thu Feb 13, 2020 1:23 pm

juanjgon Thu Feb 13, 2020 1:23 pm
I think that the OSL code had a closing brace missing at the end. Try this code:

Code: Select all
shader CameraMap_env(
    output point uvw = 0)
{
    vector p = transform("camera", I);
    float fov;
    int res[2];
    getattribute("camera:fov", fov);
    getattribute("camera:resolution", res);
    uvw[0] = 0.5 + 0.5 * p[0] / p[2] / tan(fov / 2) ;
    uvw[1] = 0.5 - 0.5 * p[1] / p[2] / tan(fov / 2) * res[0] / res[1];
}



Thanks,
-Juanjo
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Backplate issue SOLVED

Postby asamaniego » Thu Feb 13, 2020 4:09 pm

asamaniego Thu Feb 13, 2020 4:09 pm
Yes! Works...thank you!!!
asamaniego
Licensed Customer
Licensed Customer
 
Posts: 18
Joined: Thu Apr 27, 2017 10:46 pm

Re: Backplate issue SOLVED

Postby muchogrande » Mon Feb 22, 2021 8:47 pm

muchogrande Mon Feb 22, 2021 8:47 pm
Could someone explain this a little further? I created the Projection_OSL node in the rendertarget and added the code, but I'm a little lost what I do next to apply an image?
muchogrande
Licensed Customer
Licensed Customer
 
Posts: 61
Joined: Wed Jan 14, 2015 9:19 pm

Re: Backplate issue SOLVED

Postby Renbry » Tue Dec 21, 2021 11:27 pm

Renbry Tue Dec 21, 2021 11:27 pm
@muchogrande - here's a snipping showing how the Projection OSL gets plugged into the existing node network. Specifically the PROJECTION plug on the CamEnviroTexture.

Then you'd just need to make sure your Render Target has Cam Environment turned on in the MAIN tab to make visible the file name selector to choose your background image

Capture.PNG

Capture2.PNG
Renbry
Licensed Customer
Licensed Customer
 
Posts: 39
Joined: Fri Nov 23, 2018 9:09 am

Re: Backplate issue SOLVED

Postby muchogrande » Tue Dec 21, 2021 11:29 pm

muchogrande Tue Dec 21, 2021 11:29 pm
Awesome, thank you!
muchogrande
Licensed Customer
Licensed Customer
 
Posts: 61
Joined: Wed Jan 14, 2015 9:19 pm

Return to Houdini


Who is online

Users browsing this forum: No registered users and 5 guests

Tue Apr 16, 2024 1:26 pm [ UTC ]