color rendering problem

classic Classic list List threaded Threaded
5 messages Options
Ram
Reply | Threaded
Open this post in threaded view
|

color rendering problem

Ram
Hi,
I have designed a cube and gave colors to it.
In Preview, it is showing the exact. But when I have performed Rendering, the colors are not appearing.
I am new to OpenSCAD. How can I solve it ?

Below is my code for it.

cubes_per_row = 9;

a=20;
b=10;

for(y=[0:cubes_per_row])
{
    for(x=[0:cubes_per_row])
    {

    translate([a*x,a*y,0])
    color([(255)/255,
    ((x+1)*70)/255 + ((x+1)*70)/255*sin(x),
    ((x+1)*120)/255*cos(x)
    ])
        cube([a,a,b]);
     
    }
}


and want to know is there any simple program to design a chess plate showing different colors in every boxes in it ?

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: color rendering problem

OpenSCAD mailing list
According to the wiki entry:



"changing the colors only works in Preview mode (F5); render mode (F6) does not currently support color. "

Your question about designing a chess board, consider Tinkercad, a free web-based 3D modeling program that uses primitives, drag and drop interface and would easily generate that which you require. For aligning the individual blocks, use the workplane feature to attach a plane to a previous row or column of blocks and align to zero for that plane.




On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha Seethamraju <[hidden email]> wrote:


Hi,
I have designed a cube and gave colors to it.
In Preview, it is showing the exact. But when I have performed Rendering, the colors are not appearing.
I am new to OpenSCAD. How can I solve it ?

Below is my code for it.

cubes_per_row = 9;

a=20;
b=10;

for(y=[0:cubes_per_row])
{
    for(x=[0:cubes_per_row])
    {

    translate([a*x,a*y,0])
    color([(255)/255,
    ((x+1)*70)/255 + ((x+1)*70)/255*sin(x),
    ((x+1)*120)/255*cos(x)
    ])
        cube([a,a,b]);
     
    }
}


and want to know is there any simple program to design a chess plate showing different colors in every boxes in it ?
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Ram
Reply | Threaded
Open this post in threaded view
|

Re: color rendering problem

Ram
Thank you for the information.

I have already tried,
According to the wiki entry:

But I am not getting creating the multiple blocks with multiple colors.

And as you said I have tried using Tinkercad, but when I have exported its obj. file or stl. file into Blender the colors are not appearing.

On Mon, Sep 30, 2019 at 4:59 PM fred via Discuss <[hidden email]> wrote:
According to the wiki entry:



"changing the colors only works in Preview mode (F5); render mode (F6) does not currently support color. "

Your question about designing a chess board, consider Tinkercad, a free web-based 3D modeling program that uses primitives, drag and drop interface and would easily generate that which you require. For aligning the individual blocks, use the workplane feature to attach a plane to a previous row or column of blocks and align to zero for that plane.




On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha Seethamraju <[hidden email]> wrote:


Hi,
I have designed a cube and gave colors to it.
In Preview, it is showing the exact. But when I have performed Rendering, the colors are not appearing.
I am new to OpenSCAD. How can I solve it ?

Below is my code for it.

cubes_per_row = 9;

a=20;
b=10;

for(y=[0:cubes_per_row])
{
    for(x=[0:cubes_per_row])
    {

    translate([a*x,a*y,0])
    color([(255)/255,
    ((x+1)*70)/255 + ((x+1)*70)/255*sin(x),
    ((x+1)*120)/255*cos(x)
    ])
        cube([a,a,b]);
     
    }
}


and want to know is there any simple program to design a chess plate showing different colors in every boxes in it ?
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: color rendering problem

OpenSCAD mailing list
Your post adds useful information, referencing blender. Colors in blender are referred to as textures. A search of the 'net for "openscad texture mapping" provides a number of resources that may be of value to you. One of the links is a thingiverse item which has in the description the suggestion to add colors, implying that it is one of the features of texture mapping that is supported.
On Tuesday, October 1, 2019, 5:49:02 AM EDT, Punyavanth Rama Narasimha Seethamraju <[hidden email]> wrote:


Thank you for the information.

I have already tried,
According to the wiki entry:

But I am not getting creating the multiple blocks with multiple colors.

And as you said I have tried using Tinkercad, but when I have exported its obj. file or stl. file into Blender the colors are not appearing.

On Mon, Sep 30, 2019 at 4:59 PM fred via Discuss <[hidden email]> wrote:
According to the wiki entry:



"changing the colors only works in Preview mode (F5); render mode (F6) does not currently support color. "

Your question about designing a chess board, consider Tinkercad, a free web-based 3D modeling program that uses primitives, drag and drop interface and would easily generate that which you require. For aligning the individual blocks, use the workplane feature to attach a plane to a previous row or column of blocks and align to zero for that plane.




On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha Seethamraju <[hidden email]> wrote:


Hi,
I have designed a cube and gave colors to it.
In Preview, it is showing the exact. But when I have performed Rendering, the colors are not appearing.
I am new to OpenSCAD. How can I solve it ?

Below is my code for it.

cubes_per_row = 9;

a=20;
b=10;

for(y=[0:cubes_per_row])
{
    for(x=[0:cubes_per_row])
    {

    translate([a*x,a*y,0])
    color([(255)/255,
    ((x+1)*70)/255 + ((x+1)*70)/255*sin(x),
    ((x+1)*120)/255*cos(x)
    ])
        cube([a,a,b]);
     
    }
}


and want to know is there any simple program to design a chess plate showing different colors in every boxes in it ?
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: color rendering problem

nophead
In reply to this post by Ram
STL files don't contain colour.

On Tue, 1 Oct 2019 at 10:49, Punyavanth Rama Narasimha Seethamraju <[hidden email]> wrote:
Thank you for the information.

I have already tried,
According to the wiki entry:

But I am not getting creating the multiple blocks with multiple colors.

And as you said I have tried using Tinkercad, but when I have exported its obj. file or stl. file into Blender the colors are not appearing.

On Mon, Sep 30, 2019 at 4:59 PM fred via Discuss <[hidden email]> wrote:
According to the wiki entry:



"changing the colors only works in Preview mode (F5); render mode (F6) does not currently support color. "

Your question about designing a chess board, consider Tinkercad, a free web-based 3D modeling program that uses primitives, drag and drop interface and would easily generate that which you require. For aligning the individual blocks, use the workplane feature to attach a plane to a previous row or column of blocks and align to zero for that plane.




On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha Seethamraju <[hidden email]> wrote:


Hi,
I have designed a cube and gave colors to it.
In Preview, it is showing the exact. But when I have performed Rendering, the colors are not appearing.
I am new to OpenSCAD. How can I solve it ?

Below is my code for it.

cubes_per_row = 9;

a=20;
b=10;

for(y=[0:cubes_per_row])
{
    for(x=[0:cubes_per_row])
    {

    translate([a*x,a*y,0])
    color([(255)/255,
    ((x+1)*70)/255 + ((x+1)*70)/255*sin(x),
    ((x+1)*120)/255*cos(x)
    ])
        cube([a,a,b]);
     
    }
}


and want to know is there any simple program to design a chess plate showing different colors in every boxes in it ?
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org