Jump to content

Latimerias

Members
  • Content count

    11
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Latimerias

  • Rank
    Peon

Personal Information

  • Name
    Lati Adonvst
  1. This is what I did in the sops method i attached, is there a way to do this in VEX? I realize i would be better using a while loop probably, because i want to stop once the total distance is greater than the length of the shelf.
  2. I cannot seem to wrap my head around how to do this so I am asking here. Im looking for a way to "stack" values with VEX. If i simplify it I want to create a point and assign it a random value, then move it that value in the x direction. After that I want to create a second point, give it a new random value and move it that distance + the distance of the first point. The purpose is to create a point generator with random scale values that i can use with LOPs inside of an instancer to place books next to eachother at random scales. I made this in sops and it worked well on a smaller scale but I ended up doing a few thousand books and overloaded my ram. Currently what i have is this. int iter = chi("Iterations"); float minwidth = chf("Min_Width"); float maxwidth = chf("Max_Width"); for(int i = 0; i < iter; i++){ float currentwidth = fit01(rand(i), minwidth, maxwidth); float prevwidth = fit01(rand(i-1), minwidth, maxwidth); vector pos = set(prevwidth+currentwidth/2, 0, 0); int pt = addpoint(0, pos); } My thought process was to create a random value based on the iteration, this random number would be the book width scale value, which is just fitted so i dont get small values. Then to get the previous books width i would subtract the iteration by 1 which successfully returns the same value. Then i create a point and move it by the previous book width + the current book width/2 because i want the point to be centered. However this doesn't work at all because it can only access a single value back. Also i uploaded the sop book generator below if anyone was interested, its pretty flawed the more that i look at it i should have split it into separate HDAs and also you need to have your coordinates set to Z-up. Heres a demo of it through if anyones interested. jw_book_generator.1.0.hdanc
  3. Figured it out, the collect node reads the first shader as the default openGL shader so you pipe a USD preview surface into that and your render shader into the second input. It appears materialX usd preview doesn't work currently but usd preview does.
  4. Title pretty much says it all, I have a set of USD assets made via the component builder and I want to have a material for viewport visualization using USD preview surfaces and another for render time using materialX standard surface. In the documentation it says you can use a collect node but it never says how to implement or use it so that the default state is the USD preview and at render time it switches to materialX. When I was using materialX without texcoord nodes the material would show in viewport but I follwed the documentation and added texcoord nodes for each texture and it stopped, not really sure why I need this when I wasn't having uv error without using it. The second question is just an error I encountered when point instancing variant assets, it says "no display node found" It was working earlier and I couldn't find what this means. Thankyou for your time!
  5. If I've got a list of objects which ill called boxes and each box has a connectivity attribute on it so box 1 has 6 prims each with a attribute 'class' and value '0', box 2 has value '1' and so forth like normal. My question is how can I shuffle these parameters in a random way, by which I mean mix the values in the list that so box 1 may now have a 'class' value of '1' on every one of its prims and box 2 now has value '0', I need this to be random. I've tried using the sort SOP but that didn't get me very far as it created random values for every primitive when I need to retain the connectivity different. I also tried shuffling the values by creating a primitive wrangle to create a random number, fit it between 0-#objects and assign that value back to the 'class' value but then i get repeating values where box 1 has a value of '0' but then box 4 also has a value of '0'. I am thinking next of trying to do an uniqueval function, randomize that then remap to geometry but I am not sure of how I can randomize/sort detail attribute values so if anyone has any idea I would greatly appreciate it.
  6. @Alain2131 You just made my month! To clarify i do not need the values from previous datasets to remain, the file you shared answers all my questions!! Im gonna need to do some changes to implement it for my use but it looks amazing from what i just looked at. thanks so much! Edit: Just finished implementing it, and it works like a charm but now im trying to use material instead of color which ive having touble implementing, do you have any suggestions? So far everything i tried assigning a material to values by reversing the blast selection so it only leaves 1 value for each iteration and then assigning a material node after that references the material specified by the parameter. the problem is i keep getting an error "bad parameter reference" when im using the same conventions. I attached a file showing what im explaining. EDIT 2 Just got the material setup working! ill attach a file for anyone who looks at this in the future. dyanmic UI with materials on prims.hipnc
  7. @carthick Sorry it was hard to explain, i know how to color my existing attributed what im looking for a is a way to turn them into parameters for an HDA. I need a procedural way so that when the dataset changes it generates new parameters.
  8. Hello, So i import data with varying attribute values. For example ill call it attribute "Type" with string values "B,F,C,D". The attribute always imports under the name type but the values change, im looking for a way to generate a color parameter for each value so i can color value "F" primitives a different color than "B,C,D". The problem i cant get around is if the next dataset i import has values "X,A,S" how can i make the interface dynamic so that now i only have color parameters for the X,A,S values. The closest thing i can find is multiparam blocks but those would require me to manually create the parameters where instead i want parameters to generate based on the number of attribute values. Is this even possible without python, i have no experience coding. I hope this made sense, thankyou for your time!
  9. Hello, So i import data with varying attribute values. For example ill call it attribute "Type" with string values "B,F,C,D". The attribute always imports under the name type but the values change, im looking for a way to generate a color parameter for each value so i can color value "F" primitives a different color than "B,C,D". The problem i cant get around is if the next dataset i import has values "X,A,S" how can i make the interface dynamic so that now i only have color parameters for the X,A,S values. The closest thing i can find is multiparam blocks but those would require me to manually create the parameters where instead i want parameters to generate based on the number of attribute values. I hope this made sense, thankyou for your time!
  10. Amazing!! Exactly what i was looking for thankyou so much.
  11. Im working with osm data and which has a "building" attribute that contains values like garage, residential, apartments etc... and there is usually varying values depending on the location that the data is taken from. What im trying to do is create a group for each value that is named with the value. For example i have an osm file with the building attribute and a value of "garage" which needs to be turned into a group called garage, referencing the value for its name. I know i can reference attribute values as groups by doing @building=garage but then its not procedural and would not create a group for each value type. Not really sure how to do this and would appreciate any input!
×