Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Exporting Toon/Black Outline on 3D character  (Read 8869 times)

0 Members and 1 Guest are viewing this topic.

jackslawed

  • Lurker
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 23
    • View Profile
Exporting Toon/Black Outline on 3D character
« on: February 10, 2009, 12:15:07 PM »

Hi all...
I'm a longtime lurker around here, and I finally decided to get started on playing with the engine myself. So far almost everything has been working fantastic, the tutorials all worked well and I've managed to get a properly animated 3d character into a scene of my own design. However, what I really wanted was to get the "toon outline" effect that Zbang uses so well (copying, extruding the faces and flipping the normals). I understand the principle fine, and I can get the 3D program (Max 09) to display it beautifully, the problem is exporting the .x file.

Using Panda exporter, I seem to be unable to get the .x file to appear as the model(s) does in Max. It's not a deformation problem, it just seems unable to display the flipped normals, and shows a flat black surface (black is the color I am using for the "outline" mesh). I have tried toggling the normal options on Panda, but no luck.

Am I missing something basic here? Should I be making two separate actors? Is there a switch I have missed in Panda? Should I be using Blender instead? By the way, Panda exports this model+mapping etc perfectly without the normals flipped/inverted. If anybody has got this trick working in WME, I would love to know how you did it (software etc), since this black outline is kind of important to me (being a finicky art type)

Thanks in advance for any help/comments. :)
Logged

jackslawed

  • Lurker
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 23
    • View Profile
Re: Exporting Toon/Black Outline on 3D character
« Reply #1 on: May 04, 2009, 12:19:44 PM »

No answer?  :-\
Anyway, I spent the last couple of months experimenting on this myself, and finally figured it out. Head-slappingly simple, as these things always seem to be in the end. I'll post it here in case anyone else has this problem in the future (though it seems no one else is particularly interested at this point)

