PDA

View Full Version : Surface bake edge renders



PeteS
03-31-2015, 08:42 AM
I have LW model that I'd like to use in Element 3D to utilize Elements animation benefits..

The client likes the look of the "EDGE RENDER" from lightwave..simple black geometry with white outline.
My question is, is it possible to surface bake the "render edges" onto a surface bake camera so I can export it onto a obj file?
I've tried, and can't seem to get it working. The best thing I've figured out was to export the atlas UV to Illustrator and stroke it in there and export to to PS to export a JPG. Looks OK, but it gives me al lath cuts..not as much control as LW's edge render.

If I can get it working in surface baker that'd be perfect.

Thanks for the help.

p

ernpchan
03-31-2015, 09:02 AM
No, edges aren't part of the surface. They're added at render time. You'd have to model/paint the edges into your geometry. You could try the flipped polygons technique too.

I asked videocopilot if they were going to add support for toon shading and line drawing. They didn't plan to.

Ztreem
03-31-2015, 09:26 AM
why not model the edges and give them a separate material in the model? Then you don't need to worry about pixels and image sizes.

djwaterman
03-31-2015, 09:38 AM
If it's not a sub-d model, and it can't be if you plan to take it into Element, then you should be able to just export the EPS of the UV map, make sure the "draw Grid" check box is unchecked. Then open it in Photoshop and bring it in at a large size, 300 dpi and as large as it might need to be for best quality to avoid jaggies. When it opens up you will have a perfect clear layer with nice solid black UV mesh map. If the lines are too thin, you can go to Layer Styles and add a stroke to the lines to increase the thickness to however thick you want it to be. You can drop any color Background behind the UV map since it is on a clear layer.

You will probably have to open the EPS a few times in Photoshop and go through this procedure until you hit on the right line thickness but the EPS remains unchanged if you save the result under a different name.


Obviously you can invert the result to give you your white lines on Black.

JoePoe
03-31-2015, 09:43 AM
Hmmm. Maybe I'm breaking a rule or something but I am getting edges to show up when baking. I just gave it a decent "Offset from surface" value.
There's a slight difference on width and a bit jaggy on a couple far edges to maybe make it not such a great option......but it worked.

Edges only 127674

Baked 127673

.... there is also DP Edge Node too. Maybe an actual shader will give better bake results.

ernpchan
03-31-2015, 09:57 AM
This looks like it's baking the lines into the surface. Between the two images the line thickness is different.

Sensei
03-31-2015, 10:42 AM
Look at my video tutorials "How To Render Edges"
https://www.youtube.com/watch?v=19BW3jxaV00
and "How To Color Edges"
https://www.youtube.com/watch?v=bGwo1Fifh6Y

Such made edges should be possible to be baked.

JoePoe
03-31-2015, 12:50 PM
This looks like it's baking the lines into the surface.

I thought that's what we were trying to do... no?

Yeah, and the line thickness thing.... guess that's a style issue. This way is more real world. How can you see the extra width that's on an edge/face out of sight.
Back in my product design days though (when we actually did renders by hand: pen, markers, pastels) the style was to do the whole silhouette in the thickest line and then the interior "leading" edges thinner.... Kinda like what you can do with the edge settings.

Anyway.... at the very least DP Edge node clears up the jaggies issue and bakes nicely :thumbsup: (haven't tried Sensei's methods yet :))

ernpchan
03-31-2015, 01:03 PM
I thought that's what we were trying to do... no?

Yeah, and the line thickness thing.... guess that's a style issue. This way is more real world. How can you see the extra width that's on an edge out of sight.
Back in my product design days though (when we actual did renders by hand: pen, markers, pastels) the style was to do the whole silhouette in the thickest line and then the interior "leading" edges thinner.... Kinda like what you can do with the edge settings.

Anyway.... at the very least DP Edge node clears up the jaggies issue and bakes nicely :thumbsup: (haven't tried Sensei's methods yet :))

Oh maybe he is. When I deal with edge lines, I have to recreate a cartoon look where the line is consistent all the way around which is what edge lines in LW do. So if he's trying to get a 1:1 recreation of LW edge lines, he's out of luck.

JoePoe
03-31-2015, 01:08 PM
Oh maybe he is. When I deal with edge lines, I have to recreate a cartoon look where the line is consistent all the way around which is what edge lines in LW do. So if he's trying to get a 1:1 recreation of LW edge lines, he's out of luck.

That sounds more like the render style I remember (fondly :))
And you're right.... more than just a style issue. Technical one as well... unless something can be done Nodally in the edges panel.

BTW: just tried again with baking LW edges and couldn't get it going again. So flaky at best. DP still works.

DP Edges baked (didn't post the pre baked image... it's exactly the same) 127677

shenhua
02-04-2016, 02:11 AM
anyone else experiencing DP edge node crashing layout when used on subpatches? Is that a limitation and it is only for non-subpatched geometry?

also, what exact setup (still green in nodes :/) would you recommend for me if I'd want to overlay the edge node effect on:
- material
- image map

I'm thinking this would be great to use to quickly "paint over edges" on the model.

kinda like what cavity (called curvature in 3d coat) map does in 3DC on edges.

Also... if you have any idea how to bake edges in a way similar to baking AO (without using the DP edge node), but ofc for edges? What would the settings for that be? (I mean briefly, so I can know where to look)

Sensei
02-04-2016, 02:33 AM
How many crash requesters do you have?
As many as rendering threads?
If so, try disabling Mesh Thread Evaluation and/or try Render Globals > Thread 1.
Just to see if it helps.

shenhua
02-04-2016, 03:09 AM
Unchecking Mesh Thread Evaluation did not improve the behavior.
Limiting render threads to 1 delayed the crash by few seconds. (might be unrelated and just my perception of it)
I am receiving only 1 crash request when it happens.

