cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

rakeshk4
Journeyman III

3DS Loader in ES 2.0 Emulator

Question on .3DS loader provided with OPenGL ES 2.0 Emulator

Hi List,

         I am using 3DS loader for loading my 3D Studio (.3ds) model,it is loading          fine and i am getting the output .Only problem is that Normal is not                  generating according to indices rather than depend on the indices it               arranged in the sequential order. My model is very huge so i have to               rearrange the vertices into sequential order so it killing the performance.

         So can you suggest me the right path to get the normal according to              indices.

 

0 Likes
5 Replies
rakeshk4
Journeyman III

Hi List,

         Can any one reply who has worked on 3DS parser.

Regards,

Parmar.

0 Likes
plohrmann
Staff

Are you loading this 3DS model into RenderMonkey? and viewing in an OpenGLES preview window? Just want to clarify things here.

0 Likes

Hi,

   I am loading through my own framework.Every  thing is working fine

   i have to optimise my code.Actually i am using glDrawElement for drawing,

   so its totally depend on indices.But the normal are in sequetial order so i

   have to again arrange either vertices or normal in sequential order.

Regards,

parmar

0 Likes

First, having to rearrange the indices (or the normals) should only be a load-time performance penalty, and shouldn't cause a runtime penalty.

I don't usually use 3D Studio Max, but perhaps there is an option related to saving the normals to match the vertex positions? What happens if you load the model up into other DCC tools? Do they have similar problems? What if you re-export through those tools?

If you have the same issue, then perhaps your loader is not interpreting the smoothing groups correctly. Most of our tools do not use the smoothing groups, so we typically regenerate the normals at load time anyway.

0 Likes

Hi Peter,

                     Thanks for your suggestion.Actually i have a only 3ds file from

                      artist.We dont have any tools.I am using the 3ds parse                                   provided with Emulator.But in my sample if i am passing directly

                      normal pointer(which is getting from 3ds loader)  to                                         glNormalpointer the FPS i am getting around 390.Because of normal is not in correct order ,so i am not getting lighting effect.But if i am arranging either normal or vertices in serial order,fps is geeting down to around 100 fps,now i am getting light effect proper because normal corrected.My mess has a large data so my GPU is waiting for CPU.

So i am thinking if the loader will load  the normal according to vertices,then i will get good performnace.

Regars,

Parmar.

 

0 Likes