toon style outline

is the new mesh no collision?

if not

hitbox = static or rigid or dynamic etc

gfx mesh no collision
highlight mesh no collision.

of all methods this seems best, especially since my models are very low poly.

so, it creates the new mesh 1 time only right?

ah i got it
that other obj name thats in the data tab needs to be unique… the ‘mesh data name’ i think it is

ok so after a bit more messing around it seems your script just adds and the outline and hides it when it is not active which means if you have copies of the same obj you need to generate an outline for each where as mine just used the same outline for all objs with the same name
is there any way to add an obj to the scene.objectsInactive ?

the other way around would be to just move the outline around where needed but if you had a LOT of outlines from lots of different thing would it impact the games performance any more than having them all in the inactive layer?

not really,

inactive layer would only mean they dont use as much logic.
also they would make scene.objects longer.

ya i just did a test and it took around 16160000 verts to get to 20 fps from making them visible so i don’t think there is any worry about that lol

This is what i got so far:

http://i.imgur.com/8SbAmmO.gif
(forgot to capture mouse cursor…)
New objects use the generated outline from saved dictionary during gameplay.
New objects can be spawned in during gameplay.
Some objects now have hit box, which will instead receive the mouse ray.
In result the logic spike on those models is minimal.

Should update the first post.
Should write a explanation/tut how to use it.

Attachments

toonoutline.blend (3.01 MB)

Quite impressive!
Thank you very much for sharing.
Bye

Nice work VegetableJuiceF!

it would be neat to be able to give tokens here like git.

Everyone 5-star dragon rush

sorry but how do i update the link ? lol

Your first post ?


or my download link?
download->reupload or something.

I meant we should update the content so people wouldn’t have to scroll through this thread.

ok there we go
you need to click edit post twice lol

ok so first bug i have found is it seems to spam add each obj every logic tic if you run it from somewhere other than C:

also you guys are WAY too over my level and i dont get 1/2 of this code lol there is even a few things i can’t find any info on such as ‘logic.models’

sorry to say this but is there any chance you could put comments on the code like i did on mine ? explaining almost every line lol

bug> other than C?
What does it say in console?
Are you still using old version of blender?
I mean most of your bugs don’t make sense…

In blender you can store a random variable in bge.logic ( or logic like you use).
It’s just like a dictionary. You just name it, bge.logic.thisIsMyVariable = {}, and you are done.

Certainly some comments are needed.
But yeah, I would like to avoid tedious work of documenting every line.
Especially when the function name says it or it is plain syntax. Like defaultDict or getVertex.
Thats why I try to use sensible way of coding beforehand so that the code comments itself.

But I could do it, not that i have better things to do during lectures.
Just tell me what is too much hacked.

a ya sorry i will test stuff more from now on before posting and more so when i am tired lol
it seems to be from importing from the testmodels.blend so heres the error from a file with just a cube and following the info.txt

it keeps repeating

GenNewOutlineGenTime: 0.002000093460083008


GenNewOutline
GenTime: 0.0


GenNewOutline
GenTime: 0.0010008811950683594


GenNewOutline
GenTime: 0.0


GenNewOutline
GenTime: 0.0


GenNewOutline
GenTime: 0.003000020980834961


GenNewOutline
GenTime: 0.0009999275207519531


GenNewOutline
Could not be found "Cube"
Python script error - object 'Empty.002', controller 'Python':
Traceback (most recent call last):
  File "useCaseExample.py", line 109, in <module>
  File "useCaseExample.py", line 18, in main
  File "useCaseExample.py", line 103, in init
  File "useCaseExample.py", line 58, in outline
  File "E:\blender stuff\games\scripts	oonoutline	oonoutline (2).blend\outline
.py", line 51, in makeOutline
  File "E:\blender stuff\games\scripts	oonoutline	oonoutline (2).blend\outline
.py", line 19, in makeUniqueMeshCopy
IndexError: list index out of range

Pretty sure it is a blender issue/bug.

Was about to make a thread because my 2.69 or 2.6X something had that on the other computer.
But then I updated blender and It was solved.

Basically libload and libnew don’t like each other on older versions.

But I base that on the premise that you use the extra blend for models thing.

ok so after some time and a lot of messing around trying to understand the changes lol
it seems that you can’t import something with a material name other than ‘Material’ or ‘Material.NNN’ (N is a number) otherwise the obj will be the color of the outline

also i tried mixing my script with the newer one to better understand it but i keep getting the same glitch but with any name thats not ‘Material.001’ and at a few points the outline had no color so it looked like a harshly shadowed what ever