Jump to content

orient and copy


sschoellhammer

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

Link to comment
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

Link to comment
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.

Link to comment
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
Link to comment
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

Link to comment
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
Link to comment
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?

Link to comment
Share on other sites

  • 3 weeks later...

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.

Guest
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...