POV-Ray : Newsgroups : povray.newusers : Problem making a bumpy surface Server Time
23 Dec 2024 07:18:58 EST (-0500)
  Problem making a bumpy surface (Message 1 to 4 of 4)  
From: Darats
Subject: Problem making a bumpy surface
Date: 4 Mar 2010 20:25:00
Message: <web.4b905b8bcb876ba3f408d5940@news.povray.org>
Hi there,

Here is my problem :

I have and object, a simple mesh for example :

I would like to declare it with no color but just with a bumby surface.

Lets see a code (just an example, it will not work like this)


#declare stuff =

mesh {
  triangle { <1,13.2146,-23.2146>, <3,14.286,-24.286>, <17,14.286,-24.286> }
  triangle { <17,14.286,-24.286>, <19,13.2146,-23.2146>, <1,13.2146,-23.2146> }
  triangle { <19,13.2146,-23.2146>, <17,14.286,-24.286>, <17,18.2146,-28.2146> }
  triangle { <17,18.2146,-28.2146>, <19,19.2861,-29.2861>, <19,13.2146,-23.2146>
}
  triangle { <19,19.2861,-29.2861>, <17,18.2146,-28.2146>, <3,18.2146,-28.2146>
}
  triangle { <3,18.2146,-28.2146>, <1,19.2861,-29.2861>, <19,19.2861,-29.2861> }
  triangle { <1,19.2861,-29.2861>, <3,18.2146,-28.2146>, <3,14.286,-24.286> }
  triangle { <3,14.286,-24.286>, <1,13.2146,-23.2146>, <1,19.2861,-29.2861> }
  triangle { <3,15.7146,-25.7146>, <17,15.7146,-25.7146>, <17,16.786,-26.786> }
  triangle { <17,16.786,-26.786>, <3,16.786,-26.786>, <3,15.7146,-25.7146> }
  triangle { <5,14.286,-24.286>, <7,14.286,-24.286>, <7,18.2146,-28.2146> }
  triangle { <7,18.2146,-28.2146>, <5,18.2146,-28.2146>, <5,14.286,-24.286> }
  triangle { <9,14.286,-24.286>, <11,14.286,-24.286>, <11,18.2146,-28.2146> }
  triangle { <11,18.2146,-28.2146>, <9,18.2146,-28.2146>, <9,14.286,-24.286> }
  triangle { <13,14.286,-24.286>, <15,14.286,-24.286>, <15,18.2146,-28.2146> }
  triangle { <15,18.2146,-28.2146>, <13,18.2146,-28.2146>, <13,14.286,-24.286> }
   }
 mesh {
  triangle { <1,11.7859,-21.7859>, <19,11.7859,-21.7859>, <19,13.2146,-23.2146>
}
  triangle { <19,13.2146,-23.2146>, <1,13.2146,-23.2146>, <1,11.7859,-21.7859> }
                normal { bumps 1 scale 25*0.02 }

 }
}



#declare Scene = object {

  stuff

  material { Red }
 }
#end



So it doesn't work.

With this code I can only have the first mesh in red, the other stays black. If
I remove the bumps, the second mesh has now the right color, but no bumps.

And I can't put the color directly when I'm creating the object, it has to be
uncolored but with bumps, and then colored (keeping the bumps).


I hope you see what I am trying to mean. Thank you for your help.


Post a reply to this message

