3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: 1 Texture Several RigidBodies  (Read 1560 times)

« on: January 09, 2010, 08:32:39 PM »
Is it possible to have just one texture that several rigid bodies share?

I have split a terrain into several smaller rigidbodies. But when I split the texture it doesn't align correctly or shows seams between the RB's. BUT! If I use the full texture for each RB the seams go away.

Would it be any less resource intensive if I just had one texture that all the RB's shared? Or is it even possible?
« Reply #1 on: January 10, 2010, 04:56:00 AM »
You could use the same texture, but I don't know if it is not going to be loaded for every rb.
FPS game creator for 3drad and >2000 games GamesAtNight
« Reply #2 on: January 10, 2010, 05:07:20 AM »
If the texture is the same Rad loads it only once!
« Reply #3 on: January 10, 2010, 11:44:04 AM »
The same texture is only loaded once, but only if it is the same file. That is, if the texture file is the same, but duplicated in different folder, 3drad will no longer identify it as the same texture, even if the files is identical.

For performance reasons, 3drad doesn't compare file data to see if two textures are the same. Instead it compares the file path.

« Reply #4 on: January 10, 2010, 02:59:19 PM »
I tried using one texture, place in a seperate folder but the texture doesnt show in the editor. The path to the texture shows correctly in the .x file. Where should the texture folder be located??
« Reply #5 on: January 10, 2010, 05:17:53 PM »
It appears that no matter where I put the texture and set the correct path 3drad doesnt find it. I also find that no matter what the path in the .x file says, if the texture is in the same folder with the .x file it shows fine. What am I doing wrong??
« Reply #6 on: January 11, 2010, 03:37:00 AM »
All textures must be in the same folder as the .x file. 3D Rad only uses the filename. The path is ignored.
« Reply #7 on: January 11, 2010, 06:42:20 AM »
Well this is confusing

For performance reasons, 3drad doesn't compare file data to see if two textures are the same. Instead it compares the file path.
All textures must be in the same folder as the .x file. 3D Rad only uses the filename. The path is ignored.
« Reply #8 on: January 11, 2010, 07:50:54 AM »
Before loading a texture, 3drad builds the path to the texture by combining the .x file path and the texture file name specified inside the .x file. It ignores any file path specified inside the .x file.

Then, before loading the texture, 3drad checks if a texture with the same file path and file name was already loaded. If it was, instead of loading the file again, it simply re-uses the texture already loaded (already in memory).

Pages: [1]