Mes petits problèmes

Partagez vos trucs et astuces concernant la réalisation des maps et des modèles.

Modérateurs : Sadd, Asche

Répondre
Avatar du membre
Newin
Ancien responsable UTF
Messages : 106
Enregistré le : 07 juil. 2010, 00:07

Mes petits problèmes

Message par Newin » 25 févr. 2011, 00:56

Voila Voila, je suis en train de crée un map assée réaliste pour me permettre d'évoluer dans le mapping et certain problèmes me font face.
Cherchant sur le net en quête de réponses il mais dur de trouver des solutions et des comment du pourquoi.
Je crée donc se sujet pour vous demander votre aide à vous mappeur hors paire ayant déjà surmonter ces obstacles et à vous qui avez les mêmes problèmes mais qui n'oser pas demander ;D

Ma première question se portera sur comment trouer une texture. Voila j'ai essayer nombre de fois de crée un image .tga avec un calque alpha mais pourtant dans le jeu la transparence est remplacer par du noir.
Je voudrais crée une texture possédant de petites particules blanches réagissant à la lumière ambiante et qui se déplace très lentement sur la texture transparente de façon a crée un effet de poussière dans un trait de lumière similaire au particules présentes dans l'eau de World of Warcraft pour ceux qui connaissent.
Pour le moment mon script ressemble à ça :

Code : Tout sélectionner

textures/newin/particules
		
	{
		qer_editorimage textures/newin/particules.tga
		qer_trans .5
		q3map_globaltexture
		surfaceparm trans
		surfaceparm nonsolid
	
		cull disable
		
		{ 
			map textures/newin/particules.tga
			blendFunc GL_dst_color GL_one
			rgbgen identity
			tcmod scroll .05 .01
		}	
		{
			map $lightmap
			blendFunc GL_dst_color GL_zero
			rgbgen identity		
		}
	

	}
Ma texture n'a pas l'air de bouger et la transparence n'y est pas.

Une autre petite question, je voudrais savoir comment faire pour que le son qu'émet les pas du personnage change en fonction du terrain ou il marche.

Voila c'est tous pour le moment et je remercie encore les modérateurs et les autres mappeurs qui aide les débutants à régler leurs problèmes ;D

Avatar du membre
Asche
Expert mapping & modding + Participant Powerban
Expert mapping & modding + Participant Powerban
Messages : 2650
Enregistré le : 02 août 2009, 23:08
Localisation : #unity-team

Re: Mes petits problèmes

Message par Asche » 25 févr. 2011, 01:10

Salut,

Je suis trop fatiguer pour trouver ce qui ne va pas dans ton Shader, mais y'a un truc qui m'a sauté au yeux...

Une erreur que beaucoup beaucoup de gens font avec les shaders...

Enfint, c'est pas vraiment une erreur, c'est surtout un moyen de pas se gourer au moment d'appliquer la texture dans GTK Radiant.

Donc, tu a créer une texture shadérisé que tu a placé dans "textures/newin/particules"
Donc la déjà, dans GTK, tu trouvera en appuyant sur "T" un dossier "newin" qui contient "particules", la texture shadérisé.
Bien.

MAIS

Si j'en crois ton shader, une textures non shadérisé, bien réelle en tga existe déjà dans "textures/newin/", et cette texture se nomme aussi "particules"

Donc la clairement, il est juste possible que ton shader n'apparaisse pas dnas GTK parce que tu as déjà une texture réelle portant le même nom, au même endroit...et que tu est donc appliqué dans ta map, la textures "normale" placé dans "textures/newin/" physiquement.

Tu comprend ?

Essaye avec ce shader :

Code : Tout sélectionner

textures/NewinShader/particules
      
   {
      qer_editorimage textures/newin/particules.tga
      qer_trans .5
      q3map_globaltexture
      surfaceparm trans
      surfaceparm nonsolid
   
      cull disable
      
      {
         map textures/newin/particules.tga
         blendFunc GL_dst_color GL_one
         rgbgen identity
         tcmod scroll .05 .01
      }   
      {
         map $lightmap
         blendFunc GL_dst_color GL_zero
         rgbgen identity      
      }
   

   }
Je n'ai rien modifier à par la première ligne :

textures/NewinShader/particules

Donc la ta texture avec l'effet que tu a scripté se trouvera dans "NewinShader" et pas dans "newin".

PS : A tu bien remplit le "shaderlist.txt" aussi ?
Asche's Soundcloud
Album en cours : Dubstination (Dubstep) et Hyptonium (Trance)

*Beaucoup d'occupation en ce moment !*
_________________
I Love Prius

Avatar du membre
Newin
Ancien responsable UTF
Messages : 106
Enregistré le : 07 juil. 2010, 00:07

Re: Mes petits problèmes

Message par Newin » 25 févr. 2011, 02:17

Cool, merci de ta rapidité ;D
Alors j'ai suivit ce que tu ma dit et j'ai repris un shader déjà existant que j'ai bidouiller et le résultat est nickel ;D

Pour ceux qui veulent le code :

Code : Tout sélectionner

textures/newinshader/particules
{
        surfaceparm trans	
        surfaceparm nomarks	
	surfaceparm nonsolid
	surfaceparm nolightmap
	cull none
	{
		map textures/newin/particules.tga
                tcMod Scroll .01 .03
                blendFunc GL_ONE GL_ONE
        }
}
Voila c'est tous bête. Je pense rajouter un petit effet de vague pour augmenter le réalisme.

Avatar du membre
Newin
Ancien responsable UTF
Messages : 106
Enregistré le : 07 juil. 2010, 00:07

