tcMod rotate

Having a problem with a shader or texture
Post Reply
RedSnappa
Posts: 323
Joined: Sun Aug 21, 2011 12:10 pm
Location: North Carolina (USA)

tcMod rotate

Post by RedSnappa »

I know how to implement a tcMod rotate, but it rotates about the origin of the map and not about the center of my texture/brushface. How to fix this?
[LCDLC]Snappa
LCDLC Mapmaking Dept.
Maps finished: Hellhouse, Sorry, Worrior 1-20
Maps modded: CubeOrigin
Maps in release candidate: Blockforts, Cannons 1, Hotzone, Icecastle
Maps in beta: Arctica, Cannons 2, Cerulean-River, Igloo, Skygarden, Spacestation
Maps in alpha: Merlin, Totem

User avatar
theRipper
Posts: 223
Joined: Tue Aug 30, 2011 1:57 pm
Contact:

Re: tcMod rotate

Post by theRipper »

Code: Select all

textures/example/example
{
   qer_editorimage textures/example/example.tga
   {
      map textures/example/example.tga
      tcmod rotate 800
      rgbgen vertex
   }
   
}

Image

User avatar
theRipper
Posts: 223
Joined: Tue Aug 30, 2011 1:57 pm
Contact:

Re: tcMod rotate

Post by theRipper »

how was the brush constructed/textured
Image

RedSnappa
Posts: 323
Joined: Sun Aug 21, 2011 12:10 pm
Location: North Carolina (USA)

Re: tcMod rotate

Post by RedSnappa »

It is a square prism with a centered/fit texture on one face and caulk on the other faces.
[LCDLC]Snappa
LCDLC Mapmaking Dept.
Maps finished: Hellhouse, Sorry, Worrior 1-20
Maps modded: CubeOrigin
Maps in release candidate: Blockforts, Cannons 1, Hotzone, Icecastle
Maps in beta: Arctica, Cannons 2, Cerulean-River, Igloo, Skygarden, Spacestation
Maps in alpha: Merlin, Totem

User avatar
Delirium
Posts: 366
Joined: Sat Aug 27, 2011 8:37 am
Location: Auckland, New Zealand

Re: tcMod rotate

Post by Delirium »

do you ever use the shader manual? tcmod rotate should use the texture face axis not the origin as an axis
Image

RedSnappa
Posts: 323
Joined: Sun Aug 21, 2011 12:10 pm
Location: North Carolina (USA)

Re: tcMod rotate

Post by RedSnappa »

Delirium wrote:do you ever use the shader manual? tcmod rotate should use the texture face axis not the origin as an axis

I do use the shader manual, and it isn't telling me how to solve this problem. Mine is using the origin as an axis, and I want it to use the texture face axis. Maybe clampTexCoords does something about this, but according to the manual, it seems to do something for stretching, not rotating.
[LCDLC]Snappa
LCDLC Mapmaking Dept.
Maps finished: Hellhouse, Sorry, Worrior 1-20
Maps modded: CubeOrigin
Maps in release candidate: Blockforts, Cannons 1, Hotzone, Icecastle
Maps in beta: Arctica, Cannons 2, Cerulean-River, Igloo, Skygarden, Spacestation
Maps in alpha: Merlin, Totem

User avatar
Delirium
Posts: 366
Joined: Sat Aug 27, 2011 8:37 am
Location: Auckland, New Zealand

Re: tcMod rotate

Post by Delirium »

try q3map_globalTexture
Image

RedSnappa
Posts: 323
Joined: Sun Aug 21, 2011 12:10 pm
Location: North Carolina (USA)

Re: tcMod rotate

Post by RedSnappa »

Delirium wrote:try q3map_globalTexture

I have this in my shader. Should I remove it?
[LCDLC]Snappa
LCDLC Mapmaking Dept.
Maps finished: Hellhouse, Sorry, Worrior 1-20
Maps modded: CubeOrigin
Maps in release candidate: Blockforts, Cannons 1, Hotzone, Icecastle
Maps in beta: Arctica, Cannons 2, Cerulean-River, Igloo, Skygarden, Spacestation
Maps in alpha: Merlin, Totem

RedSnappa
Posts: 323
Joined: Sun Aug 21, 2011 12:10 pm
Location: North Carolina (USA)

Re: tcMod rotate

Post by RedSnappa »

After further research, it appears that what I would have to do to make this work is to create a shader entry for each teleporter in my Spacestation map, specifying the tcMod translate function necessary to make each portal rotate correctly. I am not going to bother with this. What I will do instead is to make the wormhole texture have an alphaGen portal effect and put a camera entity showing where each portal goes.

EDIT: tcMod translate won't do it. This requires a tcGen function. It still requires a new shader for each portal though, which is why I won't be doing it.
[LCDLC]Snappa
LCDLC Mapmaking Dept.
Maps finished: Hellhouse, Sorry, Worrior 1-20
Maps modded: CubeOrigin
Maps in release candidate: Blockforts, Cannons 1, Hotzone, Icecastle
Maps in beta: Arctica, Cannons 2, Cerulean-River, Igloo, Skygarden, Spacestation
Maps in alpha: Merlin, Totem

Post Reply