.
by Unlisted · in Torque 3D Professional · 05/15/2013 (2:56 pm) · 24 replies
.
#2
http://www.garagegames.com/community/forums/viewthread/97401
Its an outline shader, this should help some.
05/15/2013 (3:28 pm)
ok first off try this outhttp://www.garagegames.com/community/forums/viewthread/97401
Its an outline shader, this should help some.
#3
Simply put.... paint the textures like that..... add them to your model... off you go. This is how 80% of Borderlands 2 was done..... (borderlands 1 used a nifty shader because they were not intending to release it with 'cartoon' shading, it was an afterthought because it got compared to Fallout 3 so often) want a hand painted look... then hand paint the models, add the textures, use basic lighting (to simplify shadows).... done. You don't always need crazy shaders and crap slowing the engine down....
Ron
05/15/2013 (3:37 pm)
David has one solution but, Simply put.... paint the textures like that..... add them to your model... off you go. This is how 80% of Borderlands 2 was done..... (borderlands 1 used a nifty shader because they were not intending to release it with 'cartoon' shading, it was an afterthought because it got compared to Fallout 3 so often) want a hand painted look... then hand paint the models, add the textures, use basic lighting (to simplify shadows).... done. You don't always need crazy shaders and crap slowing the engine down....
Ron
#4
liman3d.com/docs/shaderpackvol1_manual.pdf
liman3d.com/docs/shaderpackvol2_manual.pdf
unfortunately they took them off sale, I didn't get them when I had the chance (due to lack of funds)
In volume 1 they had several toon shaders, so it can be done with just a shader in Torqu3D, I'm not up on shaders so can't help you but am sure with a bit of poking around you may be able to find one already done or make your own, maybe even contact Liman3D
liman3d.com/support.html
you never know
sorry couldn't help more
05/15/2013 (3:44 pm)
Liman3D used to do a couple of shader packsliman3d.com/docs/shaderpackvol1_manual.pdf
liman3d.com/docs/shaderpackvol2_manual.pdf
unfortunately they took them off sale, I didn't get them when I had the chance (due to lack of funds)
In volume 1 they had several toon shaders, so it can be done with just a shader in Torqu3D, I'm not up on shaders so can't help you but am sure with a bit of poking around you may be able to find one already done or make your own, maybe even contact Liman3D
liman3d.com/support.html
you never know
sorry couldn't help more
#5

with some textures I bet it wouldn't be far off what your after without any shaders whatsoever.
05/15/2013 (4:27 pm)
Ron is right, I threw up a quick room in Max exported it to Torque3D turned the lighting to basic, didn't add any other lights skybox or anything else
with some textures I bet it wouldn't be far off what your after without any shaders whatsoever.
#6
Ron
05/15/2013 (4:33 pm)
Thanks David! Not a dig or anything but, sometimes I think, we get over complicated with what we want to do. Advanced engine and all. Thanks for the validation! Another method would be to paint the textures cartoon like and turn on the emit modifier in the material editor. Flat shading, no shadows.... simple.Ron
#7
05/15/2013 (5:27 pm)
.
#8

as Ron suggested, textured with the emissive flag set
05/15/2013 (5:59 pm)
couldn't resist, had to try it.
as Ron suggested, textured with the emissive flag set
#9
Just make the texture smaller?
05/15/2013 (6:02 pm)
@Unlisted, hmm not quite sure what your after, you want the texture jitter? like my above image?Just make the texture smaller?
#10
05/15/2013 (6:15 pm)
.
#11
Are you using a MIP mapped texture in .dds format? If you are.... STOP. Use a JPG or PNG and TURN off the anti aliasing features. (ensure core/client/PostFx/FSAA.cs has an 'enabled' set to false. Also, ensure you have NO anti aliasing selected in your options menu. If you are using Mip mapping make sure there are NO extra mapping levels. Should just be one.
Lastly, you are using different render engines, there will be variation. Think Vray versus Mental Ray. You can get close, but there will always be differences. Personally, I like either render.
Ron
05/15/2013 (6:47 pm)
hmmm. Gonna spit ball the problem here.....Are you using a MIP mapped texture in .dds format? If you are.... STOP. Use a JPG or PNG and TURN off the anti aliasing features. (ensure core/client/PostFx/FSAA.cs has an 'enabled' set to false. Also, ensure you have NO anti aliasing selected in your options menu. If you are using Mip mapping make sure there are NO extra mapping levels. Should just be one.
Lastly, you are using different render engines, there will be variation. Think Vray versus Mental Ray. You can get close, but there will always be differences. Personally, I like either render.
Ron
#12
To do that requires a code change in the engine:
In processedMaterial.cpp, lines 261 & 262 you should see:
Change these lines to:
Recompile, launch the game, open the options screen and make sure the 'Anisotropic Filtering' option is set to 'Off'.
Edit: Added before/after comparison screenshots:
Before Changes: postimg.org/image/45hwbpndv/
After Changes: postimg.org/image/x8k41uvc7/
05/15/2013 (6:54 pm)
The 'blurring' effect is a result of texture filtering. T3D uses linear or anisotropic (if enabled) filtering by default. To get that retro, pixel art look the texture filtering needs to be disabled.To do that requires a code change in the engine:
In processedMaterial.cpp, lines 261 & 262 you should see:
result.samplers[i].minFilter = GFXTextureFilterLinear;
result.samplers[i].magFilter = GFXTextureFilterLinear;Change these lines to:
result.samplers[i].minFilter = GFXTextureFilterNone;
result.samplers[i].magFilter = GFXTextureFilterNone;Recompile, launch the game, open the options screen and make sure the 'Anisotropic Filtering' option is set to 'Off'.
Edit: Added before/after comparison screenshots:
Before Changes: postimg.org/image/45hwbpndv/
After Changes: postimg.org/image/x8k41uvc7/
#13
I know you can turn off Anti-aliasing and Anisotropic Filtering, you can even turn your texture quality to low, but I think for this effect to work properly you need to also set your screen resolution pretty low else the sheer number of pixels will work against you. I think you need a shader that will do a similar job
[edit]Ignore this just use the above fix :-)[/edit]
05/15/2013 (7:05 pm)
ok, sorry for not getting it at first, you want to turn off all texture filtering.I know you can turn off Anti-aliasing and Anisotropic Filtering, you can even turn your texture quality to low, but I think for this effect to work properly you need to also set your screen resolution pretty low else the sheer number of pixels will work against you. I think you need a shader that will do a similar job
[edit]Ignore this just use the above fix :-)[/edit]
#14
05/15/2013 (7:31 pm)
.
#15
In processedMaterial.cpp, around line 251 you should see:
Just below that add:
05/15/2013 (7:37 pm)
Oops, forgot about mipmapping. You can try this:In processedMaterial.cpp, around line 251 you should see:
result.samplers[i].addressModeV = GFXAddressWrap;
Just below that add:
result.samplers[i].mipFilter = GFXTextureFilterNone;
#16
05/15/2013 (7:46 pm)
.
#17
05/15/2013 (8:10 pm)
am glad Chris solved it for you, nice retro look :-)
#19
05/15/2013 (10:52 pm)
Even though Chris already solved this, I thought I'd try out my own method for getting this kind of effect (although Chris' solution is perfect!). What I did was use a 600px texture. A non power of two will always result in aliasing. I also set my sun colour to black, and ambient to light grey. Oh, and advanced lighting turned off. I know it isn't near as good as Chris' method, but it may work for others. Possibly.
#20
05/15/2013 (11:04 pm)
Honestly, given the rising prevalence of retro games or 'low bit' style games, I have to wonder if it wouldn't make sense to rig the texture filter rules to a pref, instead of needing to go into the guts of the engine for each project that may need it.
Torque Owner David Robert Pemberton
www.deadlyassets.com