Marble tiles
Marble tiles
It will be one single phong material, using ISL for its albedo, bump and exponent.
I am already nearly done with the albedo: I would like to increase the randomness in tones distribution (currently dark and light tiles are grouped, depends on tiles frequency though), and add variance in the cement.
It will be easy for the user to customize the reference marble texture (a bitmap currently, wich is scanned over its two dimensions) and the number of tiles, horizontally and vertically. In effect, tiles don't have to be square.
Note that the result will be procedural, wich means that no texels will be visible no matter how close the shot will be.
Thanks to robostimpy for its artwork, and for encouraging us to make our own marble. That may be the matter for another ISL development thread, though not a simple one obviously (I'm reserving myself the right to fly away from that one ).
Concerning an introduction to ISL, I mean to make it a brand different topic, to start with the basics (I just acquired).
I am already nearly done with the albedo: I would like to increase the randomness in tones distribution (currently dark and light tiles are grouped, depends on tiles frequency though), and add variance in the cement.
It will be easy for the user to customize the reference marble texture (a bitmap currently, wich is scanned over its two dimensions) and the number of tiles, horizontally and vertically. In effect, tiles don't have to be square.
Note that the result will be procedural, wich means that no texels will be visible no matter how close the shot will be.
Thanks to robostimpy for its artwork, and for encouraging us to make our own marble. That may be the matter for another ISL development thread, though not a simple one obviously (I'm reserving myself the right to fly away from that one ).
Concerning an introduction to ISL, I mean to make it a brand different topic, to start with the basics (I just acquired).
- Attachments
obsolete asset
Re: Marble tiles
Below is the reference I used to discretize the fbm's:
http://www.digitalartform.com/archives/ ... tiled.html
Wich gives, under a rather expanded ISL form (and as used in the albedo above):
NB: this code chunk is not functional alone, notably u() and v() are defined otherwhere.
http://www.digitalartform.com/archives/ ... tiled.html
Wich gives, under a rather expanded ISL form (and as used in the albedo above):
Code: Select all
def slicesU() real : 16.0
def slicesV() real : 24.0
def discreteU() real :
div(floor(mul(texi(), slicesU())), slicesU())
def discreteV() real :
div(floor(mul(texj(), slicesV())), slicesV())
def outUV() vec2 :
vec2( discreteU() + u(),
discreteV() + v() )
def marbleTiled() vec3 :
sample2DTextureVec3(0, outUV())
obsolete asset
Re: Marble tiles
Just awesome!
So CTZn, you got into ISL ? Very cool.
So CTZn, you got into ISL ? Very cool.
Re: Marble tiles
If interested, I can make a marble texture to my procedural ceramic:
http://www.indigorenderer.com/materials/materials/286
That way, you will have the full randomized procedural bump + tile misplacement (tiles are procedurally not perfectly aligned, which improves a lot realism)
http://www.indigorenderer.com/materials/materials/286
That way, you will have the full randomized procedural bump + tile misplacement (tiles are procedurally not perfectly aligned, which improves a lot realism)
Eclat-Digital Research
http://www.eclat-digital.com
http://www.eclat-digital.com
Re: Marble tiles
Very interesting, I'll make sure to follow this topic! It's great to see what Indigo can do with procedural coded materials, it's quite unfortunate that it ain't simple..
Cheers,
Roo Evans
Roo Evans
Re: Marble tiles
Hi foxar, ISL is great! I did several materials already:
http://www.indigorenderer.com/materials/materials/286
http://www.indigorenderer.com/materials/materials/340
http://www.indigorenderer.com/materials/materials/346
http://www.indigorenderer.com/materials/materials/292
http://www.indigorenderer.com/materials/materials/299
http://www.indigorenderer.com/materials/materials/342
http://www.indigorenderer.com/materials/materials/425
http://www.indigorenderer.com/materials/materials/792
The most complicated ones being:
http://www.indigorenderer.com/materials/materials/688
http://www.indigorenderer.com/materials/materials/327 - http://www.indigorenderer.com/forum/vie ... 678#p92678
Etienne
http://www.indigorenderer.com/materials/materials/286
http://www.indigorenderer.com/materials/materials/340
http://www.indigorenderer.com/materials/materials/346
http://www.indigorenderer.com/materials/materials/292
http://www.indigorenderer.com/materials/materials/299
http://www.indigorenderer.com/materials/materials/342
http://www.indigorenderer.com/materials/materials/425
http://www.indigorenderer.com/materials/materials/792
The most complicated ones being:
http://www.indigorenderer.com/materials/materials/688
http://www.indigorenderer.com/materials/materials/327 - http://www.indigorenderer.com/forum/vie ... 678#p92678
Etienne
Eclat-Digital Research
http://www.eclat-digital.com
http://www.eclat-digital.com
Re: Marble tiles
We are of course, goodies, always !If interested, I can make a marble texture to my procedural ceramic
As far as I'm concerned I want to keep understanding what I am doing or I wouldn't learn; I'm not getting your advanced code out of the box for the least (my math teachers all hated me, now I'm understanding it's because it was insulting that I couldn't understand their art. If some numbers ain't real then none are coz they're all numbers now let me alone ! I was ok at logic tho ), but yes I'll check closer at some point. I have that chance that marble is often of a straight cut (with a tiny, straight, 45° bevel tbh).
In the other hand Etienne I am interested in discussing you modelisation methods (I mean, in plain english to start with), I think you are able to place and orient each tile individually as you please while mines are only shaped by a straight grid. Did you start with pyramids ?
The most complicated thing I'll have to do for the current material will be to fit a flattish sinusoidal carving along the cement lines, I know I'll use the min() function to merge horizontal and vertical bands already. No joke I'll have to find the correlation out... please lemme do this ! But also Etienne, please do here as fun drives you !
Suvakas: yup thank you, and congrats about the new maxigo !
obsolete asset
Re: Marble tiles
I'm currently trying to have more control on the shader, more pics tonight. Also I recon that the lack of a slope over tiles borders is not that great on bump mapping by a close shot, not sure what I can do myself about that.
Anyhow I'll have the material posted this week, I'd rather not be so perfectionist for a first try.
Oh and sorry about what I said on my maths teachers, they couldn't help that's all
Anyhow I'll have the material posted this week, I'd rather not be so perfectionist for a first try.
Oh and sorry about what I said on my maths teachers, they couldn't help that's all
obsolete asset
Re: Marble tiles
As much as it was a nice mosaic, the variance in the tiles albedo made by no mean a realistic floor. So I am now trying to find a visual balance.
This is currently revealing more of the noises driving the features along with a cyclic nature from within my code. Two aspects I'll be working at. C&C's welcome !
This is currently revealing more of the noises driving the features along with a cyclic nature from within my code. Two aspects I'll be working at. C&C's welcome !
obsolete asset
Re: Marble tiles
Well, that's 99% finished. Copy the code below and paste into a new IGM file to test, material name is tiledMarble. Don't forget to get a nice marble texture and change the path (currently: marble_21_402_by_robostimpy-d34dq4t.jpg) accordingly.
The number of tiles and cement width are easy to configure, however they must be changed into the three material parameters identically, with your lil fingers
The number of tiles and cement width are easy to configure, however they must be changed into the three material parameters identically, with your lil fingers
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<scenedata>
<material>
<name>tiledMarble</name>
<phong>
<texture>
<uv_set>default</uv_set>
<path>
marble_21_402_by_robostimpy-d34dq4t.jpg
</path>
<a>0.0</a>
<b>1.0</b>
<c>0.0</c>
<exponent>2.2</exponent>
</texture>
<ior>1.52</ior>
<exponent>
<shader>
<shader>
<![CDATA[
# modify this block in exponent, bump, albedo
def slicesX() real : 16.0
def slicesY() real : 16.0
def gridWidth() real : 0.01
# end custom bloc
def eval(vec3 pos) real :
if(
lt(
min(
fract(dot(vec2(slicesX(), 0.0), tex())),
fract(dot(vec2(0.0, slicesY()), tex()))
),
gridWidth()
),
4.,
(fbm(tex(), 12) + 1.)*3000.
)
]]>
</shader>
</shader>
</exponent>
<diffuse_albedo>
<shader>
<shader>
<![CDATA[
# modify this block in exponent, bump, albedo
def slicesX() real : 16.0
def slicesY() real : 16.0
def gridWidth() real : 0.01
# end custom bloc
# albedo-specific edit bloc
def scale() real : 8.
def octaves() int : 16
# end custom bloc
def discretizeVec2(vec2 v2, real slicesX, real slicesY, real offsetX, real offsetY) vec2 :
vec2(
floor(doti(v2) * slicesX) / slicesX,
floor(dotj(v2) * slicesY) / slicesY
) + vec2(offsetX, offsetY)
def tiledMarble() vec3 :
sample2DTextureVec3(0,
vec2(
fbm((tex() + vec2(
fbm(discretizeVec2(tex(), slicesX(), slicesY(),0.0,0.0), octaves()),
fbm(discretizeVec2(tex(), slicesX(), slicesY(),1.25,1.25), octaves())
)
) * scale(), octaves()
),
fbm((tex() + vec2(
fbm(discretizeVec2(tex(), slicesX(), slicesY(),2.5,2.5), octaves()),
fbm(discretizeVec2(tex(), slicesX(), slicesY(),3.75,3.75), octaves())
)
) * scale(), octaves()
)
)
)
# GRID
def eval(vec3 pos) vec3 :
if(
lt(
min(
fract(dot(vec2(slicesX(), 0.0), tex())),
fract(dot(vec2(0.0, slicesY()), tex()))
),
gridWidth()
),
vec3(0.75, 0.68, 0.5), # stripes color
tiledMarble() # tiles color
)
]]>
</shader>
</shader>
</diffuse_albedo>
<bump>
<shader>
<shader>
<![CDATA[
# modify this block in exponent, bump, albedo
def slicesX() real : 16.0
def slicesY() real : 16.0
def gridWidth() real : 0.01
# end custom bloc
def pi() real : 3.14159265358979323846264338327950288419716939937
# BUMP: CEMENT
def cementBump() real :
(max(
abs(noise(tex()*3000.)),
0.5
) + abs(fbm(tex()*3000.,4))/40.) /800. # 1m/800 = 1.25mm
# BUMP: GRID
def eval() real :
if(
lt(
min(
fract(dot(vec2(slicesX(), 0.0), getTexCoords(0))),
fract(dot(vec2(0.0, slicesY()), getTexCoords(0)))
),
gridWidth()
),
cementBump(),
0.002
)
* neg(
max(
if(
lt(
fract(dot(vec2(slicesX(), 0.0), getTexCoords(0))),
gridWidth()
),
1.0,
0.0
)*sin(texi()* slicesX() *pi()*(recip(gridWidth()))),
if(
lt(
fract(dot(vec2(0.0, slicesY()), getTexCoords(0))),
gridWidth()
),
1.0,
0.0
)*sin(texj()* slicesY() *pi()*(recip(gridWidth())))
)
) + 1.
]]>
</shader>
</shader>
</bump>
</phong>
</material>
</scenedata>
obsolete asset
Re: Marble tiles
Thank you pixie, I appreciate it coming from an artist like you
If you are fancy editing the custom block, don't miss also the scale() parameter found in the diffuse_albedo, it will drastically change the look of the material:
For instance if you liked the variations found in the first posted picture, you can set it around 1.0 (0.5 or 1. or 2.5, whatever) A scale of 512. or more may still make sense depending on your taste. Don't remove the period though or you'll throw an integer, and that's not what the shader expects.
Talking about wich, the shader is more complex than it should; all this time I tried to bust an element of continuity between tiles to no avail... will update.
Comments and improvements from ISL writers are much welcome !
If you are fancy editing the custom block, don't miss also the scale() parameter found in the diffuse_albedo, it will drastically change the look of the material:
Code: Select all
# albedo-specific edit bloc
def scale() real : 8.
def octaves() int : 16
# end custom bloc
Talking about wich, the shader is more complex than it should; all this time I tried to bust an element of continuity between tiles to no avail... will update.
Comments and improvements from ISL writers are much welcome !
obsolete asset
- Doug Armand
- Posts: 1038
- Joined: Fri May 16, 2008 5:49 pm
- Location: London UK
Re: Marble tiles
Absolutely superb work CTZn!
am very envious of your ability to program shaders like this
am very envious of your ability to program shaders like this
Doug
Doug Armand
Doug Armand
Re: Marble tiles
Well, I always loathed texels And again, a fair part of the result comes from the input texture.
Glad you like it Doug, thanks a lot !
I'll fiddle with a bit more the next days, I'm pretty sure some spp's can be saved, also I didn't evaluate the exponent bit.
Glad you like it Doug, thanks a lot !
I'll fiddle with a bit more the next days, I'm pretty sure some spp's can be saved, also I didn't evaluate the exponent bit.
obsolete asset
Re: Marble tiles
Hi guys,
I'm no Indigo user but always interested in new things
This marble material looks awsome!!!! I've seen a lot of coding up there so i guess this is no simple bitmap material. Can you tell me something more about that indigo procedural materials? Is this an indigo-only thing or would it be possible to generate bitmaps out of it to use in cinema4d or some other 3D software?
Would really love to have this Material!!!
regards
I'm no Indigo user but always interested in new things
This marble material looks awsome!!!! I've seen a lot of coding up there so i guess this is no simple bitmap material. Can you tell me something more about that indigo procedural materials? Is this an indigo-only thing or would it be possible to generate bitmaps out of it to use in cinema4d or some other 3D software?
Would really love to have this Material!!!
regards
C4D R20 Studio
mad-imagery.com
mad-imagery.com
Who is online
Users browsing this forum: No registered users and 68 guests