# nosferatu_037

Members

46

• #### Days Won

1

nosferatu_037 had the most liked content!

## Community Reputation

2 Neutral

• Rank
Peon
• Birthday 03/15/1983

• Website URL
http://

## Personal Information

• Name
• Location
Animal Logic,Sydney
1. ## Calculate Curl on a grid sop using attrwrangle sop

Yeah i actually did exactly the same, the problem is i would get completely different results compared to a vdb analysis sops curl operator. Thats why i thought i was doing something wrong math wise, or i just didnt understand the notation really well. I just used the neighbours() vex command to extract the points sharing the same edge, and went to build a gradient for each v component. I got a 3x3 matrix with the gradient vector components in it, and did the same subtraction like in that example you sent, but it looked so different from volume curl, i couldnt figure out why.
2. ## Calculate Curl on a grid sop using attrwrangle sop

Thanks Pusat But that vop relies on volumes and inside its just a simple volumegradient, like i mentioned, id like to find out how to do the same thing without using volumes and how the math would translate into code.
3. ## Calculate Curl on a grid sop using attrwrangle sop

Hey guysIve been trying this for a while now, but i still am not able to solve it.Other than converting a grid to a volume and running a volume analyse sop, how would one calculate curl of velocity on a grid sop using an attribute wrangle.Ive setup a simple grid and ran it thru a pointvop in which ive just plugged in the output of a curl noise vop into v. Now i just want to calculate the curl of v using just the attribute wrangle using neighbours() vex function.So far ive managed to calculate the gradient of each v component, but the rest of math i cannot translate to proper code. Any ideas?p.s. does anyone have resources how to move from math notations to codeThanks
4. ## How to work with variables in Houdini

Just go to Edit->Aliases/Variables->Variables tab Enter the name of your variable, enter the value, say name foo value 0.25 And in any context you should be able to access that variable on a global level as a \$FOO. it will always return 0.25. Its an ok thing to do however you usually want to make your assets or setups know about these variables from the parent node containing the setup, rather than the Global Alias/Variable. Its going to be very difficult keeping track of all of those global constants you have and you dont have an easy enough access for a typical user to change the value.
5. ## Houdini 16 Wishlist

Jens to the rescue!
6. ## Houdini 16 Wishlist

Just use an attrib wrangle sop, the code for that shouldnt be longer than two three lines and make a preset out of it.
7. ## Attributes compare

Thanks captain I was thinking about creating a template function for the UT_ValArray i just thought that there could be another way of doing this. As for ids thanks for the info, i was generally confused about it, and have since read the header files which explain the whole thing in more detailed way. Ill give it another go and see how it turns out. Thanks again
8. ## Attributes compare

