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: Mirror tiled textures  (Read 2662 times)

« on: December 27, 2009, 12:27:30 AM »
Is there a way to map textures so that they are mirrored from each other? Does .x files suport this?
« Reply #1 on: December 27, 2009, 03:24:29 AM »
Yes you can uv map the .x any way you want in a modeler and apply tiled texture.
Not sure what you mean by mirroring tiles ?
« Reply #2 on: December 27, 2009, 09:38:03 PM »
Like this, but as you can see the plane had to be subdivided in order to mirror the tiles. I already know sketchup is incapable, but I was wondering if there are other modelers that can specialy tile textures this way.
« Reply #3 on: December 28, 2009, 02:22:48 AM »
Ah I see.
I don't really know. I suppose 3dsmax is the answer to most modeler stuff.  ???
« Reply #4 on: December 28, 2009, 04:41:16 AM »
hey rush, i've seen this trick used in many of my favorite Dreamcast games, in Sonic Adventure 2 there are some very creative uses of UVing... i use it in my projects a lot even in the racer demo as seen below



but, you have to use the geometry to do so... i mean you cant use various mirrored tiles on one face
« Reply #5 on: December 28, 2009, 08:38:28 AM »
or maybe with shaders?
genetransfer, what do you think?
« Reply #6 on: December 28, 2009, 12:36:11 PM »
I c.. Yea, they use this kind of texturing in some N64 games too.
-and yea, that would be awesome to have a shader...
« Last Edit: December 28, 2009, 12:41:12 PM by Rush3Fan »
« Reply #7 on: December 28, 2009, 06:39:14 PM »
hi everone,
it's actually very simple to do in any shader (but only do it for the diffuse texture as it will mess up a normal map unless generating the normal map on the fly based on a diffuse map but that's another shader altogether, but if you just need diffuse then this is the best answer)

in the texture sampler section of the shader code:

add or modify: AddressU,AddressV(alternatley aswell AddressW) (edit: usually this is set to WRAP)

Code: [Select]
sampler2D ColorSampler = sampler_state {
    Texture = <diffuseMap>;
    MinFilter = Linear;
    MipFilter = Linear;
    MagFilter = Linear;
   //---
    AddressU = MIRROR;
    AddressV = MIRROR;
   //---
};

other adress handle for UVW are: border,clamp,mirror,mirroronce,wrap

hope that is helpful. :)
« Last Edit: December 28, 2009, 06:47:56 PM by genetransfer »
using 3Drad 7.22

system specs:
Windows 7 Home Premium 64-bit
Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (4 CPUs), ~3.2Ghz
8 gig ram
Geforce GTX 650 1024 MB GDDR5
DirectX 11
« Reply #8 on: December 28, 2009, 07:08:54 PM »
Works like a charm :)
« Reply #9 on: December 28, 2009, 08:49:25 PM »
Ahh, I give up... :-[ Could you post all of the code for this shader please?
« Reply #10 on: December 28, 2009, 08:59:26 PM »
Oh, ha ha.. I had it working all along.. just needed a different mesh.. But this is anoying now.. because I loose the defult shaders then. Is there anyway to copy them to use in the custom shaders?

P.s. I need to do this using the bump shader.
« Last Edit: December 28, 2009, 09:02:27 PM by Rush3Fan »
Pages: [1]