Page 2 of 2

Posted: Fri Aug 21, 2009 9:15 pm
by FuzzYspo0N

Code: Select all

http://www.mediafire.com/file/xmoyzymtemm/db9.zip
Theres some issues with the exporter you are using> i exported from blender, try this one in your shaders (dont worry bout the materials yet).

ALSO, the mesh is extremely high poly depending on the game you are doing.

Image
Image
Image
Image
Image

The normals are fine (thats the file iv uploaded)

:D:D

Posted: Sat Aug 22, 2009 4:03 am
by BlindSide
Are you sure the reflection isn't inverted? You should be able to see the red box in the reflection in the last shot. Trying inverting the normals vector in the shader and see how it goes.

EDIT:

See with the original demo I sent you:

Image

You can see the rock's reflection in the bonnet (Circled in red).

Posted: Sat Aug 22, 2009 5:16 am
by lulzfish
yeah, in the last few shots, the sky is reflected on the bottom side of the car, and the top is dark from reflecting the ground.

I think something is backwards there.

Posted: Sat Aug 22, 2009 5:50 am
by aux
FuzzYspo0N, reflection is wonderful! =)
but I also think it is inverted. A car chassis isn't a transparent sphere and a common user expects to see a sky reflection on the top side :)

Anyway, it's really kewl.
I wish i could do anything alike...

BlindSide, thank you also for your work

Posted: Sat Aug 22, 2009 9:16 am
by FuzzYspo0N
I have been adapting and adjusting it over time, and i am just about finished fixing it (the render order is weird atm)

I will post this as soon as iv fixed it
and also mentioned repeatedly on my blog :) Thanks for the hint blindside, but i was rewriting the reflection as an IMaterialRenderer and during the process iv switched a good number of shader code with my own now, so the problem actually is the "front" and "back" are mapped on the wrong side (that also affects the Eye vector in the shader). Though i did try swithcing the Normal vector, it makes the "horizontal" reflection inverted... Ie im on the left, the reflection of me is on the right side of the cube.

Im fixing it, lol Thanks for the hints.

Also aux, Did that car work in your shaders? ? Thats the reason i was posting

Posted: Sat Aug 22, 2009 11:50 am
by aux
FuzzYspo0N, yes now it has smooth colors on the surface. Thanks for finding the reason of the problem.

But the .obj file loads much slower than the .x file, so i'll try to convert it with different tools to an .x format. But, most likely, i'll have this problem always when convert the model to .X

BTW, i still haven't made any suitable shader work, so if you have some examples of a little more 'advanced' shader (rather than 'plastic' :)) with the source code, could you please share it for me, if that's not too much trouble?

Posted: Mon Aug 24, 2009 10:27 pm
by Mel
looks like the vectors are inverted, at least, the up down vectors. Working with reflections is confusing, as, if your normal points up, it reflects what it is upside, but actually, the camera is looking down! and that's confusing XD

Posted: Wed Aug 26, 2009 8:13 pm
by FuzzYspo0N
Hey, this is almost finished as an IMaterialRenderer, meaning you can apply it like the EMT_MATERIALTYPE :)

That way you can dissect it as much as you like.

More images here : http://irrlicht.sourceforge.net/phpBB2/ ... 516#203516

Posted: Thu Aug 27, 2009 12:27 pm
by aux
Waiting for the moment when i could get it in my hands :D