Jump to content
sschoellhammer

orient and copy

Recommended Posts

Hello,

another beginner question ahead..

I want to scatter curves on the surface of my hippo so they conform to the surface. I'm creating the orient attribute like this:

float randomRotationScale = ch("randomRotation");
float randomRotation = rand(@ptnum) * 3.14 * randomRotationScale;
@orient = quaternion(randomRotation, @N);

but it's not really doing what I want. I've attached an image and the hip file. 

It's something so straightforward I feel I miss something pretty basic :blush:

seb

hippo.JPG

felt.hiplc

Share this post


Link to post
Share on other sites

Is this what you were after?

felt_v2.JPG

I added two approaches.. one is using the orient attribute, and the other one is using an N and Up for orientation, with the addition of a custom randrot for randomly stamped rotations similar to what Atom has posted above.

I hope this helps!

H15.5.607 Indie

felt_v2.hiplc

  • Like 1

Share this post


Link to post
Share on other sites

I am a newbie,but know,you can also grow hair by pop.
And i have a question,why you did't use volume trail?
Is this heavyweight variant?

 

felt_v2.hiplc

Edited by Iskander
  • Like 2

Share this post


Link to post
Share on other sites

Hello all,

thanks so much for the many, quick replies! The pop way is interesting too Iskander :D

It seems stamping the rotation seems to be the way to go for me!

galagast: I actually wanted to have them sit parallel to the surface. That's also why I don't use fur, I want it to look like lots of hairs layered ontop of each other like this:


green-felt-texture-closeup-surface-backg

When I lay them flat I get those funny patterns like in the attachment, I don't quiet understand why they are so visible as there is random rotation on the curves..

I might just layer another shell ontop but still curious!

seb

 

hippo2.JPG

Share this post


Link to post
Share on other sites

its just a way to initialize Normals, from vertice positions relative to its neighbours.
Alternatively, you could put down a "Facet" node and enable "post compute normals"

You can also say

@N = {0,0,1};

This will assign normals, but all facing the same way.

 

also note that if the object already has normals, @N = @N will just keep the normals as they are, rather than re-initializing them.

Share this post


Link to post
Share on other sites

You could probably do a couple of things:

  • Add a bit more randomness to the randrot seeding.. currently it is set to only range from 0 to 360, instead of maybe -360 to 360.
  • Stamp in a couple of other random values, maybe for other rotation axes.
  • You could also add other strand curve variations, just use a Switch SOP to randomly pick one for the Copy.

@N = @N; // Yep, as Twan mentioned, it's for initializing the normals :)

  • Like 1

Share this post


Link to post
Share on other sites

Thanks!!

OK, I was confused because there is a normal sop and also a normal attribute coming from it - and yet if I comment out that line @N=@N the result is different (as in wrong). 
AHA my normal sop was working on vertices.. got it! :)

Now I have another problem :P I created a for loop to create a number of different curve shells and I'm using the iteration detail attribute to modify them. 

I'm using it it in the peak node like this (for the height):
detail('../foreach_begin1_metadata1', 'iteration', 0) * 0.2  + 0.2
to offset each shell a little and that seems to work just fine.

but when I use it in the wrangle like so:

int it = detail('../foreach_begin1_metadata1', 'iteration', 0);
@randrot = random(@ptnum + ch("seed") + it*10000 ) * 360;

but now it seems to be just 0 all the time.. 

By the way I'm now randomizing the up vector which brings some joy but I think I still need the layers..

Added the file again, thanks so much for looking!

seb

 

 

felt2.hiplc

Share this post


Link to post
Share on other sites

Cool, glad you got the randomization going :)

I'm not sure why that doesn't work.. I usually add a spare parameter to the Wrangle Sop and place the detail function there..

Here's a link to other methods for dealing with that problem.

 

  • Like 1

Share this post


Link to post
Share on other sites

Getting somewhere :))

Sadly blue screen of death while rendering, haven't saved the scene for 2 hours and my otl doesn't seem to load anymore, sigh.
( I had created an asset for the felt/fur and had been saving it continuously) 
Does anybody know what the problem there might be? User error?

Next thing I'll do is this I guess:

 

hippo.png

 

Here is the error I get when loading the library:

Capture.JPG

Edited by sschoellhammer
  • Like 1

Share this post


Link to post
Share on other sites

Looking great Sebastian! I like it a lot.

Autosave: Ah yes, I have that turned on by default as well. A life-saver indeed.

OTL Error: Sadly, I haven't encountered that error yet.. Have you checked the actual folder where your otl is saved? Is it really there?

Share this post


Link to post
Share on other sites

Glad you like :) 

this is the file, maybe it's corrupted? It just saved normally without problems. I saw that usually houdini makes a backup but there are no backups for a while so maybe something was off... mh

Well, doing it again I'll remember better I suppose :P

Sebastian_felthair.hdalc

Share this post


Link to post
Share on other sites

Just letting you know, I'm also unable to install the hdalc.. It must be corrupted.

 

Share this post


Link to post
Share on other sites

The felt looks great! You mentioned that you redid it, did your workflow for creating it change at all?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×