Implications of vertex attributes? #617
jombo23
started this conversation in
Show and tell
Replies: 1 comment 7 replies
-
Hey there. I would make a PR with what you have so far, describe the issue you're not sure how to fix, and me or @VascoPi can help give some suggestion. Sounds like you're part of the way there already. I'm assuming you saw the tutorial on the RPR SDK https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRenderSDK/blob/c61d7d3d56b0953d052ad561259d58e9c9a96f8f/tutorials/37_primvar/main.cpp#L187 on primvars? This is of course C++ but should help a bit. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm wondering what the implications behind getting a real vertex attribute setup are.
Since they're pretty important to the project I am working on, I wanted to see if I could implement them myself instead of bugging you guys to do it for me (thats the point of open source software right?) I originally thought it was a limitation of prorender as there were only like 14 different types of material lookup values. Then I went and skimmed through the prorender SDK, saw that there were things called primvars, read some more, and more, and more, and have now implemented a basic attribute system where the attribute name is its primvar key (obviously numbers only). I did this because 1, it seemed easy, and 2, I wasnt sure how both python/prorender generally handles, and anyone here wants scene globals to be (if its even required).
It is my understanding that named attributes would have to be assigned a key, and even though that key can be reused for different purposes on different prorender shapes, it would be impossible to reverse look them up without storing the ID->textual name somewhere. For my own purposes, I wouldnt mind just making some global array somewhere and loading it with said pairs, however I believe that sounds like bad practice, and even if I did make a PR for it, theres a snowballs chance in heck it would be rolled in.
The current implementation of vertex colors is also broken as far as I could find. I couldnt make vertex_value0/1/2/3 return anything besides 0.
In my setup i have reimplemented vertex colors as primvar 99, and both made that fall under the "vertex color" option in RPRLookup, and also have added a primvar lookup into the node as well, seen here:

Vertex colors in use seen here:

In order to make it seamless with eevee, I added a basic implementation of shadernodeattribute as well, so you can give it the ID and pull the values back.
Example case on this object trail I made using geometry nodes and attributes. The vertex position, curve point position, and curve point radius are stored in attributes so I can shade the trail based on the normal to the camera to give it a flat appearance and center the fade out from white to blue.
Small render of the sample curvy file I've been working with for this material/geonode setup, now working in prorender.

Anywho, thats all I've really got to show. My question is, if some random idiot like me can stumble through a language he doesnt know(python), and manage to make blender attributes work in a minimal, but usable way, what are the chances of some proper attribute support being added to RPR? It's gotta be much easier for you guys to work with it than I.
Beta Was this translation helpful? Give feedback.
All reactions