Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Cartoon outline effect for objects

Author
Message
The thing
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location: Somewhere in the U.K
Posted: 21st Sep 2008 23:40 Edited at: 24th Sep 2008 23:29
BBPro ver.1.069
I've created a function to push out the normals on an object to give it a cartoon like outline.

I had to negatively scale the object to achieve this, as for some reason I couldn't manipulate the normals using the vertexdata commands, so the object will be mirrored along every axis. The only way I can think to get around this is to edit the object file directly.



The downloadable version uses a model to better example the effect.

Attachments

Login to view attachments
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 22nd Sep 2008 21:22
Impressive.

But wouldn't it be easier to just scale the "black outline object" by 5% percent larger or so than the original?

This will probably not work on all objects as they have different local pivots in space so your method should be better.
Anyway here's what I mean:


The thing
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location: Somewhere in the U.K
Posted: 22nd Sep 2008 21:40 Edited at: 22nd Sep 2008 22:35
Negatively scaling an object so that it is larger than the original works in most instances but on game characters, for example, the vertexes inside the leg are pushed in the wrong direction and intersect the leg of the original model; effectively removing the outline in areas such as these.

Speaking of which I'll see if I can modify the code so that it will accept animated objects.

[edit]

No luck with the set vertexdata for limb command, it dosent's seem to work.

Login to post a reply

Server time is: 2024-11-22 07:45:53
Your offset time is: 2024-11-22 07:45:53