Hey guys I have a simple enough problem i wanted to solve in HDK, and i managed to do it, however im sure there has to be a more elegant solution with enough knowledge of HDK classes. I wanted to do a simple sop that compares the same user chosen attribute from two different inputs, and either groups the difference as points group, or deletes points that have the same attrib value across both inputs. Basically i just have the same point cloud on both inputs, the second input has a timeshift node that looks up the previous frame. Its a simple enough exercise, however i have to ask if anyone knows if im reinventing the wheel, if the interface for doing stuff like this is more simple to use, or could give me some hints on how to do it better. Now the problem i came across was how would one define an array to hold values of an attribute of type we dont know in advance? Ive used a hacky solution where i would do the following in cookMySop() //get ptrs to our input geoconst GU_Detail *firstInput = inputGeo(0); const GU_Detail *secondInput = inputGeo(1); //find if attr exist in those geos, lookup is our string that holds the attr name user chose from the UI const GA_Attribute *fattr = firstInput->findAttribute(GA_ATTRIB_POINT, lookup); const GA_Attribute *sattr; //get our total numpts std::cout << "total num of pts (1): " << firstInput->getPointMap().indexSize() << std::endl; // std::cout << (GA_StorageClass)fattr->getStorageClass() << std::endl; //if we have hooked a second input, find attrs and get total numpts if(secondInput) { sattr = secondInput->findAttribute(GA_ATTRIB_POINT, lookup); std::cout << "total num of pts (2): " << secondInput->getPointMap().indexSize() << std::endl; } // If source attribute doesn't exist, error. if (!fattr || !sattr) { addError(SOP_ATTRIBUTE_INVALID, (const char *)lookup); return error(); } //define our arrays UT_ValArray<int32> ptNumListFirst; UT_ValArray<int32> ptNumListSecond; UT_ValArray<int32> ptNumListDiff; //only if our attr is not string shall we compare, have no idea how to figure out string yet if(fattr->getStorageClass() == GA_STORECLASS_INT) { std::cout << "Yes it is a numeric!" << std::endl; //feed our list of attr values in the array FIRST GEO gdp->getPointAttributeAsArray(fattr,gdp->getPointRange(), ptNumListFirst); //if we have connected the second geo if(secondInput) { //feed our list of attr values in the array SECOND GEO secondInput->getPointAttributeAsArray(fattr,secondInput->getPointRange(), ptNumListSecond); //compare our first and second input list and feed the diff in the third input //this is our class method compareUTArrays(ptNumListFirst, ptNumListSecond, ptNumListDiff); } } I actually dont allow the user to pick an attrib from the list thats not int or the node errors out, so basically im forcing the user to choose an int attr. Im sure there is a better way of doing this. Also i tried using the sortedIntersection() method of the UT_ValNumeric array type, however i could never get the difference to be calculated so i had to write my own implementation of the method (compareUTArrays()). Also in the end i use this approach to get the pts in an array that either needed to be grouped or deleted, im not entirely sure if its the "proper" way of doing things: //if we ticked new group, create a new group for pts if(newGrp || deletePts) { //create our new group GA_PointGroup *diffGrp; diffGrp = gdp->newPointGroup(grpName, false); //create a temp group we will delete later if we need to delete points GA_PointGroup *delGrp = gdp->newPointGroup("__tempDelGrp__", false); //get the handle to our int attribute //would prefer if i could somehow make the handle type recognize the attr data type GA_ROHandleI lookup_attr(fattr); int32 value; //iterate thru all points for(GA_Iterator it(gdp->getPointRange()); !it.atEnd(); ++it) { GA_Offset offset = *it; value = lookup_attr.get(offset); std::cout << value << " is value of pts attr" << std::endl; //iterate thru the array and if we have found same attr value add it to the group for(UT_ValArray<int32>::const_iterator itarr = ptNumListDiff.begin(); itarr != ptNumListDiff.end(); ++itarr) { if(value == *itarr) { diffGrp->addOffset(offset); continue; } } } //the diff between the first and second input is found in the diff array //however we need to delete everything thats not the diff, and that is the second inputs members translated into first for(GA_Iterator it(secondInput->getPointRange()); !it.atEnd(); ++it) { GA_Offset offset = *it; delGrp->addOffset(offset); } if(deletePts) { gdp->destroyPointOffsets(GA_Range(*delGrp)); gdp->destroyGroup(delGrp); } } Now i guess i can use the GA_Attribute.getStorageClass and a switch or if statement and initialize my arrays according to the type, but like i said somehow im sure there has to be a more intelligent way of doing this Also im a bit confused about the bumpDataId, what should i do in this case? If i just group my points and dont even modify the geo or attrib values, should i signal houdini to bumpDataId and whats the syntax for doing that? If i delete points however im sure i have to inform houdini that ive modified geo, which class or method should i use to do something like that? I hope all of this makes sense, let me know if it doesnt ill try and elaborate better Any help would be greatly appreciated Thanks Serge
9. ## Random link of interest

Electron microscope slow-motion video of vinyl LP
10. ## New Bifrost features which seem very powerful

Also max seemed to have gotten some new features that are very familiar
11. ## New Renderman tutorial in Houdini

Hvala Srecko New renderman tutorials are quite good i have to say. It was a lot of fun trying to figure out how easy/difficult mantra can handle this type of stuff. And all i can say it performed the task very good. The final render in full HD did take a while but i was chasing quality rather than rendertime.

13. ## Pyro Drag Race | Houdini Graphics Card Comparison

I agree. Maybe it would be a good test also to include the intel openCL test as well the regular one.
14. ## Pyro Drag Race | Houdini Graphics Card Comparison

Sorry didnt quite make myself clear, thought this is about general GPU usage in simulation. I was only saying that GPU simulation in production is being used and widely at certain places, and that houdinis opencl is on the right track to utilize the gpu in the production. Even tho the 4gb of gpu memory is a bottleneck sometimes, it does improve the performance quite a lot, and now in h14 with the grain solver and intel OpenCL it does look very promising. The only problem ive experienced so far in production was the memory limit of the GPU.
15. ## Pyro Drag Race | Houdini Graphics Card Comparison

I would have to disagree with this one. At ilm they have the best tool ive ever used for fluid simulation, fire smoke and explosions. Its called plume and the entire sim as well as rendering is done on a gpu. Its so fast that we barely ever used to save cache files, only when particle advection was necessary. All the fluid sims you see on transformers and most of ilm movies in the past couple of years were done on a gpu with no more than 4gb of ram. Its a CUDA gpu solver if i remember correctly, you can actually find some links on it. Its such a stripped down solver which makes it so fast and so easy to iterate. Here is a tech video on it. Sidefx is doing a great job moving dop nodes to be executed on the gpu, it does make a difference.
×
• Donations