•  Map-Craft Tutorials  •  Forums  •  Profile  •  Members List  •  Private Messages  •  Logout  •  

Menu   

 

HomeHome  
    Home
Map-Craft  
    Forums
    Tutorials New
    Reviews
    Site Map
    Site Search
Members  
    Your Account
    Shout Box
Files, Links & Docs  
News & Stats  
    News Archive
    Submit News
    Top Read Stories
Other  

Shout Box   

 


Only registered users can shout. Please login or create an account.

Latest 10 Tutorials   

 

Tool Box   

 


Google Powered
Google Map-Craft
Google Web


Site search

Forum search

Advanced Forum Search


Translate this page:




Search for at
www.map-craft.com Advanced Search
rotating textures

Post new topic  Reply to topic  printer-friendly view www.map-craft.com Forum Index -> JK scripting & shader area
View previous topic :: View next topic
Author Message
Lazarus
V.I.P.
V.I.P.



Joined: May 11, 2005
Posts: 842
Location: The Hague, Holland

Status: Offline
Title: Coffee Criminal
Game: JKA
PostPosted: Mon Feb 08, 2010 8:55 pm Post subject: rotating textures Reply with quote

I wonder if there is an easier way for this (like in a shader) to make a texture spin... I have this target shader i made, now i have it just simply applied to a brush with no draw and origin, made it into a func rotate, but is it possable also to do this with a shader, i searched through the shaderED but i couldn't find any of this.






The thought of Rosh Penin doing the Macarena makes me want to saber myself.

~ChernyVolk

Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
lassev
V.I.P.
V.I.P.



Joined: Jun 17, 2006
Posts: 1134
Location: Finland

Status: Offline
Title: Degenerate scripter
Game: JKA
PostPosted: Mon Feb 08, 2010 9:05 pm Post subject: Re: rotating textures Reply with quote

I thought it was only a malicious rumour that some people use ShaderEd. But I guess reality is more wondrous than fiction.

Anyway, use tcMod rotate.


Punks in a house.
Back to top
View user's profile Send private message Visit poster's website
Lazarus
V.I.P.
V.I.P.



Joined: May 11, 2005
Posts: 842
Location: The Hague, Holland

Status: Offline
Title: Coffee Criminal
Game: JKA
PostPosted: Mon Feb 08, 2010 11:31 pm Post subject: Re: rotating textures Reply with quote

just wanna show it to you


Link


note the mining laser in the begin, but still work in progress.

And actually i dont use shadered, but i know it has preview function, which i do like, so i dont have to launch the game in order to see if it works

edit:: should be testing this but

Quote:

tcMod rotate degrees/sec
This keyword causes the texture coordinates to rotate. The value is expressed in degrees rotated each second. A positive value means clockwise rotation. A negative value means counterclockwise rotation. For example "tcMod rotate 5" would rotate texture coordinates 5 degrees each second in a clockwise direction. The texture rotates around the center point of the texture map, so you are rotating a texture with a single repetition, be careful to center it on the brush (unless off-center rotation is desired).


does this mean if i enter a negative ammount (so tcMod rotate -5) that it would go counter clock wise (cause that was my original intention; a few clockwise and 1 or 2 go counter)






The thought of Rosh Penin doing the Macarena makes me want to saber myself.

~ChernyVolk

Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Jedi_Mediator
Elder
Elder



Joined: Aug 01, 2006
Posts: 1221
Location: Sitting Here.

Status: Offline
Game: JKA
PostPosted: Mon Feb 08, 2010 11:39 pm Post subject: Re: rotating textures Reply with quote

Looks like you got it. Very Happy 2




Prolong your life! A day of routine lasts a minute; a day of variety lasts a year.   ~Me

[/rant]   I'm done now...     ~NAB622

I don't think in my mind, I think inside forum posts. :D  ~Pande
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lazarus
V.I.P.
V.I.P.



Joined: May 11, 2005
Posts: 842
Location: The Hague, Holland

Status: Offline
Title: Coffee Criminal
Game: JKA
PostPosted: Tue Feb 09, 2010 2:27 pm Post subject: Re: rotating textures Reply with quote

Well not exactly, what you saw in that movie was actually the way i used to do it.

I bumped into a weird problem though

Code:

textures/Imperial_Base/target1
   {
   surfaceparm nonopaque
   surfaceparm nonsolid
   surfaceparm trans
   q3map_surfacelight 50
   q3map_backsplash 0.5 8
   q3map_lightRGB 255 150 0
   q3map_nolightmap
   cull twosided
   tcMod rotate 60
   {
      animMap 14 textures/Imperial_Base/target1 textures/Imperial_Base/target2 textures/Imperial_Base/target3 textures/Imperial_Base/target2 textures/Imperial_Base/target1 textures/Imperial_Base/target3
      blendFunc GL_ONE GL_ONE
      alphaGen const 0.4
      rgbGen wave sin 0.75 0.05 0 5
   }
}


tcMod rotate doesn't seem to work on my texture (it makes the texture appear as not present) this is purely out of thought, but is it actually possable to make an animmap rotate, or can it only be done with just a single texture?

Cause as soon as i remove the commando tcMod, it will operate just fine.






The thought of Rosh Penin doing the Macarena makes me want to saber myself.

~ChernyVolk

Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Jedi_Mediator
Elder
Elder



Joined: Aug 01, 2006
Posts: 1221
Location: Sitting Here.

Status: Offline
Game: JKA
PostPosted: Tue Feb 09, 2010 3:27 pm Post subject: Re: rotating textures Reply with quote

The problem is that you put it in the shader properties area instead of the shader stage itself. I don't see any reason you can't rotate an animmap. Try this shader instead (note the location of the rotate command):

Code:
textures/Imperial_Base/target1
   {
   surfaceparm nonopaque
   surfaceparm nonsolid
   surfaceparm trans
   q3map_surfacelight 50
   q3map_backsplash 0.5 8
   q3map_lightRGB 255 150 0
   q3map_nolightmap
   cull twosided
   {
      animMap 14 textures/Imperial_Base/target1 textures/Imperial_Base/target2 textures/Imperial_Base/target3 textures/Imperial_Base/target2 textures/Imperial_Base/target1 textures/Imperial_Base/target3
      blendFunc GL_ONE GL_ONE
      alphaGen const 0.4
      rgbGen wave sin 0.75 0.05 0 5
      tcMod rotate 60
   }
}


But keep in mind that the tcMod rotate value is degrees per second. So the value you have right now might make it rotate fairly fast, but that's your call.

P.S.  Why would you ever want to "remove the commando?" They're cool. Razz (Most epic typo ever!)




Prolong your life! A day of routine lasts a minute; a day of variety lasts a year.   ~Me

[/rant]   I'm done now...     ~NAB622

I don't think in my mind, I think inside forum posts. :D  ~Pande
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lazarus
V.I.P.
V.I.P.



Joined: May 11, 2005
Posts: 842
Location: The Hague, Holland

Status: Offline
Title: Coffee Criminal
Game: JKA
PostPosted: Tue Feb 09, 2010 8:23 pm Post subject: Re: rotating textures Reply with quote

okay i am an idiot, point at laugh at me .. please ...  that i didnt realize i had to put it AFTER it animates, duh .. it makes so much sense.

And you gotta love me for typo's Smile






The thought of Rosh Penin doing the Macarena makes me want to saber myself.

~ChernyVolk

Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
NAB622
V.I.P.
V.I.P.



Joined: Jan 03, 2006
Posts: 1880
Location: I'm smart! I LAMINATED my box!

Status: Offline
Title: Comfortably crazy!
Game: JKA
PostPosted: Thu Feb 18, 2010 5:33 pm Post subject: Re: rotating textures Reply with quote

About that rotating thingy...I'd suggest separating the three rings into separate brushes that are just slightly separated (one in front of the other). That way you can look at it from the side and still see it.

I use ShaderED as well - it has a few JA specific functions in it that the q3 shader manual doesn't cover.


I have no idea how the Raven mappers didn't end up strangling the programmers. They must work in separate buildings with incompatible keycards...  -lassev


Ya but that was where NAB was going like 'hey thats nice'. Here I'm like 'brain just made a connection'. :D -Pande
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous:
Post new topic  Reply to topic   printer-friendly view www.map-craft.com Forum Index ->  JK scripting & shader area Time synchronized with your computer time
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum




Powered by phpBB © 2001, 2006 phpBB Group




PHP-Nuke Copyright © 2006 by Francisco Burzi.
All logos, trademarks and posts in this site are property of their respective owners, all the rest © 2006 by the site owner.
Powered by Nuke-Evolution.

This site is cached. Click here to update the cache.
[ Page Generation: 0.51 Seconds | Memory Usage: 6.28 MB | DB Queries: 57 ]