Welcome Guest [Log In] [Register]
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:

Username:   Password:
Add Reply
Detail.
Topic Started: Nov 28 2007, 12:42 PM (286 Views)
Zedman3d
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Ive been trying to get this system going where if you are more than 50 away from an object it slowly fades out and doesnt get drawn anymore... i try for fun every week or so but it never works out... could someone please help. :)
Quote:
 
Eanbro: My problem with C++ is that not everything is included to start making projects with it.
Quote:
 
Dr.B: Your problem with C++ is that you want it to be like Game Maker...
Offline Profile Quote Post Goto Top
 
MysteriXYZ
Member Avatar
Master Matrix Masher
[ *  *  *  *  *  * ]
How about changing the transparency of the materials based on the distance? When it's further away than the maximum distance, you can set it to a room invisible to the camera.
U3D is like candy; after extensive consumption, it's Best to brush.
Offline Profile Quote Post Goto Top
 
Linkin
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Yes,i am putting a system in the Multiple Models example for this. It makes a much nicer effect.
Posted Image
Want something done in Photoshop, make a request Here

Formerly known as DS-Development.
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
The usual answer to this problem (as practiced in hundreds of games) is the use of fog in combination with the far clipping plane (camera.max_range). What you want to do would be quite inefficient.
Offline Profile Quote Post Goto Top
 
Zedman3d
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Yeah, how would i change the alpha of materials the further i go back? (after about 50), it never ever works for me. Im asking because my stupid way of making about 10 if statements is all i know. But i just want to know for reference now if its going to be a slow down.
Quote:
 
Eanbro: My problem with C++ is that not everything is included to start making projects with it.
Quote:
 
Dr.B: Your problem with C++ is that you want it to be like Game Maker...
Offline Profile Quote Post Goto Top
 
MysteriXYZ
Member Avatar
Master Matrix Masher
[ *  *  *  *  *  * ]
Try the following:
Code:
 
var Alpha;

Alpha=(1-min(1,Dist/50))*255;

where Dist is the distance to the object.
U3D is like candy; after extensive consumption, it's Best to brush.
Offline Profile Quote Post Goto Top
 
Zedman3d
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Cool, looks good. Thank you.
EDIT: Whats not draw again?
Quote:
 
Eanbro: My problem with C++ is that not everything is included to start making projects with it.
Quote:
 
Dr.B: Your problem with C++ is that you want it to be like Game Maker...
Offline Profile Quote Post Goto Top
 
MysteriXYZ
Member Avatar
Master Matrix Masher
[ *  *  *  *  *  * ]
Zedman3d
Nov 29 2007, 10:53 PM
Whats not draw again?

You can set the object to a room that is invisible to the camera. So in the camera Create Event, you can put (after the call to MoveCamera()):
Code:
 
SetRoomVisibility(1,false);

Then you can add the following to the code in my previous post:
Code:
 
if (Dist > 50) SetObjectRoom(1)
else SetObjectRoom(0);//or any other room previously defined as visible
U3D is like candy; after extensive consumption, it's Best to brush.
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply