Jump to content

4d Noise Function Into Vops


MADjestic

Recommended Posts

Hi,

I thought about enveloping a gfBmV4D function as a VOP type,

I read this thread http://forums.odforce.net/index.php?showto...p;hl=Outer+Code and found some valuable tips, but still seem to miss something obvious. So here's my code:

Outer Code:

#include <math.h>
#include <gNoise.h>

vector
gfBmV4D(vector p; float rough; int maxoct; float blur; float time)
{
	vector4	  pp = set(p.x, p.y, p.z, time);
	gNOISE_FUNC(vector4, noise(pp), pp *= 2 )
}

and Inner Code:

$var = gfBmV4D($pos, $rough, $maxoct, $blur, $time);

Looks too simple to work, and, in fact, it doesn't. Any from top of the head ideas why it doesn't work?

I thought this VOP Type could be useful with the recent SESI FX Tools, so that to change the default 3d noise VOP for a 4D noise.

Thanks.

Link to comment
Share on other sites

I think I managed to wrap up the code in a single node, VEX code looks all right, doesn't show any errors, however it outputs 0.

I created a simple network showing the case - look inside the D4 Noise VOP for details, or the shaders' VEX Code.

If somebody has time to look inside the attachment - I would be grateful.

Thanks.

func_v05.hipnc

Link to comment
Share on other sites

  • 4 weeks later...
It doesn't look like you have the HDA definition embedded.

Problem solved. $blur was 0 and thus causing 0 output =]

It doesn't look like you have the HDA definition embedded.

Problem solved. $blur was 0 and thus causing 0 output, and some wrong variables types =]

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.

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