Float from Attribute

Forums: Float from Attribute
Houdini Integrated Plugin

Moderator: juanjgon

Float from Attribute

Postby iamjaden » Wed Sep 22, 2021 10:34 am

iamjaden Wed Sep 22, 2021 10:34 am
Hello,

I try to use the actual Float Value from my Point Attributes inside the Shader. I cannot find a solution that works for me and I do not really understand why this is so difficult and I think I might miss an obvious solution...

If I send an color vector via point attributes how can I split thi into 3 float scalar values to use inside my shader network?

Also, the node "Float_Vertex_Attribute" does not output a scalar value?!
It seems I dont understand the underlaying concept?!

I need to drive the offset of a 2D transform Node to proceduraly offset my texture maps. Does anyone know how to do this with Point Attributes from SOP?

Thank you in advance, Philipp

PS: sorry if i missed something obvious.
iamjaden
Licensed Customer
Licensed Customer
 
Posts: 5
Joined: Thu Apr 30, 2020 10:06 am

Re: Float from Attribute

Postby juanjgon » Wed Sep 22, 2021 8:11 pm

juanjgon Wed Sep 22, 2021 8:11 pm
In Octane 2021.1 you can use the channel pick node to split the color into its components, but I'm not sure what are you trying to do, so if you can share an example scene with your workflow, I could try to take a look at it here.

The Float_Vertex_Attribute is like the color vertex attribute, but only for a single float. Currently, you can have two color vertex attributes and four float vertex attributes. Remember that you need to declare the attributes to be extracted in the Octane OBJ spare parameters, Attributes tab.

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

Re: Float from Attribute

Postby iamjaden » Wed Sep 22, 2021 9:05 pm

iamjaden Wed Sep 22, 2021 9:05 pm
Hi Juanjo,

thank you for your reply.
I have a set of rocks which get copied to scattered points. I created random RGB Values and took them to the shader network. Now I want to use this data to translate the "transform2D node" procedurally, so that every copy of rock has a different offset in there texture maps.

I already tried using the channel split, both with 2021 and also with OSL shaders, but with no luck. I did notice that the "Texture OSL" only outputs texture color data and no plain float values (like the "Value Float" Node does)
Also, I still dont understand why the extracted R component of an RGB Vector is not seen as a single float value which is understood by other nodes and is able to drive them.. Or why the values cannot easily be converted like in VOP "vec to float", "float to vec", "float to int" and so on..

It is like I miss an Input on the "Value Float" Node which converts the texture to float, Same goes with "Value Int" as some node parameters only accept INT or float and its a pitty I cannot create and control them in SOP and import via Point Attributes.

I hope the screenshots clarifies what I mean.

Thank you for your time.

Philipp
Attachments
displ.JPG
iamjaden
Licensed Customer
Licensed Customer
 
Posts: 5
Joined: Thu Apr 30, 2020 10:06 am

Re: Float from Attribute

Postby juanjgon » Thu Sep 23, 2021 7:26 am

juanjgon Thu Sep 23, 2021 7:26 am
Hmm, but I'm afraid that what you are trying to do is not possible at all! All the instances must share the same base mesh, including its vertex subdivision. I'm not sure if something like that could work with the old render time displacement node, but I don't think so. If you want to share the scene I could investigate it.

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

Re: Float from Attribute

Postby iamjaden » Thu Sep 23, 2021 11:11 am

iamjaden Thu Sep 23, 2021 11:11 am
Hey Juanjo,

I attached a file for you and annotated within. I hope you understand what I try to do and it makes sense to you.
Thank you for taking the time.

Regards, Philipp
Attachments
point_attrib_displacement.zip
(64.97 KiB) Downloaded 81 times
iamjaden
Licensed Customer
Licensed Customer
 
Posts: 5
Joined: Thu Apr 30, 2020 10:06 am

Re: Float from Attribute

Postby juanjgon » Tue Sep 28, 2021 11:34 am

juanjgon Tue Sep 28, 2021 11:34 am
I've been checking your scene and to be honest, I've not found how to do something like that using instancing. Without instancing there is no problem, you can set a random offset for the UV map of each object itself, but the instancing of objects including displacement is only possible sharing the same displacement for all the instances. I think that the same happens with any renderer I know ... the problem is always the same, all the instances must share the same base mesh, including the displacement.

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

Re: Float from Attribute

Postby iamjaden » Tue Sep 28, 2021 7:27 pm

iamjaden Tue Sep 28, 2021 7:27 pm
Hi Juanjo,

thanks for getting back to me.

I just checked and rebuild the setup with redshift which is able to do what I want and offset the texture by point attribute data.

I think the problem is that octane imports or reads all point attribute data as color data only. (as far as I understand it)
in redshift it can be specified what we would like the data to be interpreted. Thats why we can use it in any way we like. Arnold also does this. (see screenshot)
This is what I would like to have in octane aswell..
Can you, if your time allows for it, elaborate, if this is a big deal to implement in octane, or is it fairly simple to do?

Thanks in advance,

philipp
Attachments
user_data.JPG
redshift_offset.JPG
iamjaden
Licensed Customer
Licensed Customer
 
Posts: 5
Joined: Thu Apr 30, 2020 10:06 am

Re: Float from Attribute

Postby juanjgon » Tue Sep 28, 2021 8:56 pm

juanjgon Tue Sep 28, 2021 8:56 pm
I'm fairly sure that you are not instancing in the Redshift scene, and probably in Arnold neither ;) Can you please share these scenes?

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

Re: Float from Attribute

Postby juanjgon » Tue Sep 28, 2021 9:42 pm

juanjgon Tue Sep 28, 2021 9:42 pm
Anyway, even without instancing, I think that this workflow doesn't work with Octane because the displacement nodes don't support the modification of the mesh UV. It works with color or bump maps, but not with displacement. Attached you have an example scene including an OSL node to randomize the UVs, but it doesn't work for displacement :(

Thanks,
-Juanjo
Attachments
point_attrib_displacement_juanjo.zip
(64.67 KiB) Downloaded 85 times
2021-09-28 23_40_52.png
2021-09-28 23_41_14.png
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Return to Houdini


Who is online

Users browsing this forum: No registered users and 15 guests

Fri Apr 19, 2024 9:31 pm [ UTC ]