[SOLVED] Cartoon-Shader no texture support?

Panda3D Forum Index -> General Discussion Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anon


Posts: 657

PostPosted: Sat Oct 31, 2009 2:37 am    Post subject: [SOLVED] Cartoon-Shader no texture support? Reply with quote
Looks like a textured model isnt supported by toon shader?
With the shader its white,
without shader (shadergen) only the outline works
PS. I have zero shader programming experience


Last edited by Anon on Sat Apr 17, 2010 3:39 am; edited 4 times in total
ThomasEgi


Posts: 1820
Location: Germany,Koblenz

PostPosted: Sat Oct 31, 2009 7:03 am    Post subject: Reply with quote
the toon shader sample was not build with texture-support in mind, so it has no support for texture. it can be added by modifying the shaderfile itself.
thought this has been discussed on the forum quite some times already. for example here http://www.panda3d.org/phpbb2/viewtopic.php?t=6929
using the serach function might bring up lot more results.
note: you can do cartoon-inking even without shaders,for example as workaround for veryveryvery old graficcards.
_________________
rig: dell inspiron 1720; ubuntu 9.10_64 ;panda 1.7.0
may a catgirl be with you. nyaan nyan~~ ^.^
Anon


Posts: 657

PostPosted: Sat Oct 31, 2009 8:03 am    Post subject: Reply with quote
Toon effect without custom shader:

The black colour doesnt shade right.


Last edited by Anon on Mon Jan 04, 2010 1:34 pm; edited 1 time in total
Anon


Posts: 657

PostPosted: Sun Nov 01, 2009 4:33 am    Post subject: Reply with quote
heres my model:
http://www.wikiupload.com/download_page.php?id=186707
I think the problem is in my model, because:
rdb
pro-rsoft

Posts: 5843
Location: Netherlands

PostPosted: Sun Nov 01, 2009 5:23 am    Post subject: Reply with quote
Hm, does your model have vertex normals?
Anon


Posts: 657

PostPosted: Sun Nov 01, 2009 6:25 am    Post subject: Reply with quote
I have uploaded the model.
You can find the download link in my previous post.
Anon


Posts: 657

PostPosted: Sun Nov 01, 2009 8:16 am    Post subject: Reply with quote
I guess built-in toon shading doesnt change specularity.
So i changed specular to 0 in Blender:

Still not bad. But outline doesnt work. If I press outline too much I get these black lines from top and right of the window. Those are present with the default panda model, too.
Anon


Posts: 657

PostPosted: Tue Nov 03, 2009 6:26 am    Post subject: Reply with quote
Like i said ive uploaded my model:
http://www.wikiupload.com/download_page.php?id=186707
Its just a placeholder. But its the same for my other models...
sunbull


Posts: 16
Location: Beijing, China

PostPosted: Fri Nov 06, 2009 11:43 am    Post subject: Reply with quote
yes, your zip file has broken.
Well, I got black lines from top right of window too if I outline too much. I think it's the way shader runs. This part should not be the problem.
_________________
by Mario, with best regards.


Last edited by sunbull on Fri Nov 06, 2009 1:07 pm; edited 1 time in total
rdb
pro-rsoft

Posts: 5843
Location: Netherlands

PostPosted: Fri Nov 06, 2009 12:03 pm    Post subject: Reply with quote
It's a conundrum, and there has been a similar bug report about this:
Code:
https://bugs.launchpad.net/panda3d/+bug/424640

The workaround is to put this in your Config.prc file:
Code:
textures-power-2 none


But yeah, you really shouldn't set the cartoon separation value so high.
sunbull


Posts: 16
Location: Beijing, China

PostPosted: Fri Nov 06, 2009 1:48 pm    Post subject: Reply with quote
Anon, you should alter the texture by .jpg or some other. When using the .png you can mention that the render-to-texture has an error resault. I guess Toon doesnt support Alpha channel. Maybe your other models are the same.

here is the resault:

_________________
by Mario, with best regards.
Anon


Posts: 657

PostPosted: Sat Nov 07, 2009 2:37 am    Post subject: Reply with quote
Thanks for the help.
But isnt this a bug then? I checked in GIMP and there wasn't any alpha value.
JPG is lossy, BMPs are big, and PNGs are small, like few kbytes for few-color images like this anyway. So I would really like to use PNGs.
rdb wrote:
But yeah, you really shouldn't set the cartoon separation value so high.

I just set it high so you would notice it. By default it's few pixels wide but still bothering.
sunbull


Posts: 16
Location: Beijing, China

