0
$\begingroup$

Okay this is a somewhat complex one but basically I want to set up a transformation effect similar to that seen in the mid 00s Cartoon Danny Phantom. For those who were born either too late or too early to have seen the show the effect in question is that the protagonist manifests a ring of light around his waist which splits in half, one travelling up his body, one travelling down, and where the ring has passed allows the character to transform between his hero and civilian form ...

enter image description here

Now using Geometry nodes I have set up the basic concept of how the rings would manifest enter image description here

Since it is hard to see the node tree essentially it is a mesh primative cylinder, utilizing a bounding box to set the radius and height, with map ranges to transition the rings from 0 to the bounding box value and color ramps affording more control, allowing me to drive the entire effect from a single slider, so the cylinder grows to it's full radius and then grows to encompass the mesh, currently a cub for reference. The cylinder is then converted to rings by deleting the side faces, converting the remaining faces to curves and back to mesh, using a curve circle with another map range/color ramp combo to set it up that the rings grow to their full thickness as they grow to their full radius, then shrink back to nothing by the time it reaches their full height. The end portion is a merge by distance and delete geometry, the latter powered by an edge neighbors node so that, when unneeded, the rings are deleted.

For reference here is the effect with the section converting the cylinder to rings muted. enter image description here

Now the part that I am asking for help for; Right now what I have rigged up is simply the rings forming and washing over a mesh. What I want is to rig up a transition in which if the mesh, which would be a character with additional mesh such a clothes and hair, would switch between two shaders depending on whether the mesh is inside the cylinder or outside. Now I am aware that I could just rig it up with a set of boolean nodes, one to difference and one to intersection, with one character set up to colour scheme A and one set up to Colour scheme B.

However if possible I would like to achieve an effect similar to what is seen at around the 12:04 mark of this video: https://www.youtube.com/watch?v=zHkLN0QT7as&t=777s in which the transition iteslf is masked by a band of an emission texture on the mesh itself.

Personally I am stumped so I figure I'll ask for help.

For the record the final transition would be controlled by a driver run by a custom property a major bone in the rig so if the solution requires separate node trees and objects it'll work since I can slave all the trees to the same driver.

$\endgroup$

3 Answers 3

2
$\begingroup$

version 01

Reference transformation happens at circle edge, depends on viewer position. And looks similar to portal effect - object seen above and inside a circle is green, everything seen between and through circle will be pink.

enter image description here

This example is a trick set by Light Path node > Transmission as factor for mixing two shaders.

Shader Object enter image description here

To make it possible object contains a Cylinder (side only) - everything seen through cylinder side is pink. Cylinder uses Glass material, but since IOR is zero and Camera Ray is set to be transparent, it is invisible to viewer, but taken into account by Cube shader.

Shader Cylinder enter image description here

Geometry nodes generates glowing Circles and invisible Cylinder scaled in sync with circles by single parameter.

enter image description here

version 02

Your link to the tutorial generates an edge at place circle "cuts" an object. So doesn't matter at what direction viewer observe the object, a transition happens at circle level.

Here is a shader controlled by value from GeoNodes, but it can be set in shader as driver as well.

enter image description here

enter image description here

enter image description here

Note: This concept seems to me almost the same as your answer ... I just at the beginning tried many ways to transfer attribute from one object to another object with shader, but all failed because it seems an object (using the shader) has to be a part of that geo-node tree. Thanks to Kuboå for his answer to let me know.

$\endgroup$
7
  • $\begingroup$ Yes, the original tutorial is a single gradient travelling in a single direction,which obviously I know how to make (because of the tutorial), whereas what I am looking for is indeed the effect in the second image, where the gradient travels in two directions along the character;s Z axis from a central point. $\endgroup$
    – medafan53
    Jan 9 at 13:19
  • $\begingroup$ My first image is a way of Phantom transition (not tutorial) ... I'm asking what should be seen through the circle, because Phantom's circle hole style never display transition edge at object surface, it is always hidden by circle line. You see a part of green cube that is bellow hypothetical circle surface cut (seen at second image). Phantom transition edge depends at viewer position. $\endgroup$
    – vklidu
    Jan 9 at 14:06
  • $\begingroup$ What I had in mind was the second image. It's true that the first one is closer to how it is in the show, but I feel that the latter looks cooler. $\endgroup$
    – medafan53
    Jan 9 at 15:10
  • $\begingroup$ OK ... just what do you expect from object transition edge? For objects differing more in shape - How this part of mesh should looks like? if sharp, than weird flat cut appears at some areas, for blended surface transition some topology match will be required ... or some fogy glowing bubbling? :) $\endgroup$
    – vklidu
    Jan 9 at 15:39
  • $\begingroup$ The best I can tell what I need to do is set some sort of vector attribute that produces the same effect as the object domain of the texture co-ordinate. However I cannot figure out how to achieve this attribute. I have tried plugging in the store named attribute to either a position or normal input but it will not achieve the desired result. If you, or anyone else, has any suggestions they would be greatly appreciated. $\endgroup$
    – medafan53
    Jan 11 at 18:31
