Load normals from file

Started by Thomas., June 13, 2012, 06:55:25 PM

Previous topic - Next topic

Thomas.


EgonOlsen


EgonOlsen

Give it a try:

http://jpct.de/download/beta/jpct.jar
http://jpct.de/download/beta/jpct_ae.jar

Both have a new switch in Config (Config.useNormalsFromOBJ). Setting this to true will make jPCT load the normals from the file and don't calculate new ones during build(). At least that's what's supposed to happen.... ;)

Thomas.

#18
I created test project, so you can see how it works (back button for load/calculate normals, menu button for switch between many objects). Any idea why is lighting bad??

http://dl.dropbox.com/u/26148874/TestProject.zip

edit: in 3ds max and deep exploration seems these models correctly...

EgonOlsen

Can't run that ATM. Any screen shots?


EgonOlsen

I found the problem. Whoever invented the OBJ-format has to suffer endlessly...i'll try to fix it, but it will require some internal changes to the object compiler as well...

EgonOlsen

I've uploaded new versions that might work better. However, this comes at the cost of additional compile time (might not be significant, i haven't benchmarked this) and slightly higher memory usage of objects with "file normals".

Thomas.

YES, nice, everything seems fine :)

zammbi

QuoteWhoever invented the OBJ-format has to suffer endlessly

Well the closest names responsible I could come up with is the founders of Wavefront.  :P
QuoteIt was founded in 1984, in Santa Barbara, California, by Bill Kovacs, Larry Barels, Mark Sylvester.
http://en.wikipedia.org/wiki/Wavefront_Technologies