[[Template core/front/profile/profileHeader is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]
Varaya last won the day on March 8
Varaya had the most liked content!
Community Reputation
1 NeutralAbout Varaya
-
Rank
Peon
Personal Information
-
Name
Niklas H
-
Location
Hamburg
-
Thank you. I didnt know about that Stop condition in the sop loop. You assumed correctly, that the "current" point group is assigned to a single point. But here is the full setup for those who are interested. (without the stop condition. Im working on that) maze_generator.hipnc
-
Varaya started following primintinsic access in dops, Maze Generator: Recursive VEX code and force fighting with rbd bricks
-
Hi, im build a Maze generator with vex. But i went into an issue by setting up the right iterations. I developed the code in a solver sop because it was easy for me to understand whats happening. But now i want the code iterating till the maze is finished. So I want the iterations to be driven by a condition, for example (and not by frames). Does anybody know how to make a recursive version of the code, so i will be able to setup a condition? function int[] nunvisited(int inpoint){ int pushed[] = array(); foreach(int n; neighbours(0,inpoint)){ if(inpointgroup(0,"visited",n)!=1){ push(pushed,n); } } return pushed; } function void movefor(int cpoint){ int neighbours[] = nunvisited(cpoint); int randbour = int(rand(cpoint+25)*len(neighbours)); int npoint = neighbours[randbour]; //add point to visitedlist array int visitedlist[] = detail(0,"visitedlist"); push(visitedlist, npoint); setdetailattrib(0,"visitedlist",visitedlist,"set"); //enable visited group setpointgroup(0,"visited",npoint,1,"set"); //disable current group setpointgroup(0,"current",cpoint,0,"set"); //enable current group setpointgroup(0,"current",npoint,1,"set"); //color setpointattrib(0,"Cd",npoint, {0,0,1}, "set"); //add line int l = addprim(0,"polyline",cpoint,npoint); setprimgroup(0,"line",l,1,"set"); } function void moveback(int cpoint){ int list[] = detail(0,"visitedlist"); int lastindex = len(list)-2; int ppoint = list[lastindex]; //delete point from visitedlist array int visitedlist[] = detail(0,"visitedlist"); removeindex(visitedlist,len(list)-1); setdetailattrib(0,"visitedlist",visitedlist,"set"); //disable group setpointgroup(0,"current",cpoint,0,"set"); //enable group setpointgroup(0,"current",ppoint,1,"set"); setpointattrib(0,"Cd",ppoint, {1,0,0}, "set"); } if(len(nunvisited(@ptnum))<1){ moveback(@ptnum); }else{ movefor(@ptnum); }
-
@Librarian haha, till now, i never thought about joining a japanese forum. But it is exactly what i was looking for. thx @sebkaine you are probably right with your supposition on my ref. Im going to try the reversed cache method as well.
- 8 replies
-
- reassemble
- brick
-
(and 1 more)
Tagged with:
-
@Librarian first things first i destroyed the wall by a rbd sim. After that i created a pointcloud wich is transferring its "active" attribute to the wall. Than I created some forces in the reassemble dopnet. Im controlling the forces by ramps wich are connected to the distance of startpos to targetpos. Thats my setup. my reference is:
- 8 replies
-
- reassemble
- brick
-
(and 1 more)
Tagged with:
-
thanks to all, i will give it a try.
- 8 replies
-
- reassemble
- brick
-
(and 1 more)
Tagged with:
-
Hi guys, i am looking for a solution, that same bricks are fighting on some area because they cant reach their target pos or their target rotation. They try to reach the target pos and rotation but they are preventing each other. Are there any Ideas on how i could fix this without loosing collision?
- 8 replies
-
- reassemble
- brick
-
(and 1 more)
Tagged with:
-
so you want to change the color because of their distance to each other? In that case you, should try the nearpoints function. here is an example: nearpoints in dopnet.hipnc
-
Reference Attribute to Parameter in DOP
Varaya replied to Varaya's topic in General Houdini Questions
good to know. thanks -
i tried to have an Attribute value driving a Parameter. It just dont work. I need an Attribute from a Point. dop channel issue.hipnc
-
what do you try to achieve? after assembly, you only have two point.
-
@Librarian I will. Thank you very much!
-
@Librarian your code is pretty helpful i think. But can you share your node setup, so i can view the code in context? Im not experienced enough to get it work. Thank you
-
@Librarian thx for your visual reply. I created a scene file, wich is representing and explaining the situation. example_scene.hipnc
-
Render transparent background in arnold
Varaya replied to edversicherung's topic in General Houdini Questions
make sure that you save your image as .png or exr. A .jpg for example is not able to store an alpha channel. If you want to save out multiple render passes, you need to save out you image as exr. Exr is the most common Image type to save out multiple passes. In your case the background should be transperant by default. just make sure you added the right filename extension when you save out your png or exr. -
Is it possible to access primintrinsics in dops? I have Geometry wich is transformed by a sim. For the second rbd sim i want to make the geometry look at a particular direction. For example to its original direction. So I deleted all Attributes from the first sim to prevent side effects and connected it in to the second sim. To make it look to a direction i want to use the poplookat node (target is direction) in dops. I enabled VEXpression. This is my VEXpression setup: target = {1,0,0}; refdir = v@xdir; up = {0,1,0}; refup = v@ydir; Now i need the original X direction and the Y direction from my Geo. I could convert the primintrinsic "transform" matrix to the directions, but somehow it is not possible to do that in dops. is there any solution?