Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Query input at different alternative u, v location (OSL)

5 REPLIES 5
Reply
Message 1 of 6
zenop
329 Views, 5 Replies

Query input at different alternative u, v location (OSL)

Using OSL's texture(string, u, v) call I can query a texture at different uv coords than the current shading point. Is this possible with "connected" inputs as well?

Tags (1)
Labels (1)
  • OSL
5 REPLIES 5
Message 2 of 6
madsd
in reply to: zenop

shader i
( float a = 1, // source abitrary input
float b = 2, // source abitrary input
string tex = "" ) { float somefloat = 1.3; point uv = point(a*somefloat,b,0); color tx = texture ( tex,uv[0],1-uv[1]); }

Its legal to parse anything to the u and v channels, anything you can shove into the float channels is fine. The data can come from both inputs from external inputs or internally in the shader.

Message 3 of 6
madsd
in reply to: zenop

Im going insane over the CODE block, tried to modify the code 30 times, it does not format it.
I need a tutorial on how to failsafe paste and edit code and maintain code block in reply.

Its either very sensitive ( slightly broken )
Or just broken.

Message 4 of 6
Stephen.Blair
in reply to: madsd

@Mads Drøschler What kind of format changes do you want to make?

The code block isn't great. I think if you have any extra line breaks, then you get no code formatting at all!



// Stephen Blair
// Arnold Renderer Support
Message 5 of 6
madsd
in reply to: Stephen.Blair

Eventually got it. but had to use notepad ++.

then clean the published message, including the code frame. I had 2 frames apparently. text in one and code in other. that broke things.

its OK, just need to have the right workflow when inserting that is all, this is where notepad ++ comes in handy storing text and code and try paste it into the message in different ways until it works.

Message 6 of 6
madsd
in reply to: Stephen.Blair

@Stephen Blair
Found another HTML leak issue in the code widget.
It should either be 100% html or 100% "dumb widget text" that gets autoformated on submission. Maybe the widget has a bug, maybe get contact to the author or look up the files on the server and tweak the code block rules/processing.

If I want to update the code, for clarification or readability or simply just extend. I have to clean up the whole code block for each edit.
qweqwe.png

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report