I should also mention that the crash happens in VPR.
The object renders fine with DP edge applied for me. Only VPR crashes.

Here is a piece of the object that crashes (both this piece and whole object crash the same for me in VPR)
It does not crash when I say, make a simple object in layout and subpatch it and then apply the DP edge. So maybe just VPR has issues with handling the node on this particular geometry?

132201

EDIT:
I tested out few other DP nodes on the same object. Just to compare.
I set it all exactly the same as with the DP edge.
While the DP edge gives a StackHash_6120 error only in VPR, I am also getting a crash in module ntdll.dll when using DP Dynamic AO node on subpatched version of the attached object. (other occlusion nodes work fine). The Dynamic AO crash doesn't occur with some simple primitive objects.

Bottom line, I think maybe the DP edge and DP dynamic AO have issues with the way I made my object. I will try to investigate this further.

dpont
02-04-2016, 04:26 AM
...I should also mention that the crash happens in VPR.
The object renders fine with DP edge applied for me. Only VPR crashes.

Here is a piece of the object that crashes (both this piece and whole object crash the same for me in VPR)
It does not crash when I say, make a simple object in layout and subpatch it and then apply the DP edge. So maybe just VPR has issues with handling the node on this particular geometry?

132201

It doesn't crash for me, VPR on, and the last updated Windows version of DPKit,
that's said, this isn't a good choice tu use this kind of mesh with Edge node,
simplified and hard-edged geometry should be the rule,
highly tesselated or too much polys with smoothed or rounded edges
is not what I would use, somehow redundant,
and breaking the edge effect if its size is greater than poly size.

Denis.

shenhua
02-04-2016, 04:32 AM
Oh, hi Denis! Thanks for chiming in.

Good to hear that it might be just problem on my side. Maybe I need a fresh install or something.
Btw... would things like Data Execution Prevention in OS have any influence on stability of these nodes? Since I red the ntdll.dll errors might be related to DEP in windows?

I will re-download the Kit, maybe I have older version of it and try turning off DEP in Windows, to see if this helps. I will also check this on my other machine, maybe it's something bonkers here.

Also, I get your point that that object isn't the best example for using the edge node. It was simply first thing I had on hand to check it out with :)

shenhua
02-04-2016, 04:59 AM
Now, this is interesting!
After turning off DEP on my machine, restarting and doing exactly the same test.

The crash by DP edge in VPR is different when DEP is off. It used to show the window with crash request + a windows error immediately (showing that StackHash_6120 error)
Now, with DEP off it first shows crash request... and waits for me to click, only after I click it shows the windows error, this time naming DP_Kit_11_x64.p as the faulty module (sic).

As for the Dynamic AO crash, when I replicate it with DEP off, the behavior stays the same, just ntdll.dll error.

I have also tried to test this on another machine, the results with DEP on it are the same.
The LW version here is 2015.3

I guess I should test this again when I get back home on my older version, maybe it's some incompatibility.
Anyway, not a big deal, because this happens only on subpatch and not on all objects.

shenhua
02-04-2016, 05:12 AM
Ok, found a friend who has an old NETBOOK (I know, lol, Atom PC) with Lightwave 11.5 on it.

We went on to test that on it to compare.
And guess what? DP edge node works fine on that netbook with LW 11.5

But... interestingly enough, the DP dynamic AO still gives an ntdll.dll error.

Anyway, hope these findings help in some way.
Here is a summary to put all the tests together for future reference:

2x (two machines) Windows 7 Ultimate 64Bit + NVidia GTX 850M GPU/NVidia GT550M GPU + LW 2015.3 + hatch.lwo + subpatch + DEP on + DP edge node = VPR crash, render works fine. StackHash_6120 faulty module error.
2x (two machines) Windows 7 Ultimate 64Bit + NVidia GTX 850M GPU/NVidia GT550M GPU + LW 2015.3 + hatch.lwo + subpatch + DEP off + DP edge node = VPR crash, render works fine. DP_Kit_11_x64.p faulty module error.
Windows 7 Ultimate 64Bit (Netbook) + On-board Intel GPU + LW 11.5 + hatch.lwo + subpatch + DEP on + DP edge node = VPR works fine. Render works fine.

2x (two machines) Windows 7 Ultimate 64Bit + NVidia GTX 850M GPU/NVidia GT550M GPU + LW 2015.3 + hatch.lwo + subpatch + DEP on + DP dynamic AO = VPR crash, render crash. Ntdll.dll faulty module error.
2x (two machines) Windows 7 Ultimate 64Bit + NVidia GTX 850M GPU/NVidia GT550M GPU + LW 2015.3 + hatch.lwo + subpatch + DEP off + DP dynamic AO = VPR crash, render crash. Ntdll.dll faulty module error.
Windows 7 Ultimate 64Bit (Netbook) + On-board Intel GPU + LW 11.5 + hatch.lwo + subpatch + DEP on + DP dynamic AO = VPR crash, render crash. Ntdll.dll faulty module error.

dpont
02-04-2016, 06:12 AM
...I guess I should test this again when I get back home on my older version, maybe it's some incompatibility.
Anyway, not a big deal, because this happens only on subpatch and not on all objects.

Both DynamicAO and Edge nodes use a preprocess
scanning geometry for later calling specific infos,
with a unsubpatched mesh, geometry is constant not variant,
not the case for subpatched mesh, as you know
point and polys are rebuild each time,
also differently in preview (VPR) and render,
this may cause mismatching between cached data
and shader evaluation,
try to check "After Deformation" in Edge node
this may fix this issue.

Denis.