0
$\begingroup$

Okay, I have achived what I consider an acceptable effect within geometry nodes. I would note that this requires a high poly mesh, which works for my project, if you want to repeat this effect on a lower poly mesh, you'll need to look elsewhere. Also it does not repeat the emission effect as seen in the above answer in shader nodes, however it includes a mesh mask which shares the emission material of the rings, producing a similar effect, if not better due to appearing as a wave of energy washing over the mesh.As a note, the masking technique would also work using the boolean trick if you want to attempt this effect on a low poly mesh.

Now first the actual transition. enter image description here

The transition itself is actually fairly simple all things considered. Plug the base cylinder into a Raycast node. Into the ray direction plug a normal node, and then zero out the Z value, I achieved this by plugging in a separate XYZ and a Combine XYZ and just leave the Z value unhooked Then use the Is Hit value to drive the actual transition, I have achieved this by plugging in a boolean math node set to NOT, then plug that into a Switch node, which I have set to float with true as 1 and false as 0 then plugged that into a colour ramp. In order to drive the material transition you need to plug in a store named attribute set to colour and face. Using the colour domain of the attribute node in the shader editor you can drive a mix shader or a mix node, depending on the effect change you a looking for.

Now obviously this leaves a fairly jagged result so we need to mask it;

enter image description here

Now what you can't see is what's being plugged into those two extrude nodes. What you need to do is delete the sides of the cylinder, as seen above to make the rings You then plug the result into one extrude node but also plug it into a flip faces node and then plug that into the other extrude node, so you have 2 smaller cylinders covering the transition. Use join geometry and merge by distance to make them whole meshes, don't know if it's needed but better safe than sorry.

Now you need the base mesh plugged into a bounding box, with the min and max plugged into the min and max of a Volume cube.Then after this you need two geometry proximity nodes, one connected to the base mesh, and one into the above solidified discs, then plug their distance domains into colour ramps set up the way you see in the diagram or play around 'till you get to the effect you want. then plug them into a mix node set to colour and multiply with the factor set to 1.

If you do it in this way and then turn the cylinder's radius and height to zero however then the entire base mesh becomes covered with the volume. to get around this plug the disks' colour ramp result into another mix colour set to mix, set the second value to black, and rig the factor to the same colour ramp controlling the map range that controls the cylinder radius, and rig it up as seen on the picture.

After that plug in a volume to mesh, use shade smooth to tidy it a bit and apply a texture (in my case an emissive volume) and you're done!

$\endgroup$
0
$\begingroup$

Okay I have found a way to pull off the first answer's effect with Geometry Nodes, it doesn't need a high density mesh, it does need an empty object, but it merely has to be there. enter image description here

Okay, the cylinder needs a depth of 0 and you need to place the empty at the origin point of the object, which is where the cylinder will spawn. You need to delete the middle as I have shown before, then use separate the remaining disks of the cylinder into two separate items. After this you plug each disk into a Transform node, and plug all three vector outputs on the object info node into the 3 vector inputs of the transform nodes. however then you need to throw in a Combine XYZ node and put a value into the Z input; for this example it is just a Value node, but to get the full effect you just need to pull off the bounding box technique I used in the question example to plug into the cylinder depth and divide it by two.

Now on the string connecting the object info location to one transform node you will want to plug a vector math set to add, and plug the combine XYZ into it, then put a vector math node into the connection between object info location and the other transform node, set to subtract, so the two disks will slide in opposite directions away from the empty. Now whatever you plug into the combine XYZ you also need to plug into a store named attribute node set to float.

From there you need to jump into the shader tree. From there put together vklidu's node tree, except with a single texture coordinate, separate XYZ combo. Then repeat the add/subtract trick with regular math nodes and the previously set up atribute between the Separate XYZ and the map ranges.

Please note that the initial setup will not align the rings correctly if you rotate the empty, however leaving the rotation and scale unconnected on the initial transform node and plugging them into a second one after the displacement effect.

enter image description here

Edited to add:

Okay now the wayI have plugged in the Object into the geometry nodes allows you to rotate the empty will rotate the rings, allowing for more dynamic transitions. However this was messing with the effect and the whole bounding box effect required tweaking to allow for this;

enter image description here

Before plugging the base mesh into the bounding box plug it into a transform node. From there plug the rotation and scale factor from the empty's object info node. on the string for the rotation input add a vector math node set to scale with a factor of -1, on the scale string plug in a Vector math node set to divide, plugging the empty's scale into the second vector option and set the first one to 1. The second transform node is to allow for an additional buffer zone, just in case you want it.

For simplicity's sake i subtracted the min from max in a vector math, then plugged that into a separate XYZ and. well you see what I did,. follow the diagram.

As a result of the transform node, the sample mesh from which the bounding box is generated will be aligned as though the node tree's host's Local XYZ (from which the bounding box is generated) is aligned to the normal XYZ and the rings will therefore resize to fit regardless of how the figure is arranged. Scale is completely nullified.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .