Simple object with specular etc?

Started by jaccunio, January 07, 2012, 03:25:51 PM

Previous topic - Next topic

jaccunio

I started playing with jpct-ae yesterday - so far I'm impressed.
Now I'm trying to achieve some nicely looking materials:
I'm loading 3ds file exported from 3ds max (a kettle for example) and even tough I set setSpecularLighting to true, it doesn't look very good.
I suppose that a shader would do the job, but I've no experience with writing shaders. Are there any basic shaders available to use with with jpct-ae?

EgonOlsen

"Doesn't look very good" is a bit vague...a screen shot might help. Anyway, to answer your question: Yes, a shader might help but you need an ES 2.0 capable device for this (and it doesn't work in the emulator). With current devices, this isn't an issue though. Currently, there's no real shader library or something like that. You'll find a parallax mapping shader in the HelloShader-example and some other stuff in the forum. What might also help are the default shaders that can be found in the jar. They are used to mimic the fixed function pipeline's behaviour when using the ES 2.0 render pipeline. Maybe you can tweak one of those to suit your needs. If not, any OpenGL ES shader tutorial (the ones for iPhones will do too) should help too. 

jaccunio

Thanks for the answer. I'm looking into shaders now.
Btw, is something like this http://youtu.be/qWVJKfOhFTA?t=4m29s (except for shadows) possible to achieve in jpct-ae?

EgonOlsen

Yes. You can do almost everything with shaders. However, performance of mobile devices is still very limited especially when using complex fragment shaders.