Nail in pain - Upgrade

Ok. It’s today’s upgrade with MHsssbeta script test. Maybe at the end of week or at weekend i’ll have a bit more time to finish it as i want. Actual stage - verte.

http://gallery.mudpuddle.co.nz/albums/album21/imptoolset.jpg

Hehe. Since then i’m plastic monkey.

My last tests with basic modeling methods / first stage:

http://gallery.mudpuddle.co.nz/albums/album21/toolsetbooleanprepostav.jpg

Acctual stage at the post reply below.

Something in well known ID Software style

Yep! I’v got beautifull scenario, technology and skills to fight for Quake IV intro! Everyone here saw Doom3 intro moovie. I can do it better. Next time i’ll show something bigger and more spectacular in this theme.

http://gallery.mudpuddle.co.nz/albums/album21/nineinchnailinpain_001.png

Nine Inch Nail in Pain:
http://gallery.mudpuddle.co.nz/albums/album21/nineinchnailinpain.gif

Avi [divix 5.1]
Nineinchnailinpain.avi

Why not? I’m ready to Rock’n Roll and to challenge for this:

3D Character Artist

Say what you want. I’m going in.

Greetings!

To do Blender 2.37.
I wana to animate barbed wires along bezier curves [the same way as it is in 3D Max]!

3D finger tool to mix meta objects/ liquids with different materials manually [substitute of 2D smudge tool].

Idea to try:
Can one curve act both as path and taper? …animate taper buthead…

Big thanks to Alltaken for support with hosting for the while, untill sixmonkeys is down!

Look for Blender Boolean Operations at http://imageshack.us

If you are inpatient query this header to get direct images links.

That’s good metal. (still) Image is actually pretty good too.

Everything looks right, just not photo. Hard to say why, but my thoughts: table is gameish, maybe using actual geometry? Yellow handle is too saturated and over lit? Pipe wrench is too blue?

Screwdriver and nuts and bolts though are excellent. Lot of good work there.

As you rightly notticed i have a lot to do. It’s fast theme and minor image, that’s why i wanted waste time with UV maps. I forgot to add “meta” liquids at floor [f.e. blood mixed with oil] to break boring surface.

Now i think i’ll do it again with full bump and UV maps [why not try it with Virtua Light or Render Man;?].

Big thanks!


Apropos.
If here is somebody from BlenderMan or blender.org, feel free to use my published graphics and files if you want. That’s what they are made for.

Hi burt.S:

Very good texturing, photoreal in my eyes. The bumps of the underlying plane seem a bit small compared to the tools, but that’s obviously a judgement call…

can I have that background plane texture?

.b

This is a masterpiece of 3d artwork. It almost brings a tear to my eye as I sit in front of a computer and remember the good days of blood and sweat working in construction. Sweet render man. I will use this for my desktop.

Blend on!

The nail holes look too clean also …maybe something else to think of when doing the bumps for the wood :wink:

Great work!!

Really good modeling. Only crit would be that everything is too clean. Dirt, dust, grime and grease should be all over the stuff. Also nicks , scratches and dents.

The nail in pain thing is great. Tordant! (pun intended.)

Here are the best 3DMax.ru Over 6000 high quality textures! All sets from all 3D apps:)

If you wana more, or full sets of standard 3D Max resources, look for some Czech 3D/3D Max/foto pages. They have the best and most complette texture[photo resources] for 3D i found all over the web.

As i read in newsletter. Funy things apropos hipocrycy. Did you hear about Linus Torvalds? He uses Power Mac G5 platform to develop his linux. When he was asked why? Se said “…that’s why, because i’m technologic bitch …” hehe

I think so too. That’s why today’ll be upgrade:). More wiped metall stuff.

I have to lack and improove some proportions to be closer to realms. I want to add some little springs and moove scene back to Debian or BSD to use *.so [With MS essentiall plugins doesn’t work at all, or work wrong with the right settings range/the same scene exported to linux/BSD blender version works fine /with afterglow.dll f.e. i’v got effect similar to solarisation, with Zblur.dll and Ipos nothing happens:].

very nice piece of art, but the hammergrip looks a bit plastic?[/img]

So it means that it looks just like it should look. It’s made of goom.
Next time i’ll break monotony with little bump pattern.

Could you share some of the metal material settings? I really like them and need them for a current project.

I horibly think, that i know what you exactly mean about. Ok. Let’s do it :x / i’ll try to fake Maya’s Brush 3D tool.

Here is your *.blend file:

screw.blend
http://gallery.mudpuddle.co.nz/albums/album21/screw.jpg

Ok.
50$ for service
25$ for express support
25$ for included knowledge
50% taxes.

I’ll post you a bill some later;). Hehe. Have i better day today or am i wrong?

Have a nice work.
:wink:

you usee the same texture as my goat.its a good one huh

Acctual stage of my img:

http://gallery.mudpuddle.co.nz/albums/album21/toolsetimp.jpg
Some about russian steel hehe :slight_smile:

Heavy tested 100% functionall VirtuaLight Exporter

http://gallery.mudpuddle.co.nz/albums/album21/vlightshoot.jpg
I personally checked it and i did little changes to overcome minor module problems with all popular architectures and OS’s with all blender
2.3 tree versions!
Get VirtuaLight 1.4
Get all about shaders, materials, lighting
Get all you need to know about Render Man standard
Get Siggraph courses
Look here, the best specialists after Siggraph and Disney - RenderMan.ru

Usefull keywords: RenderMan, VirtuaLight,BMRT,Realistic Render Man, Siggraph, 3Delight, Lightflow, Air, AQSIS, ENTROPY, … Render Man Underground
e.t.c.

VirtuaLight.2.3x.py listing:


#!BPY

""" Registration info for Blender menus:
Name: 'VirtuaLight 1.4'
Blender: 23x
Group: 'Misc'

---Start cutting here ---
Checked with Blender 2.31~2.36 python 2.23, 2.3 

Some tips by Burt.S. [email protected]: 
1.  Download Virtual Light 1.4 with rich documentation from http://www.virtualight.com.

2.  Linux and BSD, Uni(x) users should just download CrossoverOffice or wine/x/Cedega recomended/ 
to launch it![Succesfully tested with Debian, Slackware, FreeBSD 5.0].
3.  Explore network, download MS Windows trial versions [win 95/98] to install VLight with it,than
 get full registry with keys you need, copy "regedit.exe" and all windows tools from trial and use it with your wine.
4. Use regedit.exe with wine to copy keys or import full *.reg file to your wine.
5.  Use Crossover Office *.config files as best source of tricks to configure your self compilated,
 more stable wine server. To implement DirectX to your own wine compilation just install DX with your trial
 windo(z) and, use emacs to listen and log all changes made by DX setup, and implement all instaled components, 
 registry and files to your wine, just watch differences inside your trial windows before and after installing DX.
 All you need to get them and force to work is emacs.
6.  Remember about correct --winver [3.1/95/98/NT] parameter during wineserver launch from your shell
 level to match your registry version'. Watch out at your Xterm perrmisions. It should be chowned by root and Xterm's [PID] should have root priviledges. 
 Check it with "ps aux" [shift+PgUp/PgDn] to rewind listing, or another processes listener f.e."gps".
7.  To overcome problems with kernel 2.6.x or 2.6.xx and Nvidia GLX ask me for more bash scripts to launch Virtua Light and another Window(z) only apps with GL support. On below should resolve 90% of your problems: 
--------
#! /bin/bash
LD_PRELOAD=/usr/lib/libGL.so.1 yourbin
--------
than
#chmod 777 yourbashscript
than
#ls -s /usr/.../yourbinbashscript /usr/bin/yourbashscript
 
8.  Hit 'alt+p' to run VlightTunnel script from blender text editor.
9.  Before exporting save your scene.
10. Touch "r" to export with Raytracing render method as default, touch "O" to export with OpenGL rendering method.
11. Scripts expors scene to separated files with scene *.vib, geometry archive *.vib, and shaders *.vs.
12. For large files use emacs. To get all goods from files that comes with VLight1.4 xplore them.
13. To understand powerfull Render Man standard go to http://www.3delight.com and get all *.pdf books, docs,
 everything what you can find and was written by Lary Gritz and Tony Apodaca, than go to http://www.renderman.org 
 and look for more Siggraph courses'
14. Virtua Light brings to you quality close to Realistic Render Man for free. It's worth to use it if you're fastinated in  proffesionall cinematic technologies 
 used by f.e. Disney's Studios and motion pictures.
15. to make script lighter cut all my comments above.
16. Remind me to bring you exporter version with english, german, russian languages support.

#'DONT EVEN TRY TO PARSE THIS SCRIPT TROUGHT NETWORK TRANSLATORS.IT'LL BE BROKEN IMMEDIATELLY'
#'I KNOW, THAT YOU DID IT OR YOU'LL TRY IT. DOWNLOAD IT AGAIN OR DO RESCUE COPY BEFORE :)'
---Stop cutting here ---
"""

## Par Kaal_le_Saint, octobre 2004 ##

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


#~ En cours : (pour la version 0.2 Beta)
#~ - Amélioration de la 'ProgressBar' (plus de "détails")
#~ - Amélioration de l'interface des matériaux :
	#~ - Sélection automatique du matériau avec la sélection d'un objet
	#~ - Rafraichissement du nom des matériaux
	#~ - Pré-visualisation des matériaux
	#~ - Ajout des options de Vlight inutilisées (absorption...)
#~ - Empécher l'export d'objet "Vide"
#~ - Utilisation de ".vib temporaires" au choix
#~ - Prise en charge du flou de profondeur (DoF)
#~ - Prise en charge améliorée des lumières de type AreaLight et Spot
#~ - Enregistrement des paramètres dans les .Blend
#~ - Mise à jour sélective (soit les meshs, soit la scène... Enregistrement de la sélection d'objets à exporter)
#~ - Réglages avancés
#~ - Une documentation


#~ A faire : (pour une version future... peut-être)
#~ - Améliorer le code
#~ - Améliorer la transition Blender/VirtuaLight
#~ - Gestion de l'auto-smooth
#~ - Gestion des subdivisions de surface
#~ - Import/export des fichier .vib (TriPatch, Poly et Nurbs) dans Blender
#~ - Animations


import Blender#,math
from os import system
#linux/BSD/Uni(x) users  without time.py module may need to hash it
#from time import localtime
from Blender.Draw import *
from Blender.BGL import *

matListe=[]

