If you’re using IndexedGeometry well then the shadows are f*cked.
I’m looking into it though
I’ve reported in the past that shadows don’t work on normal geometry in certain cases. I think its to do with the way the shadow algorithm works, at least in one shadow volume algo each vertex can only be part of up to 2 faces at a time (at least I think thats right). So, its easily possible to build geometry geometry that breaks shadows… I’ve built a box room in the past that doesn’t work properly.
However, the loader probably could try and do some stuff to rationalise the geometry to work with shadows, but it does seem kinda out of the scope of loader. Should probably happen somewhere in Xith.
I might get a chance to look at adding NIO today.
Kev
Could you very please check the normals generation again? I get this very strong feeling that they’re partially screwed
http://www.users.xith.org/JavaCoolDude/Pictures/bug.PNG
Look at how the specular lighting on the Jewls is facing away from the light.
I’m positive my TBN generation algorithm that produces the perpixel lighting effect is perfect.
Sure, I can try… could you send me that model to help with testing? I take it the gems are meant to be outset not inset like they appear now?
EDIT: Have you tried lighting it without per-pixel lighting btw?
Kev
true dat
Check your email
New version uploaded, with the normals inverted. Might just have been that simple. However, I didn’t get the colours/textures for the chalice so I can test it here.
Kev
heres a set of transparent objects.
http://www.topresultmate.com/xith3d/model_set.zip
now the ones with _max are exported out of 3dsmax direct. the _tri means i get the mesh to triangles. the _pt is exported using Polytrans.
can u give a try… dont seem to work here. the cube is 50% transparent. - check the bounds?
- using 3dsMax5
Okie dokie, up goes another version…
Now the transparency seems to work (but Xith doesn’t seem to want to work with lighting and transparency at the same time). Note, with the cube model you created you’ll get some oddity with transparency since the loader will create the whole cube as one shape which means the sides won’t get sorted…
The bounds thing should work also, at least I think so
Kev
top top top result nice one dude… works cool…
any tips on how the loader would like the cube? i can split it up into separate sides, if that would help?
and i take it shadows are another xith area…
all seems to be working tip top. thats for your time dude… jcd and kev rock
Seperating it out into seperate sides should do the trick.
Shadows, yes… another whole bizarre ball park.
Kev
I f**** sorry kev for giving you the impression that your normals were reverse whereas it was my f***** TBN generator that was screwing the binormals, and hence the glitch in the above screenshot.
I reversed my binormals and everything went just fine.
Sorry again :sad kitten:
Na, don’t worry, these things happen and everything… I’ll flip um back in the code… everything will be groovy…
Kev
Ok now can we have the obj loader returing an indexed shape3D
Actually it wasn’t my TBNGenerator that was screwing things around, but the sobel filter that I apply to the heightmap to generate normal maps necessary for the perpixel lighting effects.
I put together what I shall call the JCD utilities ;D which serve to convert/save/load files in jcd format (vertex, normal, tangent, binormal, texcoord3f), and also to generate TBN matricies efficently
JCD3DSFactory
Normal map generator
TBNGenerator
Arggggh! Soon(ish). Unfortunately I’m in work this morning, so it might be a few days.
Kev
simple example jcd?
[quote]simple example jcd?
[/quote]
PerPixel Lighting (with primitive distance attenuation :-/ ):
http://www.users.xith.org/JavaCoolDude//JWS/Xith3D/PPL/pplicon.jpg
Keys: space to stop the light, T to cycle through the textures, L for lightmap, N for normal map, B for base map, D for default, A for distance attenuation, V for TBN components display.
Mouse: left for rotations.
Source
shadow volumes on my objects seem to be having alot of hassles it must be said… but we think its more of an xith problem?
I got some 3d models which have been converted from .lwo and .md3 format to .3ds with DeepExploration. Now I try to load them with Kev’s importer. Some models work fine. Some others fail however.
It’s been necessary to disable the option “save hiarchical info” in DeepExplorer’s export dialog or I see “Null Pointer exception” at the 3ds Java loader.
Does anybody know more about the quality of DeepExploration’s 3ds exports when it comes to importing the converted models to Xith3d with Kevs loader?
Does anybody got experiences with complexer 3ds models and the importer in general?
well im using polytrans - seems to not come out to good with the shadows mind. same problem with exporting max anyways.