OpenGL Combiner

View previous topic View next topic Go down

OpenGL Combiner

Post  sio2interactive on Thu Dec 11, 2008 4:08 am

Someone know where I can find ALL the default value of the combiner for the GL_TEXTURE0 and 1???

I just want to create a function like sio2ImageResetCombiners (and yes its for dot3 bumpmapping Wink)
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: OpenGL Combiner

Post  zzajin on Thu Dec 11, 2008 8:43 pm

Neat. How far along are you? If you are not too far along I could share some pointers on things I ran into. Unfortunately, I had to stop working on this feature.

Also I don't know the right answer for the default combiner states. I was just trying to get it to work, I had a ways to go to get the code all cleaned up.

zzajin

Posts : 81
Join date : 2008-10-14

View user profile

Back to top Go down

Re: OpenGL Combiner

Post  sio2interactive on Thu Dec 11, 2008 9:01 pm

Well everything is setup, only the per frame TBN calculation when the light is moving its a pita as well as analyzing which light is the nearest one of the object... Because of that I doubt that I will integrate that for good in SIO2... Cuz in order to be 100% correct you need to calculate the nearest light on a face level which is just crazy for iPhone... I'll just present a demo that show how to do it but after that I think its up to the developers to implement what they want...
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: OpenGL Combiner

Post  zzajin on Fri Dec 12, 2008 10:00 am

Yeah I doubt checking the distance to each light per frame per face is a good use of cpu for iPhone games. I was assigning a light coordinate per object that would be used for all vertices in TBN calculation. It would probably look bad for large objects with multiple lights, but the light distance thing just seemed like too much. Also by setting a light at the object level I figured it would be easier to optimize outside the render pipeline and also turning normal mapping on/off for level of detail.

I think the per frame TBN matrix calculation is only need for rotated vertices. This means the TBN can be calculated once and stored in non rotating objects. I was shooting for storing this in the VBO, since I was interested in seeing if OpenGL ES Matrix Palette stuff would rotate the TBN for me on the GPU. I think I saw some of this in Imagination Tech's POD format and examples, so it might work.

The problem I ran into with TBN calculation was with the UV coordinates. For some reason I think I was unmapping them wrong. That was the next thing I needed to look into and get working.

It would be nice if at least normal mapping was integrated for good in the blender script, since blender supports it so cleanly. I added "nor_tex ( [texture number] )" to the material file to indicate which texture was the normal map.

zzajin

Posts : 81
Join date : 2008-10-14

View user profile

Back to top Go down

Re: OpenGL Combiner

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum