Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi G - M > Grafica e immagini digitali > Texture
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
alealex
.precettore.

User info:
Registered: Mar 2008
Posts: 86 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 16:22:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Texture

Scusate ragazzi ma stò impazzendo con le texture...
Allora: io ho qst semplicissimo file Rib (una sfera)

Option "searchpath" "shader" [".:./shaders:&"]
Option "searchpath" "texture" [".:./textures:&"]

Format 640 480 1

Display "teapots.tif" "tiff" "rgba"
Projection "perspective" "fov" [24]

Transform [0.947768 -0.137508 -0.287796 0 -1.38778e-017 0.902297 -0.431115 0 -0.318959 -0.408597 -0.855169 0 -2.04281e-014 -2.24265e-014 17.9935 1]

WorldBegin
LightSource "ambientlight" 0 "intensity" [0.1] "lightcolor" [1 1 1]
LightSource "pointlight" 1 "intensity" [650]"lightcolor" [1 1 1]"from" [12 10 10]
LightSource "pointlight" 2 "intensity" [200]"lightcolor" [1 1 1]"from" [-12 5 15]

AttributeBegin
ConcatTransform [1 0 0 0 0 1 0 0 0 0 1 0 2 1 0 1]
Rotate 90 1 0 0
Surface "myTexture" "string texDiffusive" "noise3.tx" "string texName" "legologo.tx" "float ss" -4 "float tt" 4
Color [1 0 0]
Sphere 1 -1 1 360
AttributeEnd


AttributeBegin
Scale -100 -100 -100
Surface "constant"
Color [0.3 0.3 0.3]
Sphere 1 -1 1 360
AttributeEnd
WorldEnd