PostPosted: Sat Nov 07, 2009 2:57 am    Post subject: Reply with quote
So that you should use rgb mode in your model's texture.

Add this line to you .egg file, after the line "panda.png":
Code:
<Scalar> format { rgb }


maybe because the export plugin didn't consider situation like you. the resault is same with above so I do not repeat.
_________________
by Mario, with best regards.
Anon


Posts: 657

PostPosted: Sat Nov 07, 2009 3:57 am    Post subject: Reply with quote
Ah, it's finally solved...

I would still call this a 'bug'.


Last edited by Anon on Mon Feb 22, 2010 4:29 am; edited 1 time in total
sunbull


Posts: 16
Location: Beijing, China

PostPosted: Sat Nov 07, 2009 4:19 am    Post subject: Reply with quote
But you are using png without alpha channel...
I cant understand that. isnt it a contrary way to original intention of png...
actually you can contral the compression rate of jpg. isnt it better?
_________________
by Mario, with best regards.
Anon


Posts: 657

PostPosted: Sat Nov 07, 2009 4:48 am    Post subject: Reply with quote
No, png isn't used only for the transparency. Jpg format has lossy compression. Even if you set it to 100% it is still noticeable, at least for me ( and in that case also big in filesize). Png uses lossless compression methods, so its bigger, but the image doesnt change visually. Png is of course bigger than a 75% jpg but its smaller than bmp ( which can be compressed but I have never seen one). Also png is really small if you use few colours.
I know that a jpg textured model cant be so bad visually, but why not use png if its almost the same size in my case?


Last edited by Anon on Mon Jan 04, 2010 1:38 pm; edited 1 time in total
sunbull


Posts: 16
Location: Beijing, China

PostPosted: Sat Nov 07, 2009 5:00 am    Post subject: Reply with quote
I really learnt a lot from that. Thank you!
_________________
by Mario, with best regards.
astelix


Posts: 851
Location: Milano, ITA

PostPosted: Thu Dec 10, 2009 9:04 am    Post subject: Reply with quote
Anon I tried to download your model but without success:
at the end of download all I got is an empty zip file
_________________
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
Anon


Posts: 657

PostPosted: Thu Dec 10, 2009 9:08 am    Post subject: Reply with quote
This problem is solved long ago.
Unless you want the ugly panda model :b
astelix


Posts: 851
Location: Milano, ITA

PostPosted: Thu Dec 10, 2009 9:20 am    Post subject: Reply with quote
Anon wrote:
This problem is solved long ago.
Unless you want the ugly panda model :b

hah no it isn't ugly, not uglier than the one I'm trying to do by myself these days for sure - I mind to port your pandakid to blender and use it in place of the good ol fat panda for my purposes, rigging, animating and dressing it - I guess is faster for me to start from yours than wait I finish my own. of course sharing it back to panda ppl as I often do.
_________________
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
Anon


Posts: 657

PostPosted: Thu Dec 10, 2009 1:40 pm    Post subject: Reply with quote
Sure here it is:
http://www.youshare.com/Guest/bf83cd21b1e2c3dc.zip.html
astelix


Posts: 851
Location: Milano, ITA

PostPosted: Thu Dec 10, 2009 4:28 pm    Post subject: Reply with quote
thankyou Anon - I imported and checked out - beside is cute as I thought and well done I'm not sure I'm going to use it for the different editing approach I use, anyhow I'll share the blender source nonetheless - those interested may grab it here
_________________
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
Anon


Posts: 657

PostPosted: Thu Dec 10, 2009 10:57 pm    Post subject: Reply with quote
I think I should mention now that I made the model after I saw treeform's or drwr's 2d art for a new panda logo. I dont remember who it was maybe someone else can tell.
I wanted to pose it like in the image but failed to rig.
astelix


Posts: 851
Location: Milano, ITA

PostPosted: Fri Dec 11, 2009 4:12 am    Post subject: Reply with quote
here it is the original concept artist page: http://shroomz66.deviantart.com/art/Panda-37302439
as you can see was a bit too sad and innocent before to pass by LBarret hands: http://www.panda3d.org/phpbb2/viewtopic.php?p=16246#16246
Wink
_________________
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
Anon


Posts: 657

PostPosted: Fri Dec 11, 2009 5:32 am    Post subject: Reply with quote
right...
Actually I use Blender too, so: http://www.youshare.com/Guest/9b749e87c3b669ce.blend.html
Display posts from previous:   
Post new topic   Reply to topic    Panda3D Forum Index -> General Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group