menu = Create(1)
IOR = REF = Create(0.)
repXport = Blender.sys.dirname(Blender.Get('filename'))
illuG = 0
refrSlid = Create(1.0003)
reflSlid = Create(0.)
refBlurSlid = Create(0.)
zCanal = Create(0)
caustic = Create(0)
causticSlid = Create(0.)
irid = Create(0)
iridSlid = Create (0.)
transpBlurToggle = Create(0)
transpBlurSlid = Create(0.)
irrad = Create(3)
irSamp = Create(100)
affichage = -1
posUp = 0
dirCouleur = 0
clic = False
GI = Create(0)
GIsamples = Create(70)
# linux/BSD users may need to hash it
#heure = Create(("%s:%s"%(localtime()[3],localtime()[4])))
HDR = Create(0)
HDRint = Create(1.)
HDRimg = "groveC.hdr"
irradMaxError = Create(20.)
Rad = Create(0)
RadSol = Create(0)
BlurSample = Create(4)
iridFreqSlid = Create(0.0)
iridTurbSlid = Create(1.0)
photons = Create(0)
menuAR = Create(1)
print
print"------------------------------------"
def interVlight():
	global menu,dirCouleur,posUp,matListe,max
	global clic,refrSlid,reflSlid,refBlurSlid,zCanal
	global caustic,transpBlurSlid,transpBlurToggle
	global causticSlid,irid,iridSlid,GI,GIsamples
	global heure,HDR,HDRint,irradMaxError,Rad
	global RadSol,BlurSample,iridFreqSlid,iridTurbSlid
	global photons,menuAR,irrad
	
	max = Buffer(GL_INT,4) # à mettre à jour
	glGetIntegerv(GL_VIEWPORT,max) # à mettre à jour
	glClearColor( 0.33, 0.33, 0.33, 0)
	glClear(GL_COLOR_BUFFER_BIT)
	glColor3f(0,0.6,1)
	glRasterPos2i(max[2]/2-75,max[3]-30)
	Text("VLighTunnel v0.1 Beta")
	glRasterPos2i(20, 20)
	rX = "Repertoire d'export : %s"% repXport
	Text(rX)
	PushButton('',19,5,15,10,18,"Choisir un nouveau repertoire d'export")
	PushButton("?",457,max[2]-20,max[3]-20,20,18)
	if affichage == 1: # Option de rendu
		GI = Toggle(":: Activer GI ::", 2, max[2]/2-100, 130, 200, 18, GI.val,"")
		photons = Toggle("Photons", 80, max[2]/2-30, 150, 60, 18, photons.val,"")
		if GI.val:
			Rad = Toggle(":: Radiosite ::", 3, max[2]/2-160, 150, 120, 18, Rad.val,"")
			RadSol = Toggle(":: Radiosite Solaire ::", 4, max[2]/2+40, 150, 120, 18, RadSol.val,"")
			HDR = Toggle(":: HDRi ::", 5, max[2]/2-60, 170, 120, 18, HDR.val,"")
			if Rad.val:
				irradMaxError = Number("Irrad. Max :", 6, max[2]/2-60, 80, 120, 18, irradMaxError.val, 1., 100.,"")
				irrad = Menu("Grille%t|2%x1|4%x2|8%x3|16%x4|32%x5",98,max[2]/2-60,60,120,18,irrad.val)
			if RadSol.val:
				GIsamples = Number("Samples :", 7, max[2]/2-50, 90, 100, 18, GIsamples.val, 1, 9000,"")
				heure = String("", 8, max[2]/2-20, 70, 40, 18, heure.val, 5, "" )
			if HDR.val:
				GIsamples = Number("Samples :", 7, max[2]/2-120, 90, 120, 18, GIsamples.val, 1, 9000,"")
				irradMaxError = Number("Irrad. Max :", 6, max[2]/2, 90, 120, 18, irradMaxError.val, 1., 100.,"")
				HDRint = Number("Intensite :", 9, max[2]/2-50, 70, 100, 18, HDRint.val, 0.1, 5.,"")
				PushButton("Image HDR",14,max[2]/2-40,50,80,18,"")
				textLong = GetStringWidth(HDRimg)/2
				glRasterPos2i(max[2]/2-textLong,38)
				Text(HDRimg)
	elif affichage == 2: # Interface Matériaux
		majvMAt()
		transpBlurToggle = Toggle(":: Flou ::", 11, 5, 60, 100, 18, transpBlurToggle.val,"")
		irid = Toggle(":: Iridescence ::", 12, 5, 40, 100, 18, irid.val,"")
		caustic = Toggle(":: Caustiques ::", 13, 5, 80, 100, 18, caustic.val,"")
		haut = max[3]-50
		# Fleche vers le haut
		if dirCouleur==1:rup,gup,bup=r,g,b
		else:rup,gup,bup=0.8,0.75,0.67
		glColor3f(rup,gup,bup)
		glBegin(GL_TRIANGLES)
		glVertex2d(200,haut);glVertex2d(205,haut+10);glVertex2d(210,haut)
		glEnd()
		glBegin(GL_QUADS)
		glVertex2d(202.5,haut);glVertex2d(207.5,haut)
		glVertex2d(207.5,haut-10);glVertex2d(202.5,haut-10)
		glEnd()
		# Fleche vers le bas
		if dirCouleur==2:rdo,gdo,bdo=r,g,b
		else:rdo,gdo,bdo=0.8,0.75,0.67
		glColor3f(rdo,gdo,bdo)
		glBegin(GL_TRIANGLES)
		glVertex2d(200,50);glVertex2d(205,40);glVertex2d(210,50)
		glEnd()
		glBegin(GL_QUADS)
		glVertex2d(202.5,50);glVertex2d(207.5,50)
		glVertex2d(207.5,60);glVertex2d(202.5,60)
		glEnd()
		# Colonnes et textes
		paire = False
		ySouris = Blender.Window.GetMouseCoords()[1]-max[1]
		if (haut-80)/15<len(matListe):nColonne = (haut-80)/15
		else:nColonne = len(matListe)
		for i in range(nColonne):
			pos = haut-25-15*i
			if posUp/15>0:i+=posUp/15
			try:
				if (pos<ySouris<pos+15 and clic):
					matListe[i].setSel()
					glColor3f(1,0.4,0)
					clic = False
				elif matListe[i].getSel():glColor3f(0.8,0.5,0.2)
				else:glColor3f(0.3+paire/3.,0.3+paire/3.,0.3+paire/3.)
			except:pass
			paire =not paire
			glBegin(GL_QUADS)
			glVertex2d(20,pos+10);glVertex2d(400,pos+10)
			glVertex2d(400,pos-5);glVertex2d(20,pos-5)
			glEnd()
			glColor3f(0.8,0.9,1)
			glRasterPos2i(20,pos)
			try:
				tailleS = GetStringWidth(matListe[i].bNom)
				if matListe[i].getSel():
					Text("	"+matListe[i].bNom)
					glRasterPos2i(50+tailleS,pos)
					Text(str(matListe[i].getTransp()))
				else:
					Text(matListe[i].bNom)
					glRasterPos2i(40+tailleS,pos)
					Text(str(matListe[i].getTransp()))
			except:break
	elif affichage == 2.5:
		refrSlid = Slider("Refraction: ", 10, max[2]/2-150, max[3]-290, 300, 18, refrSlid.val, 0.5, 2., 0)
		reflSlid = Slider("Reflection: ", 15, max[2]/2-150, max[3]-310, 300, 18, reflSlid.val, 0., 1., 0)
		if transpBlurToggle.val:
			glRasterPos2i(max[2]/2-20,max[3]-55)
			Text(":: Flou ::")
			refBlurSlid = Slider("Reflection floue: ", 20, max[2]/2-150, max[3]-120, 300, 18, refBlurSlid.val, 0., 1., 0)
			transpBlurSlid = Slider("Transparence floue: ", 21, max[2]/2-150, max[3]-100, 300, 18, transpBlurSlid.val, 0., 1., 0)
			BlurSample = Number("Echantillons: ", 22, max[2]/2-60, max[3]-80, 120, 18, BlurSample.val, 1, 20,"")
		if caustic.val:
			glRasterPos2i(max[2]/2-30,max[3]-145)
			Text(":: Caustiques ::")
			causticSlid = Slider("Densite: ", 30, max[2]/2-150, max[3]-170, 300, 18, causticSlid.val, 0., 1., 0)
		if irid.val:
			glRasterPos2i(max[2]/2-30,max[3]-195)
			Text(":: Iridescence ::")
			iridSlid = Slider("Intensite: ", 40, max[2]/2-150, max[3]-220, 300, 18, iridSlid.val, 0., 1., 0)
			iridFreqSlid = Slider("Frequence: ", 41, max[2]/2-150, max[3]-240, 300, 18, iridFreqSlid.val, 0., 1., 0)
			iridTurbSlid = Slider("Turbulence: ", 42, max[2]/2-150, max[3]-260, 300, 18, iridTurbSlid.val, 1., 2., 0)
	elif affichage == 3:
		glRasterPos2i(max[2]/2-40,max[3]/2)
		Text("Type :")
		menuAR = Menu("Type%t|Plat%x1|Sperique%x2|Cylindrique%x3|Torique%x4", 98, max[2]/2,max[3]/2-5, 100, 18, menuAR.val)
	else:
		zCanal = Toggle("", 1, 5, 40, 10, 18, zCanal.val, "Enregistre la passe de profondeur dans un autre fichier")
		glRasterPos2i(20, 45)
		if zCanal.val:Text("Alpha separe")
		else:Text("pas d'Alpha")
		glRasterPos2i(20, max[3]/2)
		Text("Exporter ")
		menu = Menu('Objets%t|tous les objets%x1|la selection d\'objets%x2',97,75,max[3]/2-5,140,20,menu.val)
	dirCouleur = 0