From: Leroy Whetstone
Subject: Re: Problem making a bumpy surface
Date: 5 Mar 2010 00:29:02
Message: <4B909619.3010206@joplin.com>
Darats wrote:
> Hi there,
> 
> Here is my problem :
> 
> I have and object, a simple mesh for example :
> 
> I would like to declare it with no color but just with a bumby surface.
> 
> Lets see a code (just an example, it will not work like this)
> 
> 
> #declare stuff =
> 
> mesh {
>   triangle { <1,13.2146,-23.2146>, <3,14.286,-24.286>, <17,14.286,-24.286> }
>   triangle { <17,14.286,-24.286>, <19,13.2146,-23.2146>, <1,13.2146,-23.2146> }
>   triangle { <19,13.2146,-23.2146>, <17,14.286,-24.286>, <17,18.2146,-28.2146> }
>   triangle { <17,18.2146,-28.2146>, <19,19.2861,-29.2861>, <19,13.2146,-23.2146>
> }
>   triangle { <19,19.2861,-29.2861>, <17,18.2146,-28.2146>, <3,18.2146,-28.2146>
> }
>   triangle { <3,18.2146,-28.2146>, <1,19.2861,-29.2861>, <19,19.2861,-29.2861> }
>   triangle { <1,19.2861,-29.2861>, <3,18.2146,-28.2146>, <3,14.286,-24.286> }
>   triangle { <3,14.286,-24.286>, <1,13.2146,-23.2146>, <1,19.2861,-29.2861> }
>   triangle { <3,15.7146,-25.7146>, <17,15.7146,-25.7146>, <17,16.786,-26.786> }
>   triangle { <17,16.786,-26.786>, <3,16.786,-26.786>, <3,15.7146,-25.7146> }
>   triangle { <5,14.286,-24.286>, <7,14.286,-24.286>, <7,18.2146,-28.2146> }
>   triangle { <7,18.2146,-28.2146>, <5,18.2146,-28.2146>, <5,14.286,-24.286> }
>   triangle { <9,14.286,-24.286>, <11,14.286,-24.286>, <11,18.2146,-28.2146> }
>   triangle { <11,18.2146,-28.2146>, <9,18.2146,-28.2146>, <9,14.286,-24.286> }
>   triangle { <13,14.286,-24.286>, <15,14.286,-24.286>, <15,18.2146,-28.2146> }
>   triangle { <15,18.2146,-28.2146>, <13,18.2146,-28.2146>, <13,14.286,-24.286> }
>    }
>  mesh {
>   triangle { <1,11.7859,-21.7859>, <19,11.7859,-21.7859>, <19,13.2146,-23.2146>
> }
>   triangle { <19,13.2146,-23.2146>, <1,13.2146,-23.2146>, <1,11.7859,-21.7859> }
>                 normal { bumps 1 scale 25*0.02 }
> 
>  }
> }
> 
> 
> 
> #declare Scene = object {
> 
>   stuff
> 
>   material { Red }
>  }
> #end
> 
> 
> 
> So it doesn't work.
> 
> With this code I can only have the first mesh in red, the other stays black. If
> I remove the bumps, the second mesh has now the right color, but no bumps.
> 
> And I can't put the color directly when I'm creating the object, it has to be
> uncolored but with bumps, and then colored (keeping the bumps).
> 
> 
> I hope you see what I am trying to mean. Thank you for your help.
> 
> 

First, what you have written here, Stuff only equals the first mesh, So 
when you use 'object' the second mesh is not textured.
Your use of 'material { Red }' and the  '#end' suggests that 'Red' is 
defined as a texture and interior somewhere and that the whole code is 
inside an '#if' or a '#macro' statement.
  If what you want is both meshes to be the same color but the first to
have no normal and the second to have a normal. You can use something 
like this:
  #declare Stuff1=mesh{mesh1...}
  #declare Stuff2=mesh{mesh2...}
  #declare Color=rgb<1,0,0>;
  object{Stuff1 pigment{Color}}
  object{Stuff2 pigment{Color} normal { bumps 1 scale 25*0.02 }}

Have fun!


Post a reply to this message

From: Darats
Subject: Re: Problem making a bumpy surface
Date: 5 Mar 2010 05:20:01
Message: <web.4b90da0adf3fa234f408d5940@news.povray.org>
Thank you for your answer, but it won't work for what I want, I will try to
explain why.

Here is the "real" code I'm using, this is automatically generated by L3PAdd-On
a software to make pov files of Ldraw Lego library.



//// Part 3039p34.dat
#ifndef (_3039p34_dot_dat)
#declare _3039p34_dot_dat = #if (L3Quality = 0) box { <-20,-4,-30.0004>,
<20,24,10> } #else union {
// Slope Brick 45  2 x  2 with Computer Panel Pattern (needs work)
// Name: 3039p34.dat
// Author: Tore Eriksson [simlego]
// !LDRAW_ORG Part UPDATE 1997-15
// !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt
// !HISTORY 1997-09-29 [PTadmin] Official Update 1997-15
// !HISTORY 2007-06-09 [PTadmin] Header formatted for Contributor Agreement
// !HISTORY 2008-07-01 [PTadmin] Official Update 2008-01
 object { _4_dash_4disc_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,16,15.0003,-25.0003> material { L3Color2 } }
 object { _4_dash_4ndis_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,16,15.0003,-25.0003> material { L3Color15 } }
 object { _4_dash_4disc_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,12,15.0003,-25.0003> material { L3Color2 } }
 object { _4_dash_4ndis_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,12,15.0003,-25.0003> material { L3Color15 } }
 object { _4_dash_4disc_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,8,15.0003,-25.0003> material { L3Color2 } }
 object { _4_dash_4ndis_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,8,15.0003,-25.0003> material { L3Color15 } }
 object { _4_dash_4disc_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,4,15.0003,-25.0003> material { L3Color4 } }
 object { _4_dash_4ndis_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,4,15.0003,-25.0003> material { L3Color15 } }
 object { _4_dash_4disc_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,16,17.5003,-27.5003> material { L3Color4 } }
 object { _4_dash_4ndis_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,16,17.5003,-27.5003> material { L3Color15 } }
 object { _4_dash_4disc_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,12,17.5003,-27.5003> material { L3Color4 } }
 object { _4_dash_4ndis_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,12,17.5003,-27.5003> material { L3Color15 } }
 object { _4_dash_4disc_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,8,17.5003,-27.5003> material { L3Color4 } }
 object { _4_dash_4ndis_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,8,17.5003,-27.5003> material { L3Color15 } }
 object { _4_dash_4disc_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,4,17.5003,-27.5003> material { L3Color4 } }
 object { _4_dash_4ndis_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,4,17.5003,-27.5003> material { L3Color15 } }
 mesh {
  triangle { <1,13.2146,-23.2146>, <3,14.286,-24.286>, <17,14.286,-24.286> }
  triangle { <17,14.286,-24.286>, <19,13.2146,-23.2146>, <1,13.2146,-23.2146> }
  triangle { <19,13.2146,-23.2146>, <17,14.286,-24.286>, <17,18.2146,-28.2146> }
  triangle { <17,18.2146,-28.2146>, <19,19.2861,-29.2861>, <19,13.2146,-23.2146>
}
  triangle { <19,19.2861,-29.2861>, <17,18.2146,-28.2146>, <3,18.2146,-28.2146>
}
  triangle { <3,18.2146,-28.2146>, <1,19.2861,-29.2861>, <19,19.2861,-29.2861> }
  triangle { <1,19.2861,-29.2861>, <3,18.2146,-28.2146>, <3,14.286,-24.286> }
  triangle { <3,14.286,-24.286>, <1,13.2146,-23.2146>, <1,19.2861,-29.2861> }
  triangle { <3,15.7146,-25.7146>, <17,15.7146,-25.7146>, <17,16.786,-26.786> }
  triangle { <17,16.786,-26.786>, <3,16.786,-26.786>, <3,15.7146,-25.7146> }
  triangle { <5,14.286,-24.286>, <7,14.286,-24.286>, <7,18.2146,-28.2146> }
  triangle { <7,18.2146,-28.2146>, <5,18.2146,-28.2146>, <5,14.286,-24.286> }
  triangle { <9,14.286,-24.286>, <11,14.286,-24.286>, <11,18.2146,-28.2146> }
  triangle { <11,18.2146,-28.2146>, <9,18.2146,-28.2146>, <9,14.286,-24.286> }
  triangle { <13,14.286,-24.286>, <15,14.286,-24.286>, <15,18.2146,-28.2146> }
  triangle { <15,18.2146,-28.2146>, <13,18.2146,-28.2146>, <13,14.286,-24.286> }
  material { L3Color15 }
 }
 mesh {
  triangle { <1,11.7859,-21.7859>, <19,11.7859,-21.7859>, <19,13.2146,-23.2146>
}
  triangle { <19,13.2146,-23.2146>, <1,13.2146,-23.2146>, <1,11.7859,-21.7859> }
  normal { bumps 1 scale 25*0.02 }
 }
 object { _4_dash_4disc_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,-16,15.0003,-25.0003> material { L3Color4 } }
 object { _4_dash_4ndis_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,-16,15.0003,-25.0003> material { L3Color15 } }
 object { _4_dash_4disc_dot_dat matrix
<1.5,0,0,1,1,0,0,1.07145,-1.07145,-12,15.0003,-25.0003> }
 object { _4_dash_4ndis_dot_dat matrix
<1.5,0,0,1,1,0,0,1.07145,-1.07145,-12,15.0003,-25.0003> material { L3Color15 } }
 object { _4_dash_4disc_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,-8,15.0003,-25.0003> material { L3Color4 } }
 object { _4_dash_4ndis_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,-8,15.0003,-25.0003> material { L3Color15 } }
 object { _4_dash_4disc_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,-4,15.0003,-25.0003> material { L3Color2 } }
 object { _4_dash_4ndis_dot_dat matrix
<1,0,0,1,1,0,0,0.7143,-0.7143,-4,15.0003,-25.0003> material { L3Color15 } }
 mesh {
  triangle { <-19,12.5002,-22.5002>, <-17,14.286,-24.286>, <-15,14.286,-24.286>
}
  triangle { <-15,14.286,-24.286>, <-13.5,13.9288,-23.9289>,
<-19,12.5002,-22.5002> }
  triangle { <-19,12.5002,-22.5002>, <-13.5,13.9288,-23.9289>,
<-10.5,13.9288,-23.9289> }
  triangle { <-10.5,13.9288,-23.9289>, <-1,12.5003,-22.5003>,
<-19,12.5002,-22.5002> }
  triangle { <-1,12.5003,-22.5003>, <-10.5,13.9288,-23.9289>,
<-9,14.286,-24.286> }
  triangle { <-9,14.286,-24.286>, <-7,14.286,-24.286>, <-1,12.5003,-22.5003> }
  triangle { <-1,12.5003,-22.5003>, <-7,14.286,-24.286>, <-3,14.286,-24.286> }
  triangle { <-1,12.5003,-22.5003>, <-3,14.286,-24.286>, <-3,15.7146,-25.7146> }
  triangle { <-3,15.7146,-25.7146>, <-1,17.1432,-27.1432>, <-1,12.5003,-22.5003>
}
  triangle { <-1,17.1432,-27.1432>, <-3,15.7146,-25.7146>, <-9,15.7146,-25.7146>
}
  triangle { <-9,15.7146,-25.7146>, <-10.5,16.0717,-26.0717>,
<-1,17.1432,-27.1432> }
  triangle { <-1,17.1432,-27.1432>, <-10.5,16.0717,-26.0717>,
<-13.5,16.0717,-26.0717> }
  triangle { <-13.5,16.0717,-26.0717>, <-19,17.1432,-27.1432>,
<-1,17.1432,-27.1432> }
  triangle { <-19,17.1432,-27.1432>, <-13.5,16.0717,-26.0717>,
<-15,15.7146,-25.7146> }
  triangle { <-15,15.7146,-25.7146>, <-17,15.7146,-25.7146>,
<-19,17.1432,-27.1432> }
  triangle { <-19,17.1432,-27.1432>, <-17,15.7146,-25.7146>,
<-17,14.286,-24.286> }
  triangle { <-17,14.286,-24.286>, <-19,12.5002,-22.5002>,
<-19,17.1432,-27.1432> }
  triangle { <-15,14.286,-24.286>, <-13.5,13.9288,-23.9289>,
<-13.5,16.0717,-26.0717> }
  triangle { <-13.5,16.0717,-26.0717>, <-15,15.7146,-25.7146>,
<-15,14.286,-24.286> }
  triangle { <-10.5,13.9288,-23.9289>, <-9,14.286,-24.286>,
<-9,15.7146,-25.7146> }
  triangle { <-9,15.7146,-25.7146>, <-10.5,16.0717,-26.0717>,
<-10.5,13.9288,-23.9289> }
  triangle { <-7,14.286,-24.286>, <-5,14.286,-24.286>, <-5,15.7146,-25.7146> }
  triangle { <-5,15.7146,-25.7146>, <-7,15.7146,-25.7146>, <-7,14.286,-24.286> }
  material { L3Color15 }
 }
 mesh {
  triangle { <-20,0,-10>, <-19,0.7143,-10.7143>, <19,0.7143,-10.7143> }
  triangle { <19,0.7143,-10.7143>, <20,0,-10>, <-20,0,-10> }
  triangle { <20,0,-10>, <19,0.7143,-10.7143>, <19,19.2861,-29.2861> }
  triangle { <19,19.2861,-29.2861>, <20,20.0004,-30.0004>, <20,0,-10> }
  triangle { <20,20.0004,-30.0004>, <19,19.2861,-29.2861>,
<-19,19.2861,-29.2861> }
  triangle { <-19,19.2861,-29.2861>, <-20,20.0004,-30.0004>,
<20,20.0004,-30.0004> }
  triangle { <-20,20.0004,-30.0004>, <-19,19.2861,-29.2861>,
<-19,0.7143,-10.7143> }
  triangle { <-19,0.7143,-10.7143>, <-20,0,-10>, <-20,20.0004,-30.0004> }
  triangle { <-1,0.7143,-10.7143>, <1,0.7143,-10.7143>, <1,19.2861,-29.2861> }
  triangle { <1,19.2861,-29.2861>, <-1,19.2861,-29.2861>, <-1,0.7143,-10.7143> }
  normal { bumps 1 scale 25*0.02 }
 }
 mesh {
  triangle { <-19,0.7143,-10.7143>, <-17,2.1429,-12.1429>, <-3,2.1429,-12.1429>
}
  triangle { <-3,2.1429,-12.1429>, <-1,0.7143,-10.7143>, <-19,0.7143,-10.7143> }
  material { L3Color15 }
 }
 mesh {
  triangle { <-17,2.1429,-12.1429>, <-13.5,2.1429,-12.1429>,
<-13.5,4.64295,-14.6429> }
  triangle { <-13.5,4.64295,-14.6429>, <-17,4.64295,-14.643>,
<-17,2.1429,-12.1429> }
  triangle { <-11.75,2.1429,-12.1429>, <-8.25,2.1429,-12.1429>,
<-8.25,4.64295,-14.643> }
  triangle { <-8.25,4.64295,-14.643>, <-11.75,4.64295,-14.6429>,
<-11.75,2.1429,-12.1429> }
  triangle { <-6.5,2.1429,-12.1429>, <-3,2.1429,-12.1429>, <-3,4.64295,-14.643>
}
  triangle { <-3,4.64295,-14.643>, <-6.5,4.64295,-14.643>,
<-6.5,2.1429,-12.1429> }
  material { L3Color4 }
 }
 mesh {
  triangle { <-17,5.89297,-15.893>, <-13.5,5.89298,-15.893>,
<-13.5,8.39302,-18.393> }
  triangle { <-13.5,8.39302,-18.393>, <-17,8.39302,-18.393>,
<-17,5.89297,-15.893> }
  triangle { <-11.75,5.89297,-15.893>, <-8.25,5.89297,-15.893>,
<-8.25,8.39303,-18.393> }
  triangle { <-8.25,8.39303,-18.393>, <-11.75,8.39302,-18.393>,
<-11.75,5.89297,-15.893> }
  material { L3Color2 }
 }
 mesh {
  triangle { <-6.5,5.89297,-15.893>, <-3,5.89298,-15.893>, <-3,8.39303,-18.393>
}
  triangle { <-3,8.39303,-18.393>, <-6.5,8.39303,-18.393>,
<-6.5,5.89297,-15.893> }
  triangle { <-17.25,9.82163,-19.8216>, <-13.75,9.82163,-19.8216>,
<-13.75,12.3217,-22.3217> }
  triangle { <-13.75,12.3217,-22.3217>, <-17.25,12.3217,-22.3217>,
<-17.25,9.82163,-19.8216> }
  material { L3Color4 }
 }
 mesh {
  triangle { <-11.75,9.64305,-19.643>, <-8.25,9.64305,-19.643>,
<-8.25,12.1431,-22.1431> }
  triangle { <-8.25,12.1431,-22.1431>, <-11.75,12.1431,-22.1431>,
<-11.75,9.64305,-19.643> }
  triangle { <-6.5,9.64305,-19.643>, <-3,9.64305,-19.643>, <-3,12.1431,-22.1431>
}
  triangle { <-3,12.1431,-22.1431>, <-6.5,12.1431,-22.1431>,
<-6.5,9.64305,-19.643> }
  material { L3Color2 }
 }
 mesh {
  triangle { <-19,0.7143,-10.7143>, <-17,2.1429,-12.1429>, <-17,8.39302,-18.393>
}
  triangle { <-17,8.39302,-18.393>, <-19,12.5002,-22.5002>,
<-19,0.7143,-10.7143> }
  triangle { <-17,8.39302,-18.393>, <-17.25,9.82163,-19.8216>,
<-19,12.5002,-22.5002> }
  triangle { <-17.25,9.82163,-19.8216>, <-17.25,12.3217,-22.3217>,
<-19,12.5002,-22.5002> }
  triangle { <-19,12.5002,-22.5002>, <-17.25,12.3217,-22.3217>,
<-13.75,12.3217,-22.3217> }
  triangle { <-13.75,12.3217,-22.3217>, <-1,12.5002,-22.5002>,
<-19,12.5002,-22.5002> }
  triangle { <-1,12.5002,-22.5002>, <-13.75,12.3217,-22.3217>,
<-11.75,12.1431,-22.1431> }
  triangle { <-11.75,12.1431,-22.1431>, <-3,12.1431,-22.1431>,
<-1,12.5002,-22.5002> }
  triangle { <-1,12.5002,-22.5002>, <-3,12.1431,-22.1431>, <-3,2.1429,-12.1429>
}
  triangle { <-3,2.1429,-12.1429>, <-1,0.7143,-10.7143>, <-1,12.5002,-22.5002> }
  triangle { <-13.5,2.1429,-12.1429>, <-11.75,2.1429,-12.1429>,
<-11.75,12.1431,-22.1431> }
  triangle { <-11.75,12.1431,-22.1431>, <-13.75,12.3217,-22.3217>,
<-13.5,2.1429,-12.1429> }
  triangle { <-8.25,2.1429,-12.1429>, <-6.5,2.1429,-12.1429>,
<-6.5,12.1431,-22.1431> }
  triangle { <-6.5,12.1431,-22.1431>, <-8.25,12.1431,-22.1431>,
<-8.25,2.1429,-12.1429> }
  triangle { <-17,4.64295,-14.643>, <-3,4.64295,-14.643>, <-3,5.89298,-15.893> }
  triangle { <-3,5.89298,-15.893>, <-17,5.89297,-15.893>, <-17,4.64295,-14.643>
}
  triangle { <-17,4.64295,-14.643>, <-3,4.64295,-14.643>, <-3,5.89298,-15.893> }
  triangle { <-3,5.89298,-15.893>, <-17,5.89297,-15.893>, <-17,4.64295,-14.643>
}
  triangle { <-17,8.39302,-18.393>, <-13.5,8.39302,-18.393>,
<-13.75,9.82163,-19.8216> }
  triangle { <-13.75,9.82163,-19.8216>, <-17.25,9.82163,-19.8216>,
<-17,8.39302,-18.393> }
  triangle { <-11.75,8.39302,-18.393>, <-3,8.39303,-18.393>,
<-3,9.64305,-19.643> }
  triangle { <-3,9.64305,-19.643>, <-11.75,9.64305,-19.643>,
<-11.75,8.39302,-18.393> }
  triangle { <-19,19.2861,-29.2861>, <-17,18.5718,-28.5718>,
<-17,17.1432,-27.1432> }
  triangle { <-17,17.1432,-27.1432>, <-19,17.1432,-27.1432>,
<-19,19.2861,-29.2861> }
  triangle { <-19,19.2861,-29.2861>, <-17,18.5718,-28.5718>,
<-3,18.5718,-28.5718> }
  triangle { <-3,18.5718,-28.5718>, <-1,19.2861,-29.2861>,
<-19,19.2861,-29.2861> }
  triangle { <-1,19.2861,-29.2861>, <-3,18.5718,-28.5718>, <-3,17.1432,-27.1432>
}
  triangle { <-3,17.1432,-27.1432>, <-1,17.1432,-27.1432>, <-1,19.2861,-29.2861>
}
  material { L3Color15 }
 }
 mesh {
  triangle { <-17,17.1432,-27.1432>, <-3,17.1432,-27.1432>,
<-3,18.5718,-28.5718> }
  triangle { <-3,18.5718,-28.5718>, <-17,18.5718,-28.5718>,
<-17,17.1432,-27.1432> }
  normal { bumps 1 scale 25*0.02 }
 }
 mesh {
  triangle { <1,0.7143,-10.7143>, <19,0.7143,-10.7143>, <17.5,2.1429,-12.1429> }
  triangle { <17.5,2.1429,-12.1429>, <3,2.1429,-12.1429>, <1,0.7143,-10.7143> }
  triangle { <1,0.7143,-10.7143>, <3,2.1429,-12.1429>, <3,10.0002,-20.0002> }
  triangle { <3,10.0002,-20.0002>, <1,11.7859,-21.7859>, <1,0.7143,-10.7143> }
  triangle { <1,11.7859,-21.7859>, <3,10.0002,-20.0002>, <14,10.0002,-20.0002> }
  triangle { <14,10.0002,-20.0002>, <15.5,10.3573,-20.3573>,
<1,11.7859,-21.7859> }
  triangle { <1,11.7859,-21.7859>, <15.5,10.3573,-20.3573>,
<17.5,10.3573,-20.3573> }
  triangle { <17.5,10.3573,-20.3573>, <19,11.7859,-21.7859>,
<1,11.7859,-21.7859> }
  triangle { <19,11.7859,-21.7859>, <17.5,10.3573,-20.3573>,
<17.5,2.1429,-12.1429> }
  triangle { <17.5,2.1429,-12.1429>, <19,0.7143,-10.7143>, <19,11.7859,-21.7859>
}
  triangle { <14,2.1429,-12.1429>, <15.5,2.1429,-12.1429>,
<15.5,10.3573,-20.3573> }
  triangle { <15.5,10.3573,-20.3573>, <14,10.0002,-20.0002>,
<14,2.1429,-12.1429> }
  material { L3Color15 }
 }
 mesh {
  triangle { <15.5,2.1429,-12.1429>, <17.5,2.1429,-12.1429>,
<17.5,10.3573,-20.3573> }
  triangle { <17.5,10.3573,-20.3573>, <15.5,10.3573,-20.3573>,
<15.5,2.1429,-12.1429> }
  normal { bumps 1 scale 25*0.02 }
 }
 mesh {
  triangle { <3,2.1429,-12.1429>, <8,2.50005,-12.5>, <9,2.50005,-12.5> }
  triangle { <9,2.50005,-12.5>, <14,2.1429,-12.1429>, <3,2.1429,-12.1429> }
  triangle { <14,2.1429,-12.1429>, <13.5,5.7144,-15.7144>,
<13.5,6.4287,-16.4287> }
  triangle { <13.5,6.4287,-16.4287>, <14,10.0002,-20.0002>, <14,2.1429,-12.1429>
}
  triangle { <14,10.0002,-20.0002>, <9,9.64305,-19.643>, <8,9.64305,-19.643> }
  triangle { <8,9.64305,-19.643>, <3,10.0002,-20.0002>, <14,10.0002,-20.0002> }
  triangle { <3,10.0002,-20.0002>, <3.5,6.4287,-16.4287>, <3.5,5.7144,-15.7144>
}
  triangle { <3.5,5.7144,-15.7144>, <3,2.1429,-12.1429>, <3,10.0002,-20.0002> }
  triangle { <3,2.1429,-12.1429>, <3.5,5.7144,-15.7144>, <8,5.7144,-15.7144> }
  triangle { <8,5.7144,-15.7144>, <8,2.50005,-12.5>, <3,2.1429,-12.1429> }
  triangle { <14,2.1429,-12.1429>, <9,2.50005,-12.5>, <9,5.7144,-15.7144> }
  triangle { <9,5.7144,-15.7144>, <13.5,5.7144,-15.7144>, <14,2.1429,-12.1429> }
  triangle { <14,10.0002,-20.0002>, <13.5,6.4287,-16.4287>, <9,6.4287,-16.4287>
}
  triangle { <9,6.4287,-16.4287>, <9,9.64305,-19.643>, <14,10.0002,-20.0002> }
  triangle { <3,10.0002,-20.0002>, <8,9.64305,-19.643>, <8,6.4287,-16.4287> }
  triangle { <8,6.4287,-16.4287>, <3.5,6.4287,-16.4287>, <3,10.0002,-20.0002> }
  material { L3Color2 }
 }
 mesh {
  triangle { <3.5,5.7144,-15.7144>, <13.5,5.7144,-15.7144>,
<13.5,6.4287,-16.4287> }
  triangle { <13.5,6.4287,-16.4287>, <3.5,6.4287,-16.4287>,
<3.5,5.7144,-15.7144> }
  triangle { <9,2.50005,-12.5>, <9,9.64305,-19.643>, <8,9.64305,-19.643> }
  triangle { <8,9.64305,-19.643>, <8,2.50005,-12.5>, <9,2.50005,-12.5> }
  material { L3Color15 }
 }
