Community
Arnold for 3ds Max
Rendering with Arnold in 3ds Max using the MaxtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

aiImage - crash when adjusting Uvcoords in Maya

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
Anonymous
1178 Views, 13 Replies

aiImage - crash when adjusting Uvcoords in Maya

Maya crashes every time I use the aiImage node. The crash happens when I modify the Uvcoord values on the fly.

Here I have a simple scene with two nodes: aiImage and plusMinusAverage. I connect the Output X/Y to Uvcoord X/Y respectively. When I modify the values in the plusMinusAverage node, Maya crashes.

647-capture.png

I have also tested multiplyDivide, luminance and condition. All of these nodes will cause Maya to crash when connected to aiImage and the values are adjusted on the fly.

I am using Maya 2017 and MtoA 2.0.2.2.

Is this a bug? Has it been solved in the latest version? Is there another node that could be used to remap Uvcoord values? I have tried remapping Uvcoords using the standard maya file node. It works in the viewport, but it doesn't seem to have any effect in the Arnold render.

PS. What is the best place to report potential bugs in Arnold like these?

Tags (1)
Labels (1)
13 REPLIES 13
Message 2 of 14
Stephen.Blair
in reply to: Anonymous

It's repro with 2017 Update 4, but not with Maya 2018.1 and MtoA 2.1.0.1
Crashes in the Maya MPlug api


How about using aiUVTransform?



// Stephen Blair
// Arnold Renderer Support
Message 3 of 14
Anonymous
in reply to: Anonymous

Thanks @Stephen Blair

In regards to aiUVTransform...

I have just looked into it again, but I don't see a Uvcoord input on that node. It seems to allows me to modify the UV values (scale, rotate, translate, etc.) but it doesn't allow me to "pass the values" from another node into that one in a straight one-to-one way.

My goal is to use the red/green values of one image to drive the U/V coordinates of the second image (in the same way to using UV passes in compositing).

In my testing...

The aiImage node does what I want, but crashes often.

The standard Maya file node works in the viewport, but doesn't show the UV transformations at render time.

My goal...

To find a solution that would allow me to A) use a red/green values of one image to remap the values of another image and B) have the Uvcoord transformation visible in the Arnold render.

Message 4 of 14
madsd
in reply to: Anonymous

If your final goal is to use R&G data to drive UV, you first want to convert it to vector space, a constant bias scale from 0-1 -> -1 to 1 ( or range node with the 2 sets set to 0 & 1 and -1 & 1 ). You then add in the default uv channel, adding them up and pipe it to some bitmaps UV.

You can see the waves goes in all 4 directions here driven by the RG bitmap that has the normalized color 128.128.0 and then the 4 directions.

https://imgur.com/S7Qm3eG

The map it self was drawn in a vector paint app where the different colors represent different directions.

I suppose you can decifer my node setup, the nodes them self should be identical to Maya as well as overall hirachy of nodes. ( after all we all use Arnold, and what works in host A always work in host B, provided we work with Arnold shader nodes. Infact, I have all the Arnold Maya nodes in 3ds max as well, Those shaders are host independant...nice. ) You can also implement time as a factor and displace the time for interesting results. Melting lava, rivers running, whatever of that nature.

Most important aspect is not how to wire it up but to understand we want to ADD 2 uvs, 1 is base and other one is our "tweak" input and that it is important to move the center of the RG map down to 0.

648-2017-12-28-00-19-04.jpg

649-2017-12-28-00-18-27.jpg

Message 5 of 14
Anonymous
in reply to: Anonymous

Thanks so much for your thoughts and node setup @Mads Drøschler.

The effect you have is quite interesting and I would like to know more about how to reconstruct this in Maya and Arnold, but I am questioning whether it will be possible to achieve the effect because at the end of your node chain, the Uvcoord input is what is giving me problems.

I'll try to walk through my process and show you the results I intend to achieve, so I will take my first post a little bit further. In this example I have two textures, IMAGE and UVMAP.

IMAGE650-lines-64.jpg

UVMAP

