discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

color rendering problem

PR
Punyavanth Rama Narasimha Seethamraju
Mon, Sep 30, 2019 2:49 PM

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)/255sin(x),
((x+1)120)/255cos(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 ?

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 ?
F
fred
Mon, Sep 30, 2019 2:58 PM

According to the wiki entry:OpenSCAD User Manual/First Steps/Changing the colour of an object - Wikibooks, open books for an open world

|
|
|
|  |  |

|

|
|
|  |
OpenSCAD User Manual/First Steps/Changing the colour of an object - Wiki...

|

|

|

"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.

|
|
|
|  |  |

|

|
|
|  |
Tinkercad | From mind to design in minutes

Tinkercad is a free, easy-to-use app for 3D design, electronics, and coding.
|

|

|

On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha Seethamraju <seethamraju.rnp@gmail.com> 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([ax,ay,0])
    color([(255)/255,
    ((x+1)*70)/255 + ((x+1)70)/255sin(x),
    ((x+1)120)/255cos(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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

According to the wiki entry:OpenSCAD User Manual/First Steps/Changing the colour of an object - Wikibooks, open books for an open world | | | | | | | | | | | OpenSCAD User Manual/First Steps/Changing the colour of an object - Wiki... | | | "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. | | | | | | | | | | | Tinkercad | From mind to design in minutes Tinkercad is a free, easy-to-use app for 3D design, electronics, and coding. | | | On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha Seethamraju <seethamraju.rnp@gmail.com> 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 Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
PR
Punyavanth Rama Narasimha Seethamraju
Tue, Oct 1, 2019 9:48 AM

Thank you for the information.

I have already tried,
According to the wiki entry:
OpenSCAD User Manual/First Steps/Changing the colour of an object -
Wikibooks, open books for an open world
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object

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 discuss@lists.openscad.org
wrote:

According to the wiki entry:
OpenSCAD User Manual/First Steps/Changing the colour of an object -
Wikibooks, open books for an open world
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object

OpenSCAD User Manual/First Steps/Changing the colour of an object - Wiki...

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object

"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
https://www.tinkercad.com, 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.

Tinkercad | From mind to design in minutes

Tinkercad is a free, easy-to-use app for 3D design, electronics, and
coding.
https://www.tinkercad.com

On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha
Seethamraju seethamraju.rnp@gmail.com 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)/255sin(x),
((x+1)120)/255cos(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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Thank you for the information. I have already tried, According to the wiki entry: OpenSCAD User Manual/First Steps/Changing the colour of an object - Wikibooks, open books for an open world <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object> 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 <discuss@lists.openscad.org> wrote: > According to the wiki entry: > OpenSCAD User Manual/First Steps/Changing the colour of an object - > Wikibooks, open books for an open world > <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object> > > OpenSCAD User Manual/First Steps/Changing the colour of an object - Wiki... > > > <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object> > > > "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 > <https://www.tinkercad.com>, 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. > > Tinkercad | From mind to design in minutes > > Tinkercad is a free, easy-to-use app for 3D design, electronics, and > coding. > <https://www.tinkercad.com> > > > > On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha > Seethamraju <seethamraju.rnp@gmail.com> 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 > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
F
fred
Tue, Oct 1, 2019 9:54 AM

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 seethamraju.rnp@gmail.com wrote:

Thank you for the information.
I have already tried,According to the wiki entry:OpenSCAD User Manual/First Steps/Changing the colour of an object - Wikibooks, open books for an open world
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 discuss@lists.openscad.org wrote:

According to the wiki entry:OpenSCAD User Manual/First Steps/Changing the colour of an object - Wikibooks, open books for an open world

|
|
|
|  |  |

|

|
|
|  |
OpenSCAD User Manual/First Steps/Changing the colour of an object - Wiki...

|

|

|

"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.

|
|
|
|  |  |

|

|
|
|  |
Tinkercad | From mind to design in minutes

Tinkercad is a free, easy-to-use app for 3D design, electronics, and coding.
|

|

|

On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha Seethamraju <seethamraju.rnp@gmail.com> 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([ax,ay,0])
    color([(255)/255,
    ((x+1)*70)/255 + ((x+1)70)/255sin(x),
    ((x+1)120)/255cos(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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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 <seethamraju.rnp@gmail.com> wrote: Thank you for the information. I have already tried,According to the wiki entry:OpenSCAD User Manual/First Steps/Changing the colour of an object - Wikibooks, open books for an open world 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 <discuss@lists.openscad.org> wrote: According to the wiki entry:OpenSCAD User Manual/First Steps/Changing the colour of an object - Wikibooks, open books for an open world | | | | | | | | | | | OpenSCAD User Manual/First Steps/Changing the colour of an object - Wiki... | | | "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. | | | | | | | | | | | Tinkercad | From mind to design in minutes Tinkercad is a free, easy-to-use app for 3D design, electronics, and coding. | | | On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha Seethamraju <seethamraju.rnp@gmail.com> 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 Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org _______________________________________________ OpenSCAD mailing list Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org _______________________________________________ OpenSCAD mailing list Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
NH
nop head
Tue, Oct 1, 2019 10:52 AM

STL files don't contain colour.

On Tue, 1 Oct 2019 at 10:49, Punyavanth Rama Narasimha Seethamraju <
seethamraju.rnp@gmail.com> wrote:

Thank you for the information.

I have already tried,
According to the wiki entry:
OpenSCAD User Manual/First Steps/Changing the colour of an object -
Wikibooks, open books for an open world
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object

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 <
discuss@lists.openscad.org> wrote:

According to the wiki entry:
OpenSCAD User Manual/First Steps/Changing the colour of an object -
Wikibooks, open books for an open world
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object

OpenSCAD User Manual/First Steps/Changing the colour of an object -
Wiki...

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object

"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
https://www.tinkercad.com, 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.

Tinkercad | From mind to design in minutes

Tinkercad is a free, easy-to-use app for 3D design, electronics, and
coding.
https://www.tinkercad.com

On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha
Seethamraju seethamraju.rnp@gmail.com 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)/255sin(x),
((x+1)120)/255cos(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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

STL files don't contain colour. On Tue, 1 Oct 2019 at 10:49, Punyavanth Rama Narasimha Seethamraju < seethamraju.rnp@gmail.com> wrote: > Thank you for the information. > > I have already tried, > According to the wiki entry: > OpenSCAD User Manual/First Steps/Changing the colour of an object - > Wikibooks, open books for an open world > <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object> > > 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 < > discuss@lists.openscad.org> wrote: > >> According to the wiki entry: >> OpenSCAD User Manual/First Steps/Changing the colour of an object - >> Wikibooks, open books for an open world >> <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object> >> >> OpenSCAD User Manual/First Steps/Changing the colour of an object - >> Wiki... >> >> >> <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/First_Steps/Changing_the_colour_of_an_object> >> >> >> "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 >> <https://www.tinkercad.com>, 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. >> >> Tinkercad | From mind to design in minutes >> >> Tinkercad is a free, easy-to-use app for 3D design, electronics, and >> coding. >> <https://www.tinkercad.com> >> >> >> >> On Monday, September 30, 2019, 10:50:05 AM EDT, Punyavanth Rama Narasimha >> Seethamraju <seethamraju.rnp@gmail.com> 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 >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >