PDA

View Full Version : Help with draw on of wireframe



Michael Lizak
04-22-2019, 08:44 AM
A client wants to have a wireframe of a 3D building draw on over 10 seconds. I was wondering if anyone had any ideas how to go about that. I know I can render outlines to get the wireframe, but don't know about the drawing of the lines. In After Effects there is a plugin "Stroke" that allows you to draw on mask paths and was thinking there could be a possibility there. Any help would be appreciated. Thanks.

MonroePoteet
04-22-2019, 09:22 AM
Which version of LW?

mTp

Sensei
04-22-2019, 09:25 AM
Attach weight map to 2 point polygons (lines), with values 1, 2, 3, 4, 5, etc.
Then in Surface Node Editor have Weight Map and Logic node set up which will check if current time/frame is higher than what is in Weight map node, and if so, True/False result is passed to Transparency channel.

In LW 2019 it would be a bit harder: you will have to have two materials regular and Standard with everything disabled, Transparency 100%, which is simulating transparent material. And Material Mixer node taking Alpha from the above Weight map code.

Current time/frame you can get using TrueArt's Node Library
http://www.trueart.eu
using Render Info node or similar node.

Michael Lizak
04-22-2019, 09:54 AM
I'm using LW 2019. Thanks.

Michael Lizak
04-22-2019, 10:13 AM
I'm using LW 2019. Thanks.

Sensei
04-22-2019, 10:20 AM
Ok. I found even easier way in LW 2019. Simply use Clip instead of fake transparent Standard material!

Poly line object has Weight maps set per each 2-point polygon like I described earlier.

Here are screen-shots in couple different frames:
https://forums.newtek.com/attachment.php?attachmentid=144783&d=1555949899
https://forums.newtek.com/attachment.php?attachmentid=144784&d=1555949916
https://forums.newtek.com/attachment.php?attachmentid=144785&d=1555949931

Logic node is set up to Greater Than mode.

Michael Lizak
04-22-2019, 11:10 AM
Sensei, thanks for taking the time to lay that out for me. If they go ahed with the project, I will keep this in mind. I don't do alot of 3D and I find the node editor very confusing. Turning a complex model into 2 point chains is something I have not done before as well. I see the node plugins are $50. How much would you charge to walk me through this, or set up a template to get me going? Thanks.

Sensei
04-22-2019, 11:16 AM
Sensei, thanks for taking the time to lay that out for me. If they go ahed with the project, I will keep this in mind. I don't do alot of 3D and I find the node editor very confusing. Turning a complex model into 2 point chains is something I have not done before as well. I see the node plugins are $50. How much would you charge to walk me through this, or set up a template to get me going? Thanks.

I will make it for free. After all I made you example already. So I can give you it.

Michael Lizak
04-22-2019, 11:20 AM
Wow, thank you. If they decide to go ahead with the project, I'll buy the node plugins. Thanks again for taking the time to help me!

XswampyX
04-22-2019, 11:21 AM
Sensei, thanks for taking the time to lay that out for me. If they go ahed with the project, I will keep this in mind. I don't do alot of 3D and I find the node editor very confusing. Turning a complex model into 2 point chains is something I have not done before as well. I see the node plugins are $50. How much would you charge to walk me through this, or set up a template to get me going? Thanks.

If you still want the model to show then just use the edge shader. Like so.

144786

Michael Lizak
04-23-2019, 08:43 AM
Hey XswampyX , thanks for taking the time. Did you have to do any special prep to the model to have the lines draw on? Sensei spoke of converting to 2 point polys.

Sensei
04-23-2019, 09:50 AM
Hey XswampyX , thanks for taking the time. Did you have to do any special prep to the model to have the lines draw on? Sensei spoke of converting to 2 point polys.

No, you don't have to, if you will use something like this:
144792
but I am receiving some black areas from behind lines.

Conversion of model to 2-point polygon is EASY. You just have to change mode to Edges, select everything, copy, go to new layer, paste. And you have the same object as 2-point polygon cage. Then you have to unweld. And start assigning weight maps to specified lines.