651-mars-hexagon05.jpg

When the R and G channels of the UVMAP are used as UVcoords, this is the result in the viewport.

652-uvcoord-viewport-result.jpg

Here is the node graph (UVMAP output R and G to IMAGE input Uvcoord)

653-uvcoord-node-graph.jpg

However, when I connect the result to an Arnold shader, the Arnold render looks like this.

654-uvcoord-arnold-result.jpg

There seems to be a problem with the way Arnold works with the default file node, since it doesn't recognize the Uvcoord info. So then I tried the aiImage node. It does what I want, but it crashes often.

My goal is to design a series of shapes as UVMAP images, like these...

https://imgur.com/a/9MUqm

And to use them to distort various image textures. This approach will allow me to animate the offset on the texture and get interesting effects, like this...

https://streamable.com/1peyo

This is similar to your experiment @Mads Drøschler with the water, but the UV distortion in my example is more geometric and I would like to find a way to develop a style of patterns using these UVMAPs to create tiling and animated textures.

Happy to hear your thoughts on this @Stephen Blair.

Message 6 of 14
madsd
in reply to: Anonymous

If you have problems with stability on a certain node. Construct a case that can break every time and show. Since it's just a basic node and a normal input ( uv coords ) it should be working, with zero crashes, all the time.
I just saw it's a known issue, I guess you can install 2018 as a temp solution till it gets fixed.

Else you can reroute the entire UV to a UV transform node as a passthrough, see if that stabalizes anything. Pulling the stuff out of the image node it self and handle it seperatly.

Regarding the actual case.
I took your images and rendered the output you seek.

As I mentioned in first post, you want to make an ADD, between the default planes UV ( untampered ) with your maya default texture coord node ( max/maya node is called different but the functionality is the same ) - and then the UV map you painted.

Sourcing the combined result to the material.
And then I get what you want.

656-2017-12-28-12-06-15.jpg

Message 7 of 14
madsd
in reply to: Anonymous

Here is another approach.

Since I can load all the Maya nodes directly in max, I tried to bypass the need for Arnolds Image node.
This seems to work with a bit of rerouting.
You should get an identical result in Maya, since I use the maya samplerinfo2D node set to uvCoords, and use UV transform and ADD. You just load the 2 bitmaps with your default maya bitmap loader and skip the Arnold image node entirely, and as I mentioned in the post above, source it all to the UV transform node.

657-2017-12-28-12-59-30.jpg

Message 8 of 14
Anonymous
in reply to: Anonymous

@Mads Drøschler your technique using the samplerinfo and Add Node connected to the aiUVTransform works great. It works with Arnold and there are no crashes. Here is my node setup in Maya.

659-uvcoord-aiuvtransform.jpg

I am having a hard time understanding the math behind the transformation on the Translate Frame input. I understand that the samplerinfo output Uv Coords is basically the same thing as two gradients in X and Y (in the Red and Green channels) like this.

660-sampler-info.jpg

This image has a range from 0-1 in Red and Green.

However, when you connect this image to the Translate Frame input on the aiUVTransform, the frame looks like it is translated a lot more than 1 unit.

For example, when I connect the above texture to the Translate Frame input and blend it on and off, it looks like the texture "scales" a lot more than 1 unit. Here is a video.

https://streamable.com/rgxf8

If you have any information that talks about the math happening with the Translate Frame input, I would be curious to know more about how it works.

Message 9 of 14
madsd
in reply to: Anonymous

The Pivot is the spwan point for scale and rotation.

Try raise the second input on the pivot_frame, then rotate, the higher, the more offset the center of the circle the frame rotates around becomes.

It looks like there is an exponential factor driving it, so you can try implement a reverse function before a value to counter it.

Message 10 of 14
Anonymous
in reply to: Anonymous

@Mads Drøschler, I spent some time experimenting with different settings on the aiUVTransform node, modifying the pivot, repeat, translate, etc. and I managed to find a procedure that makes sense and allows me to position the texture as I like.

