| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| simple effect; how create sun refrection? | |
|---|---|
| Tweet Topic Started: Dec 8 2007, 07:19 PM (272 Views) | |
| Mauro | Dec 8 2007, 07:19 PM Post #1 |
|
DirectX - WinAPI Programmer
![]() ![]() ![]() ![]() ![]() ![]()
|
hi! i have another problem (not very important) i want create reflection of the sun on the road like nfs pro street! (not like, but similiar..) can this be done? bye bye! |
| Programming c++ and directx | |
![]() |
|
| Dr. Best | Dec 8 2007, 10:26 PM Post #2 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
To have it look really good you would need normal mapped specular highlights and that's probably too complicated for you. The Ultimate 3D 2.0 Tech Demo comes with a shader for normal mapped specular highlights, but it's use is still not that simple, using it for the complete ground would be quite inefficient and the shader implements only one single point light, which is quite useless for your purpose. |
![]() |
|
| Mauro | Dec 8 2007, 11:27 PM Post #3 |
|
DirectX - WinAPI Programmer
![]() ![]() ![]() ![]() ![]() ![]()
|
Ok thx! for no open another topic, how i can return from a 3d room to a normal room? i have the room in 2d (with the buttons new game ecc) and the room with the game in 3d, but if i return to the first room i got the game freeze why? i used in the room_end of obj_control with(all) { instance_destroy} but it freeze...
|
| Programming c++ and directx | |
![]() |
|
| MysteriXYZ | Dec 8 2007, 11:59 PM Post #4 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Have you tried following the advice in this post? See the solutions for problem 2. |
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| Mauro | Dec 9 2007, 10:58 AM Post #5 |
|
DirectX - WinAPI Programmer
![]() ![]() ![]() ![]() ![]() ![]()
|
oh it work but with a mod! i added external_call(global.u3d_cleanup); else he go to the room, but i see the last 3d image now it work!
|
| Programming c++ and directx | |
![]() |
|
| Ruud v A | Dec 9 2007, 09:05 PM Post #6 |
|
Programmer · Artist
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
To do this in a less professional way, you could calculate the sun position on the screen, and make a value which is 0 at the edges of the screen, and 1 in the center (left-right and top-down). Now change the road color based on this value. 0 means no reflection, 1 means full (but the highest possible value is probably 0.8 or something like that). Of course this is not per pixel. -Wait, this will not work. Don't calculate the sun position on the screen, but the vector between the sun and the camera. Don't ask me how! |
|
Veniogames Vēnit, ut mē occidĕret. I will not use Ultimate3d 2.x.x anymore - I am an Ogre C++ programmer. | |
![]() |
|
| Mauro | Dec 9 2007, 09:12 PM Post #7 |
|
DirectX - WinAPI Programmer
![]() ![]() ![]() ![]() ![]() ![]()
|
mmm thx for the help, maybe i know how make!
|
| Programming c++ and directx | |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)



9:37 PM Jul 11