Michael Lizak
04-23-2019, 10:25 AM
Sensei, thanks. These building models that will draw on will have many lines. Will your approach still be practical with a model with 300 lines?

Sensei
04-23-2019, 10:45 AM
Sensei, thanks. These building models that will draw on will have many lines. Will your approach still be practical with a model with 300 lines?

Setting up 300 lines weight map, might be annoying task, it's up to you.
I made Weight Polygon Groups plugin.
It's part of TrueArt's Modeling Pack (which is on Easter Promotion right now).
http://modelingpack.trueart.eu

You should be even able to assign weight maps to millions of lines/polygons with it..
(obviously randomly)
Example video of this tool:

https://www.youtube.com/watch?v=T1DvdkvvfAo
It exactly presents usage that you need: show/hide polygon with different weight map value assigned.

It also presents other my tool Show Weights, that you will need, to see what are weight maps assigned to lines/polygons in Modeler viewport as text.
Without it, you can easily confuse which lines have assigned weight and which don't have assigned yet.

MonroePoteet
04-23-2019, 01:54 PM
I'm not sure of the overall effect you're after, but a technique I've used which might be useful is to determine the Opacity of the Edges based upon the Distance from the Nearest emitted particle to an Object's "spot" (now called Object Position in the Input node for the Edges, which I think is ambiguous / confusing!).

A sample scene is attached:

144793 144794 144795

144796 144797 144798

144799 144800

MOV file: 144801

The Color and Opacity of the Edges are controlled by an Emitter Null, which moves along a path created in Modeler and saved as a Motion Path using the Modeler=>Save=>Export...=>Curve to Motion tool.

In Modeler, I load the original model and create 1um edge polygons using Bevel by:


First - Save as another Object name
In Polygon mode, use double-quote to select all Polygons
Use Bevel to Inset by 1um (1 micrometer)
Press Delete to delete the original selected polygons, leaving the 1um "edges"
Not shown - set the edge polygons to a single Surface, make it 100% Transparent with 1.0 Index of Refraction


To create the path for this animation, I didn't have a specific order I wanted the edges to appear in, so I just:


In Point mode, use double-quote to select all Points
Copy and Paste the points to a new layer
Use Merge Points in Fixed mode with 0.1m, 0.2m, 0.3m through 1 meter to consolidate / reduce the points
Use double-quote again to select all points
Use CTRL-P to create a Curve through all the points


Once the curve is created, use Curve to Motion to save out a Motion Path, save the Object and send to Layout. Here's a video of this setup:


144802

Then, in Layout, create an EmitterNull which drops 10 particles per frame following the Motion Path. The Lifetime is set to 0 so they don't disappear, and the Parent Motion is set to 0.0% so they stick where they are dropped. A video with the Emitter setup:


144803

The Silhouette and Other Edges are set up on the Building object, choosing a 0.4 meter width for the edges (specified as -0.04 in the interface). Finally, the node network is copy-n-pasted from the sample scene and hooked up appropriately. If the Emitter has a different name than EmitterNull, the ParticleInfo node will need to be changed to specify the correct Emitter. Here's that setup video:


144804

and here's an annotated view of the node setup:

144805

You can set up a specific order of how the edges will appear. If, after copy-n-pasting the points to an empty layer, rather than using the basically random point order I chose above using double-quote, you can select the order the edges will appear by holding down SHIFT in Modeler to surround or select the points in the order you want.

The two Gradients in the node network control the distance from the Nearest Particle where the Edges will start appearing and their Color. If you don't want them to fade in as shown, make the keys Step keys. The other Gradient controls the Color of the Edges based upon how old the Particles are, which I had fade in from Red to Yellow to Black.

Hope it helps!
mTp

P.S. Forgot to mention: I then loaded the original model and faded it in between frames 200 and 250 using an Envelope on Dissolve on the Object Properties=>Render tab.

erikals
05-02-2019, 09:30 PM
Thank You Monroe Poteet! Awesome explanation and example!  https://i.imgur.com/tJGL61i.png