I have one minor issue and I was wondering if you can suggest a way to solve it. I'm using this tiling texture.

667-curls-01-tile-07matid-01.jpg

And this UVMap.

668-uv-transition-warp05.jpg

However, I'm getting a very thin seam around the edge of the geometry in the Arnold render.

669-aiuvtransform-seam.jpg

Seam

670-aiuvtransform-seam-closeup.jpg

This is the geometry

671-aiuvtransform-seam-geo.jpg

This is the node graph.

https://imgur.com/a/jk7jN

And these are the aiUVTransform settings.

https://imgur.com/a/RvSEo

I was wondering whether you can suggest a method to eliminate the seam. I found that changing the filter settings helped a bit (from quadratic to none), but the ideal would be to "erode" the edge a few pixels. I can also fix the problem by changing the UV layout, but this is not an acceptable long-term solution because for other shapes (like the hexagon) changing the UV layout does not fix the seam.

@Stephen Blair and @Mads Drøschler I wanted to share some of my results with you guys and get some feedback. My goal is to build a library of animated shapes and textures and then combine them in different ways to create characters or morphing "psychedelic" objects. I am doing a lot of this work "by hand" and I was wondering whether you guys might be able to suggest some alternate procedural techniques that would speed up my process.

I was inspired by this image by illustrator Louis Wain from the early 1900's.

https://i.pinimg.com/originals/c8/17/f1/c817f1be797c5de0e51f30f86f9d0b63.jpg

And here is a rough layout I did of that illustration using image cards with animation on the UV Transform translate frame.

https://streamable.com/fs5si

I wanted to continue adding detail in the textures (using displacement maps and colour mattes) and try to make a "real-life" 3D version of the original illustration.

Here are some of the textures I have made in my experimentation. This is an animated displacement map with UVMap distortion on the opacity channel to create "rippling" effect.

https://streamable.com/bv2cz

And here is one with an additional layer of animated lines moving on the surface.

https://streamable.com/w2nlz

And my goal was to use these textures to create different kinds of creatures, or "beings" built from many intricate moving patterns. I really enjoy working with these UV Maps because they allow me to have many layers of moving details nested one inside the other.

Do you have any ideas on tools to try, possible approaches using Arnold, other techniques or interesting reference material? All feedback is welcome!

Message 11 of 14
Anonymous
in reply to: Anonymous

Hi
This is really cool, what if you put a setRange at the end of the chain, between aiUvTransform and your shader, with Min value to -2.
Normally the seam disapear

Message 12 of 14
Anonymous
in reply to: Anonymous

Thanks for the recommendation @rachid Hadj Abderrahmane. I tried adding a setRange node but I wasn't able to get rid of the seam, only move it around (in the same way as playing with the scale/repeat attributes).

I uploaded the scene files if anyone is interested in having a look. This was made in Maya 2017 with Arnold 2.0.2.2.

https://mega.nz/#!tct2wLpT!woaWBd-Fa8hCwW--z9-VvOOXBcer5cam1zvHCOUsyyE

Message 13 of 14
Anonymous
in reply to: Anonymous

Hi David
I tried your scene, but nothing seem to work. The Repeat/Scale parameter has no effect! something do not fit correctly in your setup
Here what I get with setRange, the seam is clean at 0-180-360 degre, but appear the rest of rotation.

675-render.jpg

and here the setup

676-setup.jpg

Message 14 of 14
Anonymous
in reply to: Anonymous

@rachid Hadj Abderrahmane I see that you are putting the setRange on the out color at the end of the chain. This approach works, it seems to get rid of the seam, but I don't think this will be possible in all cases since I don't want to mess with the color information. It would be better to use this approach to create a "mask" and then connect it to the opacity of the shader.

I tried adding a remap ramp before the setRange. Playing with the black and white values appears to "erode" the seam and create a cutoff threshold.

Here is my node graph.

679-aiuvtransform-seam-node-graph-02.jpg

Here you can see the effect when you modify the range.

https://streamable.com/xcm7t

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

Post to forums  

Autodesk Design & Make Report