il mio shader di nome "myTexture" invece è qst (mette come texture un'immagine)...

surface myTexture (string texName = "", texDiffusive = ""; float ss = 1, tt = 1, Kd = 0.5)
{
color myColor;
float myKd;
normal Nf;
Nf = faceforward( normalize(N), I);

if (texDiffusive == "")
myKd = Kd;
else
myKd = float texture (texDiffusive, s * ss, t * tt);

if (texName == "")
myColor = Cs;
else
myColor = texture( texName , s * ss, t * tt);

Ci = myColor * myKd * diffuse(Nf);
}

Il problema è che so lo renderizzo, si vede l'immagine del lego ma è nera al posto di essere rossa. Non riesco a capire il perchè...
Per trasformare l'immagine da TIFF a TX ho usato qst comando:

texmake legologo.tiff -smode periodic -tmode periodic -filter gaussian legologo.tx

Qualcuna mi può aiutare???...GRAZIE!!!!

01-12-2008 09:18
Click Here to See the Profile for alealex Click here to Send alealex a Private Message Find more posts by alealex Add alealex to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ButterFlower
.arcimaestro.

User info:
Registered: Oct 2007
Posts: 443 (0.07 al dì)
Location:
Corso: Comunicazione Digitale
Anno:
Time Online: 9 Days, 22:21:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

prova a controllare che questi path:

Option "searchpath" "shader" [".:./shaders:&"]
Option "searchpath" "texture" [".:./textures:&"]

corrispondono veramente a dove sono posizionate le texture nelle tue cartelle!


però non so.....sinceramente l'ho sparata un po li!:D
non ci capisco tanto nemmeno io!:D

01-12-2008 09:42
Click Here to See the Profile for ButterFlower Click here to Send ButterFlower a Private Message Visit ButterFlower's homepage! Find more posts by ButterFlower Add ButterFlower to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
*°§_-???
-.-''

User info:
Registered: Oct 2005
Posts: 383 (0.06 al dì)
Location: Milan (again)
Corso: Comunicazione Digitale
Anno: (3+x) | x>0
Time Online: 10 Days, 4:34:18 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Dico una cosa che probabilmente è assolutamente inutile, ma hai provato a passare i parametri dello shader che richiami dal rib nello stesso ordine in cui sono nella dichiarazione dello shader?

__________________
:pccrash::pccrash:

03-12-2008 12:03
Click Here to See the Profile for *°§_-??? Click here to Send *°§_-??? a Private Message Find more posts by *°§_-??? Add *°§_-??? to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
nasty121
.precettore.

User info:
Registered: Mar 2008
Posts: 98 (0.02 al dì)
Location: Milano, IV OG
Corso: Comunicazione Digitale
Anno: 3° anno
Time Online: 8:35:25 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
same problem

Ciao!

Anch'io ho lo stesso problema, applico la texture del lego e ottengo la sfera nera con il logo.
Continuo a rileggere il rib e lo shader, ma non trovo un possibile errore...

Chi ha un idea, mi sembra che a lezione era uscito lo stesso problema (ma all'epoca io mi ammazzavo ancora x installare pixie :shock:)..

HELP!

18-01-2009 18:29
Click Here to See the Profile for nasty121 Click here to Send nasty121 a Private Message Find more posts by nasty121 Add nasty121 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
nasty121
.precettore.

User info:
Registered: Mar 2008
Posts: 98 (0.02 al dì)
Location: Milano, IV OG
Corso: Comunicazione Digitale
Anno: 3° anno
Time Online: 8:35:25 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Re: same problem

Originally posted by nasty121
Ciao!

Anch'io ho lo stesso problema, applico la texture del lego e ottengo la sfera nera con il logo.
Continuo a rileggere il rib e lo shader, ma non trovo un possibile errore...

Chi ha un idea, mi sembra che a lezione era uscito lo stesso problema (ma all'epoca io mi ammazzavo ancora x installare pixie :shock:)..

HELP!


PS: shader di texture e bump vanno nella cartella Shader o Texture?

18-01-2009 18:37
Click Here to See the Profile for nasty121 Click here to Send nasty121 a Private Message Find more posts by nasty121 Add nasty121 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jonny86
.illuminato.

User info:
Registered: Jun 2007
Posts: 197 (0.03 al dì)
Location: Prov. Como
Corso: Comunicazione Digitale
Anno: terzo
Time Online: 2 Days, 10:54:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Il problema potrebbe stare nella texture stessa.

Avete provato a creare voi un'altra texture col comando texMake da prompt?
Per chi non lo sapesse fare, caricate in photoshop un immagine, la salvate in tif e quando esce la finestra con le specifiche di salvataggio (si chiama Opzioni TIFF) selezionate in basso "Elimina livelli e salva una copia".

Poi nel prompt fate:

texmake vostraIMG.tif nuovatexture.tx

dove vostraIMG.tif è la vostra immagine tif e nuovatexture.tx è il file tx che andate a creare (il nome lo scegliete voi, l'importante è l'estensione).

Se non avete provato magari il problema sta proprio nella texture.

18-01-2009 19:58
Click Here to See the Profile for jonny86 Click here to Send jonny86 a Private Message Find more posts by jonny86 Add jonny86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Hiroj
.primate.

User info:
Registered: May 2006
Posts: 68 (0.01 al dì)
Location:
Corso: Comunicazione Digitale
Anno:
Time Online: 14:45:18 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by jonny86
Il problema potrebbe stare nella texture stessa.

Avete provato a creare voi un'altra texture col comando texMake da prompt?
Per chi non lo sapesse fare, caricate in photoshop un immagine, la salvate in tif e quando esce la finestra con le specifiche di salvataggio (si chiama Opzioni TIFF) selezionate in basso "Elimina livelli e salva una copia".

Poi nel prompt fate:

texmake vostraIMG.tif nuovatexture.tx

dove vostraIMG.tif è la vostra immagine tif e nuovatexture.tx è il file tx che andate a creare (il nome lo scegliete voi, l'importante è l'estensione).

Se non avete provato magari il problema sta proprio nella texture.


Ti adoro!!! :-D Non mi ricordavo più sto fatto del texmake! Tnx ^^

__________________
Presta a tutti il tuo orecchio, a pochi la tua voce - W. Shakespeare

18-01-2009 20:54
Click Here to See the Profile for Hiroj Click here to Send Hiroj a Private Message Find more posts by Hiroj Add Hiroj to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
nasty121
.precettore.

User info:
Registered: Mar 2008
Posts: 98 (0.02 al dì)
Location: Milano, IV OG
Corso: Comunicazione Digitale
Anno: 3° anno
Time Online: 8:35:25 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

notevole il comando texMake! quanto sono ignorante...?

cmq a parte aver creato la texture tx, il problema io non sono riuscito a risolverlo (tra l'altro photoshop a me non da l'opzione "discard layers and copy"..).

Credete sia un problema di texture o di parametri nel rib?

20-01-2009 08:37
Click Here to See the Profile for nasty121 Click here to Send nasty121 a Private Message Find more posts by nasty121 Add nasty121 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jonny86
.illuminato.

User info:
Registered: Jun 2007
Posts: 197 (0.03 al dì)
Location: Prov. Como
Corso: Comunicazione Digitale
Anno: terzo
Time Online: 2 Days, 10:54:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Io ti dico che se non mettevo quell'opzione in photoshop, in fase di creazione texture col texmake mi dava errore ... una cosa sui livelli dell'immagine e roba simile, quindi se sei riuscito a creare la texture teoricamente dovrebbe essere andato tutto bene...

L'unica differenza tra il vostro codice e il mio (funzionante) è che io casto esplicitamente il colore della texture:

myColor = color texture( texName , s * ss, t * tt);

Che sia questo? Mi ricordo che una volta Viale aveva consigliato di castare sempre...

20-01-2009 18:10
Click Here to See the Profile for jonny86 Click here to Send jonny86 a Private Message Find more posts by jonny86 Add jonny86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 08:18.    Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.042 seconds (72.81% PHP - 27.19% MySQL) con 26 query.