access texturemap from VRayDirt
Hi I have a problem for getting texturmap from vraydirt that already inside some object.if i using $.material.diffusemap.vraydirt.texmap_occluded_color.bitmaptexture.filename
it result error Unknown property: "texmap_occluded_color" in .
I would be realy greatfull if someone could help me to solve this problem since i have so many material i have to change.
Comments
Nice one, It works thanks a
Nice one, It works thanks a lot guys its save my time :D
My pleasure :)
My pleasure :)
"collect all DIRT maps from selected objects"
Ok.
In order to collect all VRayDirt Maps on the scene we can use
But that is easy. Now answer for the post title :
Hope this is not too difficult to understand
;) Cheers!
bga
Branko run your script , got
Branko
run your script , got an error ...
you wrote :
- What is the value of 'null' ?
- You don't have getDirt() function, probably mean is getDirtOf() , is it right ?
...
Yup getDirtOf(). I changed name of fn but forgot to change in for-loop.
null is undefined variable. U can put any word or simple use predefined 'undefined'
bga
ok, now a script
ok, now a script works,...sound good.
hmm in this case you just collect the vray dirt map, not the filename as he need.
such as:
format ("\t" + toUpper (p as string) + " : %\n") gp.filename
and it will be better to need more filters because the vray dirt map can apply to standard material or multi material.
btw about standard material, is a different method than vray material if we use this methods.
...
This supports any type of material. And I placed "--etc." at the end, so you can add below that anything even to look for filenames. Also in some cases users not use only bitmap textures but other procedural maps.
The main problem is to collect VRayDirt maps from selected objects materials and after that everything is easy. :)
Now next step is to collect all bitmap textures which are directly asigned to VRayDirt maps slot, or indirecty (combined with procedurals)
Now is your turn, Budi :)
bga
...
The next solution can be related not only to VRayDirt map but any other map type.
As U see I used *superclasses not *classes that why I not needed more filters
Best way is to use RECURSIVE FN.
I already posted a solution how to collect all nested bitmaps on this forum
bga
Get all Vray Dirt Maps Filename
Yup, Recursive functions can be faster.
...
Yup. Thats the one. I used this fn a couple of times but when the scene is complex (with many textures) then is also very slow.
We can optimize this a bit more but requester not asked for more. So... :)
Regards!
bga