In a nutshell:
BACKFACES.
By default, WME renders backfaces, which the default render settings in directxviewer and 3dsMax do not. If you want the toon outline, you have to set the "DrawBackfaces" attribute to false in your 3Dactor definition file. After you do this the standard method of copying, extruding and flipping normals described in other posts will work perfectly. It's a little thing, but I couldn't find it written anywhere else (and I'm not much of a programmer). Hope this helps...

Anyway, now that this is out of the way I'm looking forward to using WME to do something bigger. I'll try to be more active around here from now...
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Exporting Toon/Black Outline on 3D character
« Reply #2 on: May 04, 2009, 08:36:46 PM »

Thanks for explaining what the problem was. I'm sure it will be useful for someone in the future.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Beastlord

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • View Profile
Re: Exporting Toon/Black Outline on 3D character
« Reply #3 on: May 06, 2009, 03:25:58 AM »

Yeah! very useful information.

I didn´t know this method for creating the "ink outline effect". I will be good to have it in the tutorials of WME (the ink effect is something useful for adventure games).

I will try this method, but for what I understand, the "only" problem here, is that you double the number of polygones in the scene (becuase for each character there are 2, one for the ink effect, and the other, for the normal character).


pd_ I didn´t find any "DrawBackfaces" option in the act3d file. And if i wrote  on it ( DRAWBACKFACES = FALSE ) I got errors when trying to load the model..... Where is this option avaliable?

EDIT : Ok, the correct way of write this to the engine is


DRAW_BACKFACES = FALSE
« Last Edit: May 06, 2009, 03:53:54 AM by Beastlord »
Logged

HelLRaiseR

  • I don't want to make a Monkey Island clone :(
  • Wiki editor
  • Frequent poster
  • ****
  • Karma: 4
  • Offline Offline
  • Posts: 270
    • View Profile
    • Adventure Box Studios
Re: Exporting Toon/Black Outline on 3D character
« Reply #4 on: May 06, 2009, 10:38:21 PM »

jackslawed, you are my hero. My actor has "cartoon lines" at last.

Beastlord, thanks for the option of the act3d file.

I see a "problem". If the size of the actor is different than the size of the scene and is needed to use the Scale property to get a reduction of the actor, the cartoon line hasn't very much quality. Probably, if I modify the "line mesh" I can obtain better results, but I'm afraid that the solution is resize all the actor (or all the scenes   :-\)

The result:



The result with the actor in real size:


Logged
Regards,

    Fernando

jackslawed

  • Lurker
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 23
    • View Profile
Re: Exporting Toon/Black Outline on 3D character
« Reply #5 on: May 07, 2009, 01:47:32 PM »

happy that it was helpful!

I also ended up resizing my scenes to fit the character default... i think it's probably a good rule of thumb. I think there is a limitation to how clean directx can render the line, and it drops out on certain angles. Still, the black line is such a nice effect that having it at all is great.

btw, hellraiser, nice backgrounds, something like the direction I am heading. I am trying to decide how to mix my max renders with ink overlays to get something between 3d and handdrawn.
Logged

HelLRaiseR

  • I don't want to make a Monkey Island clone :(
  • Wiki editor
  • Frequent poster
  • ****
  • Karma: 4
  • Offline Offline
  • Posts: 270
    • View Profile
    • Adventure Box Studios
Re: Exporting Toon/Black Outline on 3D character
« Reply #6 on: May 07, 2009, 02:01:26 PM »

I've made several test and not is necessary modify the scale of the actors or backgrounds, It's possible to place the actor with her real size modifying only the scale of the hidden geometry. The result is not a clean line, becouse the engine resized the actor, but this result is better than use actor.Scale

The backgrounds are modelled and texturiced in 3d Max, the render is retouch in photoshop. We rendering with ID's becouse 3d Max generates all the mask for the objects, this way simplified very much the final art.
Logged
Regards,

    Fernando

HelLRaiseR

  • I don't want to make a Monkey Island clone :(
  • Wiki editor
  • Frequent poster
  • ****
  • Karma: 4
  • Offline Offline
  • Posts: 270
    • View Profile
    • Adventure Box Studios
Re: Exporting Toon/Black Outline on 3D character
« Reply #7 on: May 14, 2009, 08:47:16 AM »

I've made another tests coloring the lines like in my backgrounds. There aren't possible to apply colors to the two faces of the line, but we made the line applying "autoillumination" to the material, and the results are very good, the line get the color in the illuminated zone, an if the actor position is in a dark zone, the lines displays in black color.

Off course, the colors of the images are for testing purposes :P

« Last Edit: May 14, 2009, 08:53:41 AM by HelLRaiseR »
Logged
Regards,

    Fernando

HelLRaiseR

  • I don't want to make a Monkey Island clone :(
  • Wiki editor
  • Frequent poster
  • ****
  • Karma: 4
  • Offline Offline
  • Posts: 270
    • View Profile
    • Adventure Box Studios
Re: Exporting Toon/Black Outline on 3D character
« Reply #8 on: May 14, 2009, 10:45:45 AM »

Another test. The ambient light of the scene affect the illumination of the cartoon line material, if the light is very clear (in this case, very little yellow near to white) the back face will be very illuminated and the color will be the color defined in the texture.



The problem is that if the ambient light is very clear, the actor loses the volume, and if the ambient light is very dark, the actor loses the line color. It's necesary choose the correct ambient light color for your purposes. Then isn't possible to see the color of the lines correctly if the ambient light is very dark

In the next image, you can see the actor with the ambient light dark gray, the volume is very soft and the line color is apreciated.


Logged
Regards,

    Fernando

Akusa

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 46
    • View Profile
Re: Exporting Toon/Black Outline on 3D character
« Reply #9 on: May 14, 2009, 04:56:03 PM »

Wow the illuminated outlines look wonderful! Not only are the "artifacts" much smaller, also the overall mood is much nicer :D

Btw. can i ask a question? Your backgrounds look wonderful comic like while i see you also using photo textures.... could you post a tutorial how to archive this kind of style? I aimed for a simmilar art style but only archived a very realisticly looking art effect with photo textures.
Logged

HelLRaiseR

  • I don't want to make a Monkey Island clone :(
  • Wiki editor
  • Frequent poster
  • ****
  • Karma: 4
  • Offline Offline
  • Posts: 270
    • View Profile
    • Adventure Box Studios
Re: Exporting Toon/Black Outline on 3D character
« Reply #10 on: May 14, 2009, 06:25:47 PM »

Ok. The background that you can see in this images are not finished. I'm going to capture the screens of the proccess and make a tutorial.
Logged
Regards,

    Fernando

HelLRaiseR

  • I don't want to make a Monkey Island clone :(
  • Wiki editor
  • Frequent poster
  • ****
  • Karma: 4
  • Offline Offline
  • Posts: 270
    • View Profile
    • Adventure Box Studios
Re: Exporting Toon/Black Outline on 3D character
« Reply #11 on: May 21, 2009, 09:37:07 AM »

Logged
Regards,

    Fernando
 

Page created in 0.046 seconds with 20 queries.