def eVlight(evt,val):
	global illuG,affichage,r,g,b,matListe,clic
	#~ optMenu = ['O','-']
	if (evt == QKEY and not val):del matListe;Exit()
	elif (evt == LEFTMOUSE and val):clic =True;Draw()
	elif (evt == PADENTER and not val):
		if affichage == 2:sauve();affichage=2.5;Draw()
		elif affichage == 2.5:valid();affichage=2;Draw()
	elif (evt==UPARROWKEY and val):	up(5);Draw()
	elif (evt==DOWNARROWKEY and val):down(5);Draw()
	elif (evt==PAGEUPKEY and val):up(20);Draw()
	elif (evt==PAGEDOWNKEY and val):down(20);Draw()
	elif (evt==DOWNARROWKEY and not val):Draw()
	elif (evt==UPARROWKEY and not val):Draw()
	elif (evt==PAGEDOWNKEY and not val):Draw()
	elif (evt==PAGEUPKEY and not val):Draw()
	elif (evt == RKEY and not val):lanceRendu('')# Rendu Raytracing
	elif (evt == OKEY and not val):lanceRendu('-h 1')# Rendu type 'OpenGL'
	elif (evt == 3 and not val):affichage = PupMenu("Options%t|"+"Illumination|Materiaux|Arriere plan");Draw()
def bEv(evt):
	if evt == 1:Draw();print '1' #Canal Z									Toggle
	elif evt == 2:Draw();print '2' #GI									Toggle
	elif evt == 3:HDR.val=0;RadSol.val=0;print '3' #Radiosité				Toggle
	elif evt == 4:HDR.val=0;Rad.val=0;print '4' #DayLight					Toggle
	elif evt == 5:RadSol.val=0;Rad.val=0;print '5' #HDRI					Toggle
	elif evt == 6:Draw();print '6' #Irrad. Max Error							Number
	elif evt == 7:Draw();print '7' #DayLight Samples							Number
	elif evt == 8:validHeure(heure.val);Draw();print '8' #Heure					String
	elif evt == 9:Draw();print '10' #HDR intensité								Number
	elif evt == 10:Draw();print '11' #Réfraction								Slider
	elif evt == 11:Draw();print '12' #Flou									Toggle
	elif evt == 12:Draw();print '13' #Iridescence								Toggle
	elif evt == 13:Draw();print '14' #Caustique								Toggle
	elif evt == 14:Blender.Window.FileSelector(HDRep,"*.hdr") #Image HDR	PushButton
	elif evt == 15:Draw();print '15' #Rélexion								Slider
	elif evt == 19:Blender.Window.FileSelector(rep,"OK") #RepXport			PushButton
	elif evt == 20:Draw();print '16' #Rélexion floue							Slider
	elif evt == 21:Draw();print '17' #Transparence floue							Slider
	elif evt == 22:Draw();print '18' #Echantillons de flou							Number
	elif evt == 30:Draw();print '19' #Caustic densité							Slider
	elif evt == 40:Draw();print '20' #Irrid. Intensité							Slider
	elif evt == 41:Draw();print '21' #Irrid. Frequence							Slider
	elif evt == 42:Draw();print '22' #Irrid. Turbulence							Slider
	elif evt == 80:Draw();print '23' #Photons caustiques							Toggle
	elif evt == 97:Draw();print '24' #Sélection d'objets							Menu
	elif evt == 98:Draw();print '25' #Sélection d'arr. plan							Menu
	elif evt == 457:aide(affichage)
	Draw()
def aide(ecr):
	if ecr == 1:PupMenu("L'illumination globale%t|%l|VirtuaLight propose plusieurs methodes d'illumination :%x1|%l|- L'irradiance%x2|meme principe que dans Blender%x3|les objets emettent de la lumiere...%x4|%l|- La radiosite solaire%x5|radiosite dependant de la position du soleil%x6|les horaires d'ouverture vont de 6h a 18h ^^%x7|%l|- L'HDRI%x8|illumination basee sur une image HDR...%x9|%l|L'option 'Photons' active le calcul des caustiques%x10|")
	elif ecr == 2:PupMenu("Matieres%t|%l|Ici apparait la liste des materiaux de la scene%x1|Selectionner un materiau, puis 'touche pave-entree' pour acceder a ses proprietes%x2|Pour valider les changements appuyer a nouveau sur 'touche pave-entree'%x3|%l|Vous pouvez selectionner plusieurs matieres afin de changer une proprietes communes%x4|Les matieres selectionnes sont decalee legerement sur la droite et sont surlignee en orange clair%x5|Faites 'touche pave-entree' pour acceder a leurs proprietes%x6|Ne bougez que les curseurs qu'elles ont en commun et valider avec 'touche pave-entree'%x7|%l|Les boutons, en bas a gauche, permmettent de rajouter des proprietes supplementaires%x8|Par exemple :%x9|- Pour rajouter des caustiques, enfoncer le bouton caustique%x10|- Selectionner le/les matieres%x11|- Appuyer sur 'touche pave-entree'%x12|- Regler le curseur Densite %x13|- Valider en appuyant sur 'touche pave-entree'%x14|Puis faites un rendu...%x15|Si aucun caustique n'apparait...c'est normal ! ^^%x16|Il faut activer les 'photons' dans les options d'Illumination%x17|ET%x18|Il faut que la matiere puisse en emettre :%x19|Les caustiques n'apparaissent que sur des matieres transparentes et/ou reflechissante !%x20|La matiere doit etre en mode 'OB' et non pas 'ME'%x21|%l|Les seuls textures acceptees sont les textures UV%x22|Il faut mettre la texture en mode 'UV' dans 'MapInput'%x23")
	elif ecr == 3:PupMenu("Options de l'arriere plan%t|%l|Vous pouvez regler ici la projection des images d'arriere plan%x1|Pour le moment seul l'HDRi permet d'afficher un arriere plan%x2")
	elif ecr == -1:PupMenu("Accueil%t|%l|Trois options apparaissent :%x1|- 'Exporter' qui permet de choisir quels objets doivent etre exporter%x1|(ne pas oublier d'exporter au moins une lampe)%x2|%l|- 'Alpha' permet d'enregistrer dans un tga separe le canal alpha%x3|%l|- 'Repertoire d'export' permet de selectionner un repertoire ou seront mis les fichier .vib et .vs%x4|ne pas oublier de faire le menage dans les .vib%x5|%l|Presser la 'touche o' pour effectuer un rendu de test%x6|La 'touche r' permet de lancer un 'vrai' rendu, l'image sera sauvegarder dans le repertoire d'export au format TGA%x7|%l|Pour acceder a d'autres options : faire un 'clic droit'%x7|Pour revenir a tout moment sur cette page, faire 'clic droit' et deplacer la souris loin du menu%x8|%l|En cas de probleme :%x9|- pour arreter un rendu, il faut fermer la fenetre de rendu 'Rendering Window'%x10|ainsi seul VirtuaLight sera ferme.%x11|- Il est deconseille d'arreter le rendu en faisant un 'break' dans la console%x12|et encore plus de fermer la console (Blender et VirtuaLight se fermeront tous les deux)%x13|%l|%l|Vous pouvez toujours poser vos questions sur :%x14|Le forum du www.Blender.Clan.st%x15|Ou m'envoyer un mail : "+mel()+"%x16|Les nouvelles versions de ce script seront disponibles sur le Blender.Clan, rubrique telechargement.%x17" )
