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.

AppGameKit Classic Chat / Blender Edge Cavity??

Author
Message
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 7th Feb 2021 02:26
Anyone know how I can achieve the cavity effect in blender in agk, models look flat and bland its horrible, does the shader pack have something to do this?

Blender


AppGameKit


Anything even remotely close?

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 7th Feb 2021 03:30
1) What is your output format?
2) Are you baking the textures?
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 7th Feb 2021 19:23
1., .Obj

2. No, I am using a colour pallet

EdgeDetection with Outline gives some interesting results


what I want is EdgeDetection with an alpha fadeoff so the lines gently highlight the edges and not neon sign them

its almost there, just to bold


Setting the alpha in SP_EdgeDetection_SetColor does not seem to do much.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 7th Feb 2021 20:18
I think if you unsmoothed you model it would look better
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 8th Feb 2021 08:10
Try to split the model to faces
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 8th Feb 2021 11:30
Creating a fade-off of the outline would improve things but you would also need to ignore the indices that are not a direct edge (the diagonals between vertices).
That would solve the 'ridge' part of the cavity shader. You still need the 'valley' part.

This is info only, I don't actually know how to do it. It's something I have asked elsewhere on the interwebs without result.
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 8th Feb 2021 17:59 Edited at: 8th Feb 2021 18:01
Looks like ur using vertex colors to be honest. Vert color will always be flat and dull. u need a diffuse layer for for lights. To interact with the model. Also light period other then ambient is important to have. If all surfaces are lit equally. Even I real life it would make depth and geometry hard to distinguish if not impossible. Also shade faces flat. you can shade one or more faces smooth but when you get to an edge that you want to be prominent make sure that edge has an extra edge on both sides. Very close or split the edge. That model definitely has smooth shading on it.

Attachments

Login to view attachments
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 8th Feb 2021 19:58
Quote: "Looks like ur using vertex colors to be honest. Vert color will always be flat and dull."


No I'd expect vertex colors to to look flat and bland, I used a image pallet of gradient color to try to give some depth.

Quote: "This is info only, I don't actually know how to do it. It's something I have asked elsewhere on the interwebs without result."


Maybe I need to learn Python and go route around the blender source to see how its done! lol

Thanks for the suggestions guys, some things to try here, I have noticed that the edge shader with really simple geometry actually works pretty well, it had a nice cartoon look and I think I can live with that

I am just trying to find an art style I can live with, looks good enough for prime time, can be reused across my games and protos, consistency in the assets market is a rare thing so if I want any then I better make my own.

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 8th Feb 2021 20:19 Edited at: 9th Feb 2021 00:44
The harsh dark color you get at the edges is because AppGameKit is trying to smooth your model around corners.
Thats why george and i have suggested you unsmooth or unweld the faces on your model

Attachments

Login to view attachments
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 9th Feb 2021 14:15 Edited at: 9th Feb 2021 14:16
I found this:
Blender Cavity Shader
It looks promising it you can convert it.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 9th Feb 2021 17:08
Quote: "Thats why george and i have suggested you unsmooth or unweld the faces on your model"


That does add some definition for sure

Quote: "It looks promising it you can convert it."


That looks perfect, from the blender source to, I knew it had to be out there somewhere lol

Only problem is I would not know where to start getting this to work in AppGameKit, I'll have a play around and see how many times I can break it before I give up! lol

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Feb 2021 21:18
Can't you apply your cavity effect in blender and then bake that to a texture?
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 9th Feb 2021 23:41
Na, you bake what the camera sees, cavity is a view port only setting and no way to bake it that I can find, besides that would defeat the point of the single image pallet and low poly look I am after

I think I have found a happy medium for now, I did not want to go the Voxel route but as I am discovering that the shader packs edge detection likes simple meshes and I am practically using primitives in blender and Magica edge detection shader looks very much the same..... bottom line is what I see in the modelling app I get in the game engine which is good enough for me

I kinda like the low poly cartoon look, it would be nice to get that cavity shader working in AppGameKit but in lou of that I'll settle with this

Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 10th Feb 2021 08:52
I'm a big fan of that look too. I got in to it after watching Imphenzia video's on YouTube.
If you have a working shader now would you be willing to share it?
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 10th Feb 2021 19:49 Edited at: 10th Feb 2021 20:04
I cant, its from the shader pack DLC, Edge Detection, it does the job and I was happy until I found THIS ONE!, its got the edge fade thing and AO and looks fantastic even better than what I originally wanted, there would certainly be a steak and a few beers init for anyone that could make it run in AppGameKit lol

Edit:

Quote: "I got in to it after watching Imphenzia video's on YouTube."


Yeah me to, great learning resource for blender but his style just works in Unity out of the box his stuff looks great and no shaders or faff, Godot the same but not as nice but at least it attempts to set some materials, AppGameKit is like no, you goner work for this!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Feb 2021 22:38 Edited at: 11th Feb 2021 04:02
I would say that "voxel" is the key word in that shader and it would be very good at drawing outlines around boxes.
This looked like it might do the trick



This is interesting. I think it pretty much gives you what you want.
I have taken a model and smoothed it at 15 degree angles and used that to break out the edges (I'm 100% sure you can easily do this with blender)
Then i extruded along normals (maybe rails in blender). I broke out the extrusion and saved that as a separete mesh.

I loaded the base model and then loaded and fixed the outline model to the base

I think it gives you much greater control over the outline (You could add glow and all kinds of effecs) and it is proportionate to the distance to camera.
Anyway. I'm pretty sure this would be easy to do in blender

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 13th Feb 2021 09:26
some great models im seeing here

thought ide have a go at a flat shading shader not seeing much different so on my todo list atleast it dont error
vs

ps

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Feb 2021 00:07
I use that shader on my model and it shows nothing. blank screen
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 14th Feb 2021 05:06
Quote: "I use that shader on my model and it shows nothing. blank screen"


Same here.

Quote: "This is interesting. I think it pretty much gives you what you want."


Pretty neat, I'll give that a try

Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 14th Feb 2021 18:14
@blink0k very nice ship you have there, like that very much.

Login to post a reply

Server time is: 2024-04-24 22:36:07
Your offset time is: 2024-04-24 22:36:07