// 3039-4t Slope Brick 45  2 x  2 without sloped front


 #if (L3Studs)
  object { stud4a_dot_dat matrix <1,0,0,0,-1,0,0,0,1,0,20,-10> }
 #end
 object { _1_dash_4cyls_dot_dat matrix <0,0,-6,0,-6,0,6,0,0,0,10,-10> }
 object { _1_dash_4cyls_dot_dat matrix <0,0,-6,0,-6,0,-6,0,0,0,10,-10> }
 object { _2_dash_4cyli_dot_dat matrix <6,0,0,0,16,0,0,0,6,0,4,-10> }
 object { _2_dash_4cyli_dot_dat matrix <6,0,0,0,10,0,0,0,-6,0,10,-10> }
 object { _1_dash_4cyls_dot_dat matrix <0,0,-8,0,-8,0,8,0,0,0,12,-10> }
 object { _1_dash_4cyls_dot_dat matrix <0,0,-8,0,-8,0,-8,0,0,0,20,-10> }
 object { _2_dash_4cyli_dot_dat matrix <8,0,0,0,16,0,0,0,8,0,4,-10> }
 object { _2_dash_4cyli_dot_dat matrix <8,0,0,0,8,0,0,0,-8,0,12,-10> }
 mesh {
  triangle { <20,24,10>, <16,24,6>, <-16,24,6> }
  triangle { <-16,24,6>, <-20,24,10>, <20,24,10> }
  triangle { <-20,24,10>, <-16,24,6>, <-16,24,-26> }
  triangle { <-16,24,-26>, <-20,24,-30>, <-20,24,10> }
  triangle { <-20,24,-30>, <-16,24,-26>, <16,24,-26> }
  triangle { <16,24,-26>, <20,24,-30>, <-20,24,-30> }
  triangle { <20,24,-30>, <16,24,-26>, <16,24,6> }
  triangle { <16,24,6>, <20,24,10>, <20,24,-30> }
  triangle { <16,4,6>, <16,4,-10>, <-16,4,-10> }
  triangle { <-16,4,-10>, <-16,4,6>, <16,4,6> }
  triangle { <20,0,10>, <20,0,-10>, <-20,0,-10> }
  triangle { <-20,0,-10>, <-20,0,10>, <20,0,10> }
  triangle { <20,24,10>, <20,0,10>, <-20,0,10> }
  triangle { <-20,0,10>, <-20,24,10>, <20,24,10> }
  triangle { <16,24,6>, <16,4,6>, <-16,4,6> }
  triangle { <-16,4,6>, <-16,24,6>, <16,24,6> }
  triangle { <16,24,-26>, <16,20,-26>, <-16,20,-26> }
  triangle { <-16,20,-26>, <-16,24,-26>, <16,24,-26> }
  triangle { <20,24,-30>, <20,20,-30>, <-20,20,-30> }
  triangle { <-20,20,-30>, <-20,24,-30>, <20,24,-30> }
  triangle { <20,24,10>, <20,0,10>, <20,20,-30> }
  triangle { <20,20,-30>, <20,24,-30>, <20,24,10> }
  triangle { <20,0,10>, <20,0,-10>, <20,20,-30> }
  triangle { <16,24,6>, <16,4,6>, <16,20,-26> }
  triangle { <16,20,-26>, <16,24,-26>, <16,24,6> }
  triangle { <16,4,6>, <16,4,-10>, <16,20,-26> }
  triangle { <-16,24,6>, <-16,4,6>, <-16,20,-26> }
  triangle { <-16,20,-26>, <-16,24,-26>, <-16,24,6> }
  triangle { <-16,4,6>, <-16,4,-10>, <-16,20,-26> }
  triangle { <-20,24,10>, <-20,0,10>, <-20,20,-30> }
  triangle { <-20,20,-30>, <-20,24,-30>, <-20,24,10> }
  triangle { <-20,0,10>, <-20,0,-10>, <-20,20,-30> }
  triangle { <16,20,-26>, <16,4,-10>, <-16,4,-10> }
  triangle { <-16,4,-10>, <-16,20,-26>, <16,20,-26> }
 }
 #if (L3Studs)
  object { stud_dot_dat matrix <1,0,0,0,1,0,0,0,1,-10,0,0> }
  object { stud_dot_dat matrix <1,0,0,0,1,0,0,0,1,10,0,0> }