def sauve():
	# Juste un test du module Registry
	matDict = {"refr":refrSlid.val,
		"refl":reflSlid.val,
		"refBlur":refBlurSlid.val,
		"transpBlur":transpBlurSlid.val,
		"caust":causticSlid.val,
		"Irid":iridSlid.val,
		"IridFreq":iridFreqSlid.val,
		"IridTurb":iridTurbSlid.val}
	Blender.Registry.SetKey("matieres",matDict)
def valid():
	# Juste un test du module Registry
	matDict = Blender.Registry.GetKey("matieres")
	for mat in matListe:
		if mat.getSel():
			if round(refrSlid.val,4) != round(matDict["refr"],4):a=round(refrSlid.val,3)
			else:a=round(mat.getTransp()[0],3)
			if round(reflSlid.val,4) != round(matDict["refl"],4):b=round(reflSlid.val,3)
			else:b=round(mat.getTransp()[1],3)
			if round(refBlurSlid.val,4) != round(matDict["refBlur"],4):c=round(refBlurSlid.val,3)
			else:c=round(mat.getTransp()[2],3)
			if round(transpBlurSlid.val,4) != round(matDict["transpBlur"],4):d=round(transpBlurSlid.val,3)
			else:d=round(mat.getTransp()[3],3)
			mat.setTransp(a,b,c,d)
			if round(iridSlid.val,4) != round(matDict["Irid"],4):a=round(iridSlid.val,3)
			else:a=round(mat.getIrid()[0],3)
			if round(iridFreqSlid.val,4) != round(matDict["IridFreq"],4):b=round(iridFreqSlid.val,3)
			else:b=round(mat.getIrid()[1],3)
			if round(iridTurbSlid.val,4) != round(matDict["IridTurb"],4):c=round(iridTurbSlid.val,3)
			else:c=round(mat.getIrid()[2],3)
			mat.setIrid(a,b,c)
			if round(causticSlid.val,4) != round(matDict["caust"],4):mat.setCaustic(round(causticSlid.val,3))
			else:mat.setCaustic(round(mat.getCaustic(),3))
			mat.setSel()
def validHeure(horaire):
	if len(horaire) == 4 and horaire[:2].isdigit() and horaire[2:4].isdigit():
		heure.val = horaire[:2]+":"+horaire[-2:]
	elif len(horaire) == 3 and int(horaire[:2]) > 12 and int(horaire[-2:]) < 60:
		heure.val = "0"+horaire[:1]+":"+horaire[-2:]
	else:
		heure.val = ("%s:%s"%(localtime()[3],localtime()[4]))
def rep(fic):
	global repXport
	repXport = Blender.sys.dirname(fic)
def HDRep(fic):
	global HDRimg
	HDRimg = fic
def up(num):
	global posUp,r,g,b,dirCouleur
	dirCouleur = 1
	if posUp>0:posUp-=num
	r,g,b=0,0.1*num,0
def down(num):
	global posUp,r,g,b,dirCouleur
	dirCouleur = 2
	if posUp<len(matListe)*14+5:posUp+=num
	r,g,b=0,0.1*num,0
def nettoie(nom):
	propre = ''
	for nLettre in range(len(nom)):
		if ((ord(nom[nLettre]) > 47) and (ord(nom[nLettre]))<58) or  ((ord(nom[nLettre])>64) and (ord(nom[nLettre]))<91)or((ord(nom[nLettre])>96) and (ord(nom[nLettre]))<123):propre=propre+nom[nLettre]
		else:propre=propre+"_"
	return propre
