Community
Arnold for Maya Forum
Rendering with Arnold in Maya using the MtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Volume Displacement issue in 3ds max

18 REPLIES 18
Reply
Message 1 of 19
hyperviktor
543 Views, 18 Replies

Volume Displacement issue in 3ds max

I am playing with volume displacement / geometry to volume and have this problem :

I am using a simple cube and instead of getting a similar result through the volume the displacement leaves one side of the cube smooth and sort of directed towards the other side of the object.

3874-vol-disp-cube.jpg

Any help / ide would be useful. I need this sorted ASAP, thanks.

18 REPLIES 18
Message 2 of 19
aaronfross
in reply to: hyperviktor

Did you increase the Bounds Padding in the Arnold Properties Modifier?

Message 3 of 19
madsd
in reply to: hyperviktor

Looks like a missing constant bias scale. The vector space on your model sits between 0-1, try move the space to -1 to 1 and see if that improves things. Use an OSL node or an Arnold range node.

Message 4 of 19
hyperviktor
in reply to: hyperviktor

Yep, it seems like a coordinate issue, although not sure what values work as with -1 1 the flat part just happens somewhere else. Is there a way to tell the values passed between the nodes ?

Message 5 of 19
madsd
in reply to: hyperviktor

Sanity check:
Try compile this OSL curl noise.Set the uv space to "object" - and scale the actual uv down to get a finer grid.

If it works, then the noise you use is for sure bound to a bogus coord space.

3883-qwe.png

vector snoiseVec3( vector x )
{
  float s  = snoise(vector( x ));
  float s1 = snoise(vector( x[1] - 155.1 , x[2] + 33.4 , x[0] + 47.2 ));
  float s2 = snoise(vector( x[2] + 884.2 , x[0] - 124.5 , x[1] + 99.4 ));
  vector c = vector( s , s1 , s2 );
  return c;
}
vector curlNoise( vector p ){
  float e = .1;
  vector dx = vector( e   , 0.0 , 0.0 );
  vector dy = vector( 0.0 , e   , 0.0 );
  vector dz = vector( 0.0 , 0.0 , e   );
  vector p_x0 = snoiseVec3( p - dx );
  vector p_x1 = snoiseVec3( p + dx );
  vector p_y0 = snoiseVec3( p - dy );
  vector p_y1 = snoiseVec3( p + dy );
  vector p_z0 = snoiseVec3( p - dz );
  vector p_z1 = snoiseVec3( p + dz );
  float x = p_y1[2] - p_y0[2] - p_z1[1] + p_z0[1];
  float y = p_z1[0] - p_z0[0] - p_x1[2] + p_x0[2];
  float z = p_x1[1] - p_x0[1] - p_y1[0] + p_y0[0];
  float divisor = .1 / ( 1.0 * e );
  return normalize( vector( x , y , z ) * divisor );
}
shader curl
(
	point Po = P,
	output vector Out = 0,
)
{
	vector uv = Po;
	vector Curl = curlNoise(Po);
	Out = Curl;
}
Message 6 of 19
hyperviktor
in reply to: hyperviktor

The result seems to be similar to your render

3890-noise-test.jpg

.

I was using the Arnold noises ( noise and cell noise ) with range node, It sort of seems to be working but something still feels weird, some edges remain sharp(ish ) and in some places the noise eats into them much more.

Message 7 of 19
madsd
in reply to: hyperviktor

Just tried the legacy noise.
Works fine.

Makes me wonder if you scale things unintentionally in your shader chain?

Did you crank Amplitude or something? That will throw it out of sync 4sure.

3893-qweqwe.png

Message 8 of 19
hyperviktor
in reply to: hyperviktor

ar-volum-v5-01.zip

I wouldn't think so, here's the scene file.

As soon as I go back to cell noise I got flat sides on the cube.

Message 9 of 19
aaronfross
in reply to: hyperviktor

Like I said, did you increase the Padding in the Arnold Modifier? I downloaded your scene, increased Padding to a value of 1.0 and it appeared to render correctly.

Message 10 of 19
aaronfross
in reply to: hyperviktor

Here's the scene file and rendering

3900-padding-10.png


padding-10.pngar-volum-v6.zip

Message 11 of 19
aaronfross
in reply to: hyperviktor

And here's a version with Cell Amplitude increased to 5.0, and Padding also increased to 5.0

3901-padding-50.png

3902-padding-50-screencap.png

ar-volum-v7.zip

Message 12 of 19
hyperviktor
in reply to: hyperviktor

That's pretty pointless, the box is all over the place, padding seems to shift it in space.

The outer edges of the geometry should not change, just holes should appear throughout.

This is just a test scene, I will use very small fine noise so the padding was definitely fine or could even be lower.

I need the geometry to stay where it is and the outer surface not to change at all.

Message 13 of 19
madsd
in reply to: hyperviktor

You may expect something that is not possible when converting a box into a volume. There are no density fields as in VDB files from houdini that have had density computed in seperate channels.
The result will be entirely different.
Not entirely sure I understand what you want as an end result. I dont mean technically I mean final results.

Message 14 of 19
hyperviktor
in reply to: hyperviktor

Think about a sponge - the outer surface is smooth but it has holes throughout. I want to keep the shape of the original geometry but I want to have holes through the volume. Is this maybe the wrong approach ?

Message 15 of 19
madsd
in reply to: hyperviktor

If that is what you want, try look at one of the screenshots, displacement is not the only slot to use to achieve booleans. You need density scatter and so on, displacement wont cut it for that.

Message 16 of 19
hyperviktor
in reply to: hyperviktor

Seems like density is the solution, thanks for the good advice ! Works perfectly as expected and it's just what I needed !

I was just looking at the wrong solution, now even the rendertime is much much better !

Message 17 of 19
aaronfross
in reply to: hyperviktor

"That's pretty pointless, the box is all over the place, padding seems to shift it in space."

I think you misunderstand how 3D displacement works. A 3D texture will displace a volume or surface in all directions, inward and outward. Increasing the Padding prevents the volume or surface from being improperly chopped off.

I'm glad you found the solution by varying the Density channel. However, my answer was not pointless, it was the correct answer. You just asked the wrong question.

Message 18 of 19
hyperviktor
in reply to: hyperviktor

Well not really, the whole object was displaced in a single direction, not in all directions.

Message 19 of 19
aaronfross
in reply to: hyperviktor

"Well not really, the whole object was displaced in a single direction, not in all directions."

The volume is being pushed in all directions. But because the Padding was set too low, the outward displacement was being chopped off. The directional offset you saw is probably due to a low frequency component of the texture. If the size of the displacement texture is larger than the object itself, this will look like an offset.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report