Jump to content

Trouble with using the Wedge node


Recommended Posts

What I need to do is render the same frame over and over again, BUT with another sim file.

What I did so far: Use the Wedge node in the OUT context to export one frame of a simulation. This simulation has been executed each time with a different seed, so that the particles were influenced by the same forces, but with  a slightly different end position.

What I need to do now is reload each sim file on the same frame, render it and save it to disk. So far I can't get H to evaluate the File node in a proper way. I want to alter the name of the file with the help of the $WEDGENUM variable, but it doesn't evaluate it correctly. Any ideas what's going wrong?



P.S.: Screenshots 1+2 show the File load node, Screenshot 3 the Wedge node. The channel is set to the file name path.




Link to comment
Share on other sites

It sounds like you want to be using the File Merge node instead of the File node.

The expression stays similar to what you have, but you must define the merge variable that contains your wedge number.

Example screenshot below.


Link to comment
Share on other sites

THanks for the tip. But the problem remains. The file path doesn't evaluate correctly. The SL'ICE variable should in this case be an integer between 1 and 4. Why don't the evaluation brackets work in this case. I guess that's for the same reason why it didn't work before.



Link to comment
Share on other sites

Mmmh. But then the math wouldn't evaluate at all?

I though tried to work with your idea that this might be a string and therefore the calculation doesn't work.

So I tried something I found in another thread, but it doesn't work either.

Very annoying.....

Strange that the first ` ` evaluates to nothing, while the second just prints what's inside the ` `.



Edited by Pancho
Link to comment
Share on other sites

A drawback of the $SLICE variable is that it wont show you the evaluated string in the file path at the top level. If you dive inside the asset you'll see that there is a foreach loop with another file node inside. It's this file node that's loading your files and if you take a look there you can see the python code that runs your script. The string isn't expanded until this python code is run.

The variable will work just fine within backticks so that's not an issue.

Your original expression should be evaluating to something. Is there maybe some frame padding on your file numbers that the expression isn't accounting for?filemerge.PNG


Edited by Gavin
Link to comment
Share on other sites

I believe in the File Merge node, you should change your Merge Variable to be WEDGENUM to keep the naming consistent, then you can merge based on your WEDGENUM in your filepath. The File Merge is going to try to replace every instance of your Merge Variable with the values in the Merge Range (start to end by increment). So your starting value should be your lowest seed value and the end value should be your highest seed value (not 1 and 1 as yours are now :P ). Then just make sure to set Missing Files to No Geometry so it doesnt error out for inevitable missing files in the range from start value to end value.


I just tested this with a simple scene: had a cube, sphere, and pyramid written out with a switch controlled by $CLUSTER variable (0=cube, 1=sphere, 2=pyramid). Then I used the File Merge node with Merge Variable set to CLUSTER and read them in with the same variable, setting the Merge Range to (0, 2, 1), and Missing Files to No Geometry -- that way, when I deleted the file where $CLUSTER=1, files 0 and 2 still imported just fine :) So you can see here I just have the cube and pyramid being read in without error. You'll definitely need the same for your particles


Edited by Shalinar
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...