def lanceRendu(mode):
	global affichage
	Blender.Window.WaitCursor(True)
	#~ tempsGen = Blender.sys.time()
	majvMAt()
	nomScn = repXport+Blender.sys.sep+nettoie(Blender.sys.basename(Blender.Get('filename')))
	scene(nomScn)
	ficScene = open(nomScn+".vib","a")
	if affichage == 2.5:
		preview = file(repXport+Blender.sys.sep+"bmatb.vib","w")
		preview.write()
		system("vlight bmatb -d -f %s -r 320 240")
	# Début Shader
	for i,mat in enumerate(Blender.Material.Get()):
		alpha = mat.getAlpha()
		nom = nettoie(mat.name)
		ficShader = open(repXport+Blender.sys.sep+nom+".vs",'w')
		ficScene.write('ReadArchive "'+repXport+Blender.sys.sep+nom+'.vs"
')
		ficShader.write("Declare %s = Shader [FunctionalSurface " % nom)
		imgUV = False
		for mtex in mat.getTextures():
			if mtex and mtex.texco == 16:
				ficShader.write("[Color UVImageMapping(ImageFile(\"%s\", BILINEAR)) " % (mtex.tex.image.filename))
				imgUV = True
		if not imgUV:ficShader.write("[Color '%s,%s,%s' " % (alpha*mat.R,alpha*mat.G,mat.B*alpha))
		ficShader.write("Ka %s Kd %s Kb %s " % (mat.emit,mat.ref,matListe[i].getBrillance()))
		ficShader.write("Kt (%s,%s,'1,1,1',%s) " % (1-alpha,matListe[i].getTransp()[0],matListe[i].getTransp()[3]))
		ficShader.write("Ks (%s, '%s,%s,%s') GaussianSpecularBRDF %s Kr %s " % (mat.spec/2.,mat.specCol[0],mat.specCol[1],mat.specCol[2],(512-mat.hard)/12,matListe[i].getTransp()[1:3]))
		if caustic.val:ficShader.write("Caustics %s" % (causticSlid.val))
		if irid.val:ficShader.write("Iridescence (%s,%s,%s)" % (matListe[i].getIrid()))
		ficShader.write("]]")
		ficShader.close()
	ficScene.write("Declare Defaut = Shader [PlainSurface [Color '0.5,0.5,0.5']]

")
	# Fin Shader
	if GI.val and HDR.val:ficScene.write("SkyLight (%s,HDRSky,%s)
" % (GIsamples.val,HDRint.val))
	
	i=0.
	if menu.val == 2:
		objs = Blender.Object.GetSelected()
		nObj = len(objs)
	elif menu.val == 1:
		objs = Blender.Object.Get()
		nObj = len(objs)
	Blender.Window.DrawProgressBar(0.,'Debut')
	for obj in objs:
		i+=1
		mat = obj.mat
		objPar = obj.getParent()
		if objPar:mat = mat*objPar.mat
		Blender.Window.DrawProgressBar(i/nObj,obj.name)
		if obj.getType() == "Mesh":
			#poly(obj)
			triPatch(obj)
			ficScene.write('ReadArchive "%s' % repXport+Blender.sys.sep+nettoie(obj.name)+'OB.vib"
')
			ficScene.write("%sOB [Transform(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)]
" % 
				(nettoie(obj.name),mat[0][0],mat[0][1],mat[0][2],mat[0][3],mat[1][0],mat[1][1],
				mat[1][2],mat[1][3],mat[2][0],mat[2][1],mat[2][2],mat[2][3],mat[3][0],mat[3][1],mat[3][2],mat[3][3]))
		elif obj.getType() == "Lamp":
			lumiere(ficScene,obj)
	ficScene.close()
	scn =Blender.Scene.GetCurrent()
	rd = scn.getRenderingContext()
	cam = scn.getCurrentCamera()
	winSize = [rd.imageSizeX(),rd.imageSizeY()]
	if system("vlight "+nomScn+" -d -f %s -r %s %s"%(mode,winSize[0],winSize[1]))==1:
		print "\a"
		PupMenu("Erreur provenant de VirtuaLight %t|Allez voir la console...%x1")
	Blender.Window.WaitCursor(False)
	#~ print round(Blender.sys.time()-tempsGen,3),'sec.'
	print"------------------------------------"
def lumiere(fic,obj):
	mat = obj.mat
	lampe = obj.data
	if lampe.type == 4:
		fic.write("AreaLight[Plane(8,8)
")
		fic.write("	Intensity '%s,%s,%s'*%s
" % (lampe.col[0],lampe.col[1],lampe.col[2],lampe.energy))
		#~ fic.write("	Range %s
"%lampe.dist)
		#~ fic.write("	Decay 2
")
		fic.write("	LightingAttributes %s
"%attr(lampe))
		fic.write("	Scale (5,5,5)")
		fic.write("	Transform(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)]
" %
			(mat[0][0],mat[0][1],mat[0][2],mat[0][3],mat[1][0],mat[1][1],mat[1][2],
			mat[1][3],mat[2][0],mat[2][1],mat[2][2],mat[2][3],mat[3][0],mat[3][1],mat[3][2],mat[3][3]))
	elif lampe.type == 0:
		fic.write("PointLight[(%s,%s,%s)
" % (mat[3][0],mat[3][1],mat[3][2]))
		fic.write("	Intensity '%s,%s,%s'*%s
" % (lampe.col[0],lampe.col[1],lampe.col[2],lampe.energy))
		#~ fic.write("	Range %s
"%lampe.dist)
		#~ fic.write("	Decay 2
")
		fic.write("	LightingAttributes %s]
"%attr(lampe))
	elif lampe.type == 1 and GI.val and RadSol.val:
		fic.write("SkyLight (%s,'%s,%s,%s',%s)
" % (GIsamples.val,lampe.col[0],lampe.col[1],lampe.col[2],lampe.energy))
		fic.write("SunLight (%s,20)
"%heure.val)
	elif lampe.type == 1 and not GI.val:
		vue = ori(obj)
		fic.write("DirectionalLight [(%s,%s,%s) Intensity '%s,%s,%s'*%s LightingAttributes 3]
"%(obj.LocX-vue[0],obj.LocY-vue[1],obj.LocZ-vue[2],lampe.col[0],lampe.col[1],lampe.col[2],lampe.energy))
	elif lampe.type == 2:
		vue = ori(obj)
		fic.write("SpotLight[(%s,%s,%s),(%s,%s,%s),%s,%s,1.0
" % (mat[3][0],mat[3][1],mat[3][2],vue[0],vue[1],vue[2],30,12))
		fic.write("	Intensity '%s,%s,%s'*%s
" % (lampe.col[0],lampe.col[1],lampe.col[2],lampe.energy))
		#~ fic.write("	Range %s
"%lampe.dist)
		#~ fic.write("	Decay 2
")
		fic.write("	LightingAttributes %s]
"%attr(lampe))
	elif lampe.type == 3:
		vue = ori(obj)
		fic.write("DirectionalLight [(%s,%s,%s) Intensity '%s,%s,%s'*%s LightingAttributes 2]
"%(obj.LocX-vue[0],obj.LocY-vue[1],obj.LocZ-vue[2],lampe.col[0],lampe.col[1],lampe.col[2],lampe.energy))
def mel(): # ^^, n'imp !
	mb = ['re',108,'.tm',116,107,109,67-3,46,119,110,111,97]
	#~ mb.sort
	az = chr(mb[4])+chr(mb[-1])
	az = az+"li"+mb[2]+chr(mb[6])+chr(mb[8])
	return az+chr(mb[-1])+2*chr(mb[-3])+chr(mb[-1])+chr(100)+2*chr(mb[-2])+".fr"
def attr(lampe):
	attr = 0
	LM = lampe.Modes
	lm = lampe.mode
	if 8192 & lm != 0:
		attr = attr +1
	if LM['NoSpecular'] & lm == 0:
		attr = attr +2
	if LM['Halo'] & lm != 0:
		attr = attr +0
	#~ print attr
	return attr
def scene(nomScn):
	irGrille = [2,4,8,16,32,64,128,256]
	"""360 * Math.atan((winSize[0]/winSize[1]) * 16 / cam.lens) / 3.141592"""
	scn =Blender.Scene.GetCurrent()
	rd = scn.getRenderingContext()
	cam = scn.getCurrentCamera()
	vue = ori(cam)
	winSize = [rd.imageSizeX(),rd.imageSizeY()]
	focale = 360 * winSize[0] / winSize[1] * 9.5 / cam.data.lens / 3.141592 # Par la méthode du pifOmétre ^^
	#~ focale = 360 * math.atan((winSize[0]/winSize[1]) * 16 / cam.data.lens) / 3.141592
	ficScene = open(nomScn+".vib","w")
	ficScene.write('ReadArchive "statics.vib"

')
	if GI.val and HDR.val:
		typeS = ['PlanarImageMapping','SphericalImageMapping','CylindricalImageMapping','ToroidalImageMapping']
		ficScene.write("static skymap = HDRImageFile(\"%s\",BILINEAR,%s)
"%(HDRimg,HDRint.val))
		ficScene.write("Declare HDRSky = %s(skymap, I)

"%typeS[menuAR.val-1])
	ficScene.write("Camera[(%s,%s,%s),(%s,%s,%s),(0,0,1) " % (cam.LocX,cam.LocY,cam.LocZ,vue[0],vue[1],vue[2]))
	ficScene.write("FieldOfView %s Format(%s,%s) FrameAspectRatio %s/%s Antialiasing 5 Clipping (%s,%s) Rotate(0,%s,0)]

"
		% (focale,winSize[0],winSize[1],-rd.aspectRatioX(),rd.aspectRatioY(),cam.data.clipStart,cam.data.clipEnd,cam.mat.toEuler().y))
	ficScene.write("Options [ AdaptiveDepth 5 
")
	if zCanal.val:ficScene.write("	ZChannelDepth 24 
")
	if transpBlurToggle.val:ficScene.write("	MaxBlurSamples %s 
"%BlurSample.val)
	if GI.val:
		ficScene.write("	IrradianceBlendingArea 1.2
")
		ficScene.write("	IrradianceMaxError %s
" % (round(1.1-irradMaxError.val/100.,3)))
		ficScene.write("	IrradianceBounceLevel 4
")
		#~ ficScene.write("	IrradianceDistribution ADAPTIVE_U
")
	ficScene.write("	BitsPerPixel 32 IrradianceSamples %s]

" % irSamp.val)
	if photons.val:ficScene.write("Photons (0,0.4,0)

")
	if illuG or Rad.val:ficScene.write("ComputeIrradiance %s

"%irGrille[irrad.val-1])
	ficScene.close()
def ori(obj):
	nouv = -1.*obj.mat.rotationPart()[2]+obj.mat.translationPart()
	return nouv # Retourne la direction vers laquelle l'objet pointe.
def poly(obj): #Inutilisé pour le moment
	deb = Blender.sys.time()
	ficPoly = open(repXport+Blender.sys.sep+nettoie(obj.name)+".vib",'w')
	ficPoly.write('// Objet %s provenant de %s

'%(obj.name,Blender.Get('filename')))
	ficPoly.write('Solid [
')
	faces = obj.data.faces
	for nface in range (len(faces)):
		if len(faces[nface].v) > 2:
			ficPoly.write('	Shape[Polygon(%s,'%len(faces[nface]))
			for nvert in range(len(faces[nface].v)-1):
				ficPoly.write('(%s,%s,%s),'%(faces[nface].v[nvert].co[0],faces[nface].v[nvert].co[1],faces[nface].v[nvert].co[2]))
			ficPoly.write('(%s,%s,%s))	]'%(faces[nface].v[-1].co[0],faces[nface].v[-1].co[1],faces[nface].v[-1].co[2]))
			try:
				if len(faces[nface+1].v) > 2:ficPoly.write('+
')
			except:pass
	ficPoly.write('
')
	ficPoly.write(']')
	ficPoly.close()
	print '	',round(Blender.sys.time()-deb,3),'sec.'
def triPatch(obj):
	nom = nettoie(obj.name)
	deb = Blender.sys.time()
	ficPoly = open(repXport+Blender.sys.sep+nom+"OB.vib",'w')
	ficPoly.write('// Objet %s provenant de %s

'%(obj.name,Blender.Get('filename')))
	ficPoly.write('Declare %sOB = Solid [
'%nom)
	faces = obj.data.faces # permet de gangner du temps
	matObj = obj.getMaterials()
	caust = False
	matCaust = ""
	if matObj and photons.val:
		for ml in matListe:
			if ml.getCaustic()>0:
				caust = True
				matCaust = ml.vNom
				break
	matMesh = obj.data.getMaterials()
	for nface in range(len(faces)):
		try:
			matiere = matObj[faces[nface].mat].name
		except:
			try:
				matiere = matMesh[faces[nface].mat].name
			except:
				matiere = "Defaut"				
		#
		if caust:matiere=""
		if len(faces[nface]) == 3:
			ficPoly.write("	Shape[TriangularPatch(")
			if faces[nface].smooth:
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[0].co[0],faces[nface].v[0].co[1],faces[nface].v[0].co[2])) #Coordonnées point 1 du triangle
				ficPoly.write("(%s,%s,%s) " % (faces[nface].v[0].no[0],faces[nface].v[0].no[1],faces[nface].v[0].no[2])) #Normales POINT 1 du triangle
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[0])) #UV point 1 du triangle
				except:ficPoly.write("UV=0,0, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[1].co[0],faces[nface].v[1].co[1],faces[nface].v[1].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].v[1].no[0],faces[nface].v[1].no[1],faces[nface].v[1].no[2]))
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[1])) #UV point 2 du triangle
				except:ficPoly.write("UV=0,1, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[2].co[0],faces[nface].v[2].co[1],faces[nface].v[2].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].v[2].no[0],faces[nface].v[2].no[1],faces[nface].v[2].no[2]))
				try:ficPoly.write("UV=%s,%s " % (faces[nface].uv[2])) #UV point 3 du triangle
				except:ficPoly.write("UV=1,0 ")
				ficPoly.write(") %s]" % (nettoie(matiere)))
			else:
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[0].co[0],faces[nface].v[0].co[1],faces[nface].v[0].co[2])) #Coordonnées point 1 du triangle
				ficPoly.write("(%s,%s,%s) " % (faces[nface].no[0],faces[nface].no[1],faces[nface].no[2])) #Normales FACE 1 du triangle
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[0])) #UV point 1 du triangle
				except:ficPoly.write("UV=0,0, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[1].co[0],faces[nface].v[1].co[1],faces[nface].v[1].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].no[0],faces[nface].no[1],faces[nface].no[2]))
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[1])) #UV point 2 du triangle
				except:ficPoly.write("UV=0,1, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[2].co[0],faces[nface].v[2].co[1],faces[nface].v[2].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].no[0],faces[nface].no[1],faces[nface].no[2]))
				try:ficPoly.write("UV=%s,%s " % (faces[nface].uv[2])) #UV point 3 du triangle
				except:ficPoly.write("UV=1,0 ")
				ficPoly.write(") %s]" % (nettoie(matiere)))
			try:
				if len(faces[nface+1]) > 2:ficPoly.write('+
')
			except:ficPoly.write("
")
		elif len(faces[nface]) == 4: # Transforme les quads en triangles
			ficPoly.write("	Shape[TriangularPatch(")
			if faces[nface].smooth:
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[0].co[0],faces[nface].v[0].co[1],faces[nface].v[0].co[2])) #Coordonnées point 1 du triangle
				ficPoly.write("(%s,%s,%s) " % (faces[nface].v[0].no[0],faces[nface].v[0].no[1],faces[nface].v[0].no[2])) #Normales POINT 1 du triangle
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[0])) #UV point 1 du triangle
				except:ficPoly.write("UV=0,0, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[1].co[0],faces[nface].v[1].co[1],faces[nface].v[1].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].v[1].no[0],faces[nface].v[1].no[1],faces[nface].v[1].no[2]))
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[1])) #UV point 2 du triangle
				except:ficPoly.write("UV=0,1, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[2].co[0],faces[nface].v[2].co[1],faces[nface].v[2].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].v[2].no[0],faces[nface].v[2].no[1],faces[nface].v[2].no[2]))
				try:ficPoly.write("UV=%s,%s " % (faces[nface].uv[2])) #UV point 3 du triangle
				except:ficPoly.write("UV=1,0 ")
				ficPoly.write(") %s]+
" % (nettoie(matiere)))
				ficPoly.write("	Shape [TriangularPatch(")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[0].co[0],faces[nface].v[0].co[1],faces[nface].v[0].co[2])) #Coordonnées point 1 du triangle 2
				ficPoly.write("(%s,%s,%s) " % (faces[nface].v[0].no[0],faces[nface].v[0].no[1],faces[nface].v[0].no[2])) #Normales POINT 1 du triangle
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[0])) #UV point 1 du triangle
				except:ficPoly.write("UV=1,0, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[2].co[0],faces[nface].v[2].co[1],faces[nface].v[2].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].v[2].no[0],faces[nface].v[2].no[1],faces[nface].v[2].no[2]))
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[2])) #UV point 2 du triangle
				except:ficPoly.write("UV=1,1, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[3].co[0],faces[nface].v[3].co[1],faces[nface].v[3].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].v[3].no[0],faces[nface].v[3].no[1],faces[nface].v[3].no[2]))
				try:ficPoly.write("UV=%s,%s " % (faces[nface].uv[3])) #UV point 3 du triangle
				except:ficPoly.write("UV=1,0 ")
				ficPoly.write(") %s]" % (nettoie(matiere)))
			else:
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[0].co[0],faces[nface].v[0].co[1],faces[nface].v[0].co[2])) #Coordonnées point 1 du triangle 1
				ficPoly.write("(%s,%s,%s) " % (faces[nface].no[0],faces[nface].no[1],faces[nface].no[2])) #Normales face 1 du triangle 1
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[0])) #UV point 1 du triangle
				except:ficPoly.write("UV=0,0, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[1].co[0],faces[nface].v[1].co[1],faces[nface].v[1].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].no[0],faces[nface].no[1],faces[nface].no[2]))
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[1])) #UV point 2 du triangle
				except:ficPoly.write("UV=0,1, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[2].co[0],faces[nface].v[2].co[1],faces[nface].v[2].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].no[0],faces[nface].no[1],faces[nface].no[2]))
				try:ficPoly.write("UV=%s,%s " % (faces[nface].uv[2])) #UV point 3 du triangle
				except:ficPoly.write("UV=1,0 ")
				ficPoly.write(") %s]+
" % (nettoie(matiere)))
				ficPoly.write("	Shape [TriangularPatch(")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[0].co[0],faces[nface].v[0].co[1],faces[nface].v[0].co[2])) #Coordonnées point 1 du triangle 2
				ficPoly.write("(%s,%s,%s) " % (faces[nface].no[0],faces[nface].no[1],faces[nface].no[2])) #Normales point 1 du triangle 2
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[0])) #UV point 1 du triangle
				except:ficPoly.write("UV=1,0, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[2].co[0],faces[nface].v[2].co[1],faces[nface].v[2].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].no[0],faces[nface].no[1],faces[nface].no[2]))
				try:ficPoly.write("UV=%s,%s, " % (faces[nface].uv[2])) #UV point 2 du triangle
				except:ficPoly.write("UV=1,1, ")
				ficPoly.write("(%s,%s,%s)," % (faces[nface].v[3].co[0],faces[nface].v[3].co[1],faces[nface].v[3].co[2]))
				ficPoly.write("(%s,%s,%s) " % (faces[nface].no[0],faces[nface].no[1],faces[nface].no[2]))
				try:ficPoly.write("UV=%s,%s " % (faces[nface].uv[3])) #UV point 3 du triangle
				except:ficPoly.write("UV=1,0 ")
				ficPoly.write(") %s]" % (nettoie(matiere)))
			try:
				if len(faces[nface+1]) > 2:ficPoly.write('+
')
			except:ficPoly.write("
")
	"""ficPoly.write("	Transform(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)
" %
		(mat[0][0],mat[0][1],mat[0][2],mat[0][3],mat[1][0],mat[1][1],mat[1][2],
		mat[1][3],mat[2][0],mat[2][1],mat[2][2],mat[2][3],mat[3][0],mat[3][1],mat[3][2],mat[3][3]))"""
	ficPoly.write('%s]'%matCaust)
	ficPoly.close()
	print '	',round(Blender.sys.time()-deb,3),'sec.'
def shader():
	mats = Blender.Material.Get()
	for mat in mats:
		ficShader = open(repXport+Blender.sys.sep+nettoie(mat.name)+".vs",'w')
def majvMAt():
	global matListe
	for mat in Blender.Material.Get()[len(matListe):]:
		matListe.append(MatVlight(mat))
class MatVlight:
	def __init__(self,matBlender):
		self.bNom = matBlender.name
		self.vNom = nettoie(self.bNom)
		self.transp = (1.0003,0.,0.,0.) # Refr, Refl, ReflBlur, TranspBlur
		self.brillance = 1.2
		self.sel = False
		self.iridescence = (0.,0.,0.)
		self.image = ""
		self.caustique = 0.0
	def nettoie(self,chaine):
		return chaine
	def prop(self):
		return (self.bNom,self.vNom,self.transp,self.brillance,self.iridescence,self.image,self.sel)
	def getSel(self):
		return self.sel
	def setSel(self):
		self.sel=not self.sel
	def getIrid(self):
		return self.iridescence
	def setIrid(self,intensite,frequence,turbulence):
		self.iridescence = (intensite,frequence,turbulence)
	def getBrillance(self):
		return self.brillance
	def setBrillance(self,force):
		self.brillance = force
	def getTransp(self):
		return self.transp
	def setTransp(self,refr,refl,reflB,trBlur):
		self.transp = (refr,refl,reflB,trBlur)
	def getCaustic(self):
		return self.caustique
	def setCaustic(self,valeur):
		self.caustique = valeur
majvMAt()
Register(interVlight,eVlight,bEv)

Enjoy one of the best free Render Man implementations with blender!

Everything you need to do everything:
http://www.gnu.org/graphics/gnu-head-sm.jpg
Ports Of Emacs

Maybe you’re interested in new fake Windows Crossover platform?
But it’s another story;)

Dont strike me with [SAP] please. You know that there are better free solutions.

Greetings!
Burt.S.

Check all 3D keywords you can say/ you know in any language with *.ru prefix [feel free to use Tolkienish haha]. Do the same with Taiwan and Chinese web. Welcome to 98% of World Wide Web priceless/most wanted resources :wink:

Do it carefully. The best is just pure term with nacked protocols txt interface.

Use Gentoo live CD or Dyne Bolic to fast bring system up after attacks.
Best one are diskless systems to do fast rescue.

I tried new 3D Max7 from discreet.
It’s mile step forward when you compare it with previous one.
But still Blendrer is much faster than any other “free hand” modeler.

Any way. I think that many customers may be interested in3D Max at Linux, BSD platforms … :wink:


Sorry for text flow. Some day my head just’ll blow.

thx for the quite good script, but if i press “r” to render with raytraycing the console gives an error , rendering by pressing “o” works

could you plz help me

thx

bastla