// /3039-4t Slope Brick 45  2 x  2 without sloped front
 #end
}
#end
#end // ifndef (_3039p34_dot_dat)


//// Model Untitled.ldr
#ifndef (Untitled_dot_ldr)
#declare Untitled_dot_ldr = object {
// Untitled
// Name: Untitled.ldr
// Author: Darats
// Unofficial Model
// ROTATION CENTER 0 0 0 1 "Custom"
// ROTATION CONFIG 0 0
 // 1 7  -60 0 30  1 0 0  0 1 0  0 0 1 3039p34.dat
 object {
  _3039p34_dot_dat
  matrix
<1-L3SW/40,0,0,0,1-L3SW/28,0,0,0,1-L3SW/40.0004,0,L3SW/2.8,L3SW/-3.99996>
  matrix <1,0,0,0,1,0,0,0,1,-60,0,30>
  material { L3Color7 }
 }
}
#end // ifndef (Untitled_dot_ldr)


So, it works like this : the object _3039p34_dot_dat is declared firstly. There
is some meshes declared with colors and some others not. Then a "global" object
is declared with the _3039p34_dot_dat and its scale and the place it has to be.
So, the global color of the _3039p34_dot_dat is set at the end (within the
declaration of the global object).
So normally it will set every mesh to the color : L3Color7 but those that
alrealdy have a color definition in the first declaration.


What I want is : for every mesh (in the first declaration) that have "normal {
bumps 1 scale 25*0.02 }" is to have an uncolored bumped surface and then use the
L3Color7 keeping the bumps.

The probleme is that I can only edit the first declaration, not the global one
at the end.

Hope it is clearer now.

Thanks.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Problem making a bumpy surface
Date: 5 Mar 2010 18:03:35
Message: <4b918dc7@news.povray.org>
Darats wrote:

> What I want is : for every mesh (in the first declaration) that have "normal {
> bumps 1 scale 25*0.02 }" is to have an uncolored bumped surface and then use the
> L3Color7 keeping the bumps.

Unfortunately, it doesn't work this way. What you can do however
is to find the definition of L3Color7, which might be defined as
something like

material
{
   texture  {pigment{P3Color7}}
   interior {I3Color7}
}

Then, for those meshes which should have a normal, you could
explicitely write mesh {... pigment {P3Color7} normal {...}}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.