General discussion about Indigo Materials - material requests, material developement, feedback, etc..
-
carbon
- Posts: 231
- Joined: Mon Feb 19, 2007 11:26 am
Post
by carbon » Mon Dec 22, 2008 10:18 pm
hi, i am working on carpaint material and i feel discomfort with one texture i used, it is just the noise for blending, would someone of you, who can write shader language, help me? i need something like attached noise texture to be generated with some given size..
here is the material:
Code: Select all
<material>
<name>carpaint_phong_lowexp</name>
<phong>
<exponent>100</exponent>
<diffuse_albedo_spectrum>
<rgb>
<rgb>0.05 0.05 0.05</rgb>
<gamma>2.2</gamma>
</rgb>
</diffuse_albedo_spectrum>
<ior>1.9</ior>
</phong>
</material>
<material>
<name>carpaint_phong_hiexp</name>
<phong>
<exponent>100000</exponent>
<diffuse_albedo_spectrum>
<rgb>
<rgb>0.05 0.05 0.05</rgb>
<gamma>2.2</gamma>
</rgb>
</diffuse_albedo_spectrum>
<ior>2.4</ior>
</phong>
</material>
<material>
<name>carpaint_mix1</name>
<blend>
<a_name>carpaint_phong_lowexp</a_name>
<b_name>carpaint_phong_hiexp</b_name>
<blend_factor>0.5</blend_factor>
</blend>
</material>
<material>
<name>carpaint_phong_midexp</name>
<phong>
<exponent>2500</exponent>
<diffuse_albedo_spectrum>
<rgb>
<rgb>0.05 0.05 0.05</rgb>
<gamma>2.2</gamma>
</rgb>
</diffuse_albedo_spectrum>
<ior>1.4</ior>
</phong>
</material>
<material>
<name>carpaint_mix2</name>
<blend>
<a_name>carpaint_mix1</a_name>
<b_name>carpaint_phong_midexp</b_name>
<blend_factor>0.5</blend_factor>
</blend>
</material>
<material>
<name>carpaint_metalic_lowexp</name>
<phong>
<exponent>50</exponent>
<nk_data>nkdata\fesi2el2.nk</nk_data>
</phong>
</material>
<material>
<name>carpaint_mix3</name>
<blend>
<a_name>carpaint_mix2</a_name>
<b_name>carpaint_metalic_lowexp</b_name>
<blend_factor>0.07</blend_factor>
</blend>
</material>
<material>
<name>carpaint_metalic_hiexp</name>
<phong>
<exponent>300</exponent>
<nk_data>nkdata\Cu.nk</nk_data>
</phong>
</material>
<material>
<!--name>carpaint</name-->
<name>previewmaterial</name>
<blend>
<a_name>carpaint_mix3</a_name>
<b_name>carpaint_metalic_hiexp</b_name>
<blend_factor>0.07</blend_factor>
</blend>
<blend>
<texture>
<uv_set>default</uv_set>
<path>tex/carpaint_noise_blend-preview.jpg</path>
<exponent>2.2</exponent>
</texture>
</blend>
</material>
thanks
c.
-
Attachments
-
- preview
- im1229788489.jpg (56.53 KiB) Viewed 3405 times
-
- noise texture
- carpaint_noise_blend-preview.jpg (153.97 KiB) Viewed 3405 times
-
PureSpider
- Posts: 1459
- Joined: Tue Apr 08, 2008 9:37 am
- Location: Karlsruhe, BW, Germany
-
Contact:
Post
by PureSpider » Mon Dec 22, 2008 11:07 pm
Whats wrong with that texture? =/
-
carbon
- Posts: 231
- Joined: Mon Feb 19, 2007 11:26 am
Post
by carbon » Mon Dec 22, 2008 11:12 pm
nothing generally, but i like to have same noise size on all models, independent on model/uv/image size
-
PureSpider
- Posts: 1459
- Joined: Tue Apr 08, 2008 9:37 am
- Location: Karlsruhe, BW, Germany
-
Contact:
Post
by PureSpider » Mon Dec 22, 2008 11:17 pm
carbon wrote:...independent on model/uv/image size
Either one of these is not possible
Model, but not UV or image = world mapping
UV, but not model or image = uv mapping
Image, but not UV or model = not possible, also depends on UV mapping
But anyway, I think a simple noise func will do, find it in the shader test thread.
-
fused
- Posts: 3648
- Joined: Fri Sep 22, 2006 7:19 am
- Location: Berlin, Germany
- 3D Software: Cinema 4D
Post
by fused » Mon Dec 22, 2008 11:18 pm
erm... what exporter do you use? previewmaterial isnt even using the texture. the syntax is wrong...
wrong:Code: Select all
<material>
<!--name>carpaint</name-->
<name>previewmaterial</name>
<blend>
<a_name>carpaint_mix3</a_name>
<b_name>carpaint_metalic_hiexp</b_name>
<blend_factor>0.07</blend_factor>
</blend>
<blend>
<texture>
<uv_set>default</uv_set>
<path>tex/carpaint_noise_blend-preview.jpg</path>
<exponent>2.2</exponent>
</texture>
</blend>
</material>
right:Code: Select all
<material>
<!--name>carpaint</name-->
<name>previewmaterial</name>
<blend>
<texture>
<uv_set>default</uv_set>
<path>tex/carpaint_noise_blend-preview.jpg</path>
<exponent>2.2</exponent>
</texture>
<a_name>carpaint_mix3</a_name>
<b_name>carpaint_metalic_hiexp</b_name>
<blend>
<texture><texture_index>0</texture_index></texture>
</blend>
</blend>
</material>
for all mats using blend_factor it should be:
Code: Select all
<blend>
<constant>0.5</constant>
</blend>
inatead of blend_factor
-
carbon
- Posts: 231
- Joined: Mon Feb 19, 2007 11:26 am
Post
by carbon » Tue Dec 23, 2008 12:41 am
ops
no exporter, it is handcoded, i was thinking i am dong something wrong
that's happening when i copypaste too much
anyway i am still interested in turning texture into shader..
-
fused
- Posts: 3648
- Joined: Fri Sep 22, 2006 7:19 am
- Location: Berlin, Germany
- 3D Software: Cinema 4D
Post
by fused » Tue Dec 23, 2008 1:34 am
ill post something soon
-
carbon
- Posts: 231
- Joined: Mon Feb 19, 2007 11:26 am
Post
by carbon » Sun Jan 11, 2009 4:19 am
fused??
-
fused
- Posts: 3648
- Joined: Fri Sep 22, 2006 7:19 am
- Location: Berlin, Germany
- 3D Software: Cinema 4D
Post
by fused » Sun Jan 11, 2009 4:33 am
oh ^^
gotta go now, ill post a bit of code when i come back.
-
fused
- Posts: 3648
- Joined: Fri Sep 22, 2006 7:19 am
- Location: Berlin, Germany
- 3D Software: Cinema 4D
Post
by fused » Sun Jan 11, 2009 7:04 am
Code: Select all
<shader>
<shader>
<![CDATA[
# checkerboard
def eval(vec3 pos) vec3 :
vec3(mul(noise(mul(pos,
#SCALE
5000.0)),
#BRIGHTNESS
0.5))
]]>
</shader>
</shader>
modify scale and brightness to tweak the result as you like
-
Attachments
-
- im1231612984.jpg (54.79 KiB) Viewed 3309 times
-
carbon
- Posts: 231
- Joined: Mon Feb 19, 2007 11:26 am
Post
by carbon » Sun Jan 11, 2009 8:20 am
thanks a lot!
Who is online
Users browsing this forum: No registered users and 10 guests