Re: Mes petits problèmes

Message par Newin » 26 févr. 2011, 00:24

Après avoir passer ma journée à chercher l'origine d'une erreur et après l'avoir résolut, un deuxième problème me tombe sur le coin de la gueule ><
Cette fois si je préfère vous montrer un screen.
http://newin.site.free.fr/images/autre/shot0094.jpg

Si vous avez une idée de comment mètre la taille originel des textures je serais heureux :D
Voici une image de la map sur easygen :
http://newin.site.free.fr/images/autre/easy.JPG

Je n'est jamais eu se problème avant. Je pense que se doit être une répercussion du premier problème ><
Voici le shader si jamais le problème est dedans.

Code : Tout sélectionner

textures/abyss/terrain_0
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	{
		map textures/stone/mxrock0b.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_1
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	{
		map textures/terrain/mountain_c06.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_2
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	{
		map textures/terrain/mountain_m09.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_3
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	{
		map textures/stone/mxrock2bo.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_4
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	{
		map textures/stone/mxrock4b.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_0to1
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	
	{
		map textures/stone/mxrock0b.tga
	}
	{
		map textures/terrain/mountain_c06.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_0to2
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	
	{
		map textures/stone/mxrock0b.tga
	}
	{
		map textures/terrain/mountain_m09.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_0to3
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	
	{
		map textures/stone/mxrock0b.tga
	}
	{
		map textures/stone/mxrock2bo.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_0to4
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	
	{
		map textures/stone/mxrock0b.tga
	}
	{
		map textures/stone/mxrock4b.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_1to2
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	
	{
		map textures/terrain/mountain_c06.tga
	}
	{
		map textures/terrain/mountain_m09.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_1to3
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	
	{
		map textures/terrain/mountain_c06.tga
	}
	{
		map textures/stone/mxrock2bo.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_1to4
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	
	{
		map textures/terrain/mountain_c06.tga
	}
	{
		map textures/stone/mxrock4b.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_2to3
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	
	{
		map textures/terrain/mountain_m09.tga
	}
	{
		map textures/stone/mxrock2bo.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_2to4
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	
	{
		map textures/terrain/mountain_m09.tga
	}
	{
		map textures/stone/mxrock4b.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain_3to4
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	
	{
		map textures/stone/mxrock2bo.tga
	}
	{
		map textures/stone/mxrock4b.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/abyss/terrain.vertex
{
	{
		map textures/stone/mxrock0b.tga
		rgbGen vertex
	}
}
Sinon pour finir voici le shader qu'a donner le premier post ( les particule bouge dans le jeu ):
http://newin.site.free.fr/images/autre/shot0095.jpg

Quand j'aurais finis ma recherche sur les shader je ferais un pack pour les gens que sa intéresse.
Encore merci de votre aide ;D

Avatar du membre
Newin
Ancien responsable UTF
Messages : 106
Enregistré le : 07 juil. 2010, 00:07

Re: Mes petits problèmes

Message par Newin » 05 mars 2011, 15:56

Je revient car je n'est toujours pas régler le problème de transparence sur mes .tga
J'ai pourtant tous essayés mais rien ne va, a chaque fois sa ne marche pas.

http://newin.site.free.fr/images/metal01.tga

Voici mon image et je voudrais savoir que ce qui ne va pas ?

Voila en espérant trouver la solution à ce problème pertinent.

Avatar du membre
Sniipouse
Messages : 239
Enregistré le : 25 juil. 2010, 23:08
Localisation : France

Re: Mes petits problèmes

Message par Sniipouse » 06 mars 2011, 01:50

Il te suffit d'un shader pour retirer le blanc de l'image

Code : Tout sélectionner

textures/abyssshader/metal01
{
	qer_editorimage textures/abyssshader/metal01.tga
	{
	map textures/abyssshader/metal01.tga
	blendFunc GL_ONE GL_ONE
	rgbGen identity
	
	}
}
Mais celui la retire le noir je sais pas quoi changer pour qu'il retire le blanc de l'image.
[GhosT]`$N!P3R` / Snipouse
TS3 [GhosT] Team: [url=ts3server://serv.cl3791.fr]serv.cl3791.fr[/url]
No cheat, no rage, Fair-play

Avatar du membre
Newin
Ancien responsable UTF
Messages : 106
Enregistré le : 07 juil. 2010, 00:07

Re: Mes petits problèmes

Message par Newin » 06 mars 2011, 20:36

Shiteur : Merci beaucoup de ta réponse, sa ma énormément aider car je ne me douter pas que ce soit le shader qui puisse rajouter de la transparence ;D

Voila mon shader ( je l'est pris de la grille de eagle ) pour ceux qui ont le même problème :

Code : Tout sélectionner

textures/cube/grille
{
	qer_editor_image textures/cube/grille
	qer_trans 0.40
	cull disable
	{
		map textures/cube/grille
		alphaFunc GE128
	}
	{
		map $lightmap
		rgbGen identity
		blendFunc GL_DST_COLOR GL_ZERO
		depthFunc equal
	}
}
Mais n'y à t'il pas un moyen pour qu'on puisse crée un dégrader transparent ? Je m'explique, j'ai une image avec des taches de sang par exemple et je voudrais que le font soit transparent et que la tache puisse s'intégrer parfaitement sur la surface ou elle est collé ( la tache soit un peu transparente avec un petit dégrader en sont tour) . Pour le moment je n'arrive a crée seulement des découpes brusque.

Voila j'imagine qu'il doit y avoir une solution, c'est donc pour ça que je fais appelle à vous.

Encore merci de votre aide sa m'aide énormément à avancer.

Répondre