POV-Ray : Newsgroups : povray.general : 3D Glass-like block and problem with inner faces Server Time
24 Dec 2024 08:16:53 EST (-0500)
  3D Glass-like block and problem with inner faces (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: Saman
Subject: 3D Glass-like block and problem with inner faces
Date: 21 Nov 2014 04:40:05
Message: <web.546f077ea1efff3d4a99f14a0@news.povray.org>
Dear friends,

I'm beginner in POV-Ray and I have a little problem with rendering my scene.
I have just one object in my scene, which is a 3D block.
The block is made by several 3D adjacent boxes and each box is made by 8
vertices and six faces (or 12 triangles, 2 per face).

The whole block is a "Mesh2" type object (just one), in which I have defined a
vertex vectors for all the vertices and the face_indices for the triangles.

            mesh2 {
                  vertex_vectors {
                                  80,
                                  <0,0,0>, <0.5,0,0>, <0.5,0.5,0>
                                  ...
                                 }
                  face_indices {
                                120,
                                <0,1,2>
                                ...
                               }


In short, I have a 3D block made by several triangles.

For rendering, I have also applied a transparent color to my object, as I wish
to be able to see the depth of my bock (like an glass block).

The problem is that the whole block do not appear as "one" object as I wish and
we  see unfortunately all the inner faces in the block and I don't have the
glass-like effect.

I have also tried to do a "Merge", but it didn't work. I think it's because I
have defined just one object ( a "Mesh2" one).

Do you have any idea how to solve this problem?

Thank you all in advance

P.S. I have POV-Ray version 3.6.


Post a reply to this message

From: Thomas de Groot
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 21 Nov 2014 07:32:29
Message: <546f30dd$1@news.povray.org>
Not sure what your problem is, but I guess it is the texture you use. 
Have you tried the glass materials in textures.inc? For instance try 
this for your cube, after including the textures file:

#include "textures.inc"

material {M_Yellow_Glass}

That should do the trick. Glass has a different ior from air which is 1. 
That is why you need to define a material with a glass ior=1.5.

Have a look at the Docs about the use of materials 
http://www.povray.org/documentation/3.7.0/r3_4.html#r3_4_5_5_3

Also, you should switch to version 3.7 which is the latest and best 
version to date as many issues still present in version 3.6 has been 
corrected, and many new features added.

To better explain your problems, post an image on 
povray.binaries.images. That may help us a lot to determine how to 
improve your scene.

Welcome, by the way, to this community.

Thomas

Thomas


Post a reply to this message

From: Stephen
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 21 Nov 2014 08:43:14
Message: <546f4172$1@news.povray.org>
On 21/11/2014 09:35, Saman wrote:
> Dear friends,
>
> I'm beginner in POV-Ray and I have a little problem with rendering my scene.
> I have just one object in my scene, which is a 3D block.
> The block is made by several 3D adjacent boxes and each box is made by 8
> vertices and six faces (or 12 triangles, 2 per face).
>

[Snip]

> The problem is that the whole block do not appear as "one" object as I wish and
> we  see unfortunately all the inner faces in the block and I don't have the
> glass-like effect.
>
> I have also tried to do a "Merge", but it didn't work. I think it's because I
> have defined just one object ( a "Mesh2" one).
>
> Do you have any idea how to solve this problem?
>

Hi Saman and welcome.


My reading of the first two sentences is that you have lots of blocks in 
the shape of a block. So what you are seeing is correct.
I always try to visualise what it would look like in reality.
You would need to build your big block with squares if what I think you 
want is right.
But as Thomas said post an image.



-- 

Regards
     Stephen


Post a reply to this message

From: Saman
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 26 Nov 2014 07:40:00
Message: <web.5475c964569da8754a99f14a0@news.povray.org>
Thanks for the answers, here is the link of my scene:

https://www.dropbox.com/s/au2t9g5l7btmhqu/Block3D.png?dl=0

As you can see, some faces are shared between two cubes.
The whole block is defined by one "mesh2" object, in which I have defined
several triangles to make a cube. The whole block is made of these cubes.
The problem is, that I have a transparent block and I would like these inner
faces do not appear. I have also tried to apply the "merge" function to my whole
block but it didn't work.

I'm looking forward to read you.


Post a reply to this message

From: Saman
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 26 Nov 2014 07:40:01
Message: <web.5475c9bd569da8754a99f14a0@news.povray.org>
Thanks for the answers, here is the link of my scene:

https://www.dropbox.com/s/au2t9g5l7btmhqu/Block3D.png?dl=0

As you can see, some faces are shared between two cubes.
The whole block is defined by one "mesh2" object, in which I have defined
several triangles to make a cube. The whole block is made of these cubes.
The problem is, that I have a transparent block and I would like these inner
faces do not appear. I have also tried to apply the "merge" function to my whole
block but it didn't work.

I'm looking forward to read you.


Post a reply to this message

From: Thomas de Groot
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 26 Nov 2014 07:58:18
Message: <5475ce6a$1@news.povray.org>
On 26-11-2014 13:38, Saman wrote:
> Thanks for the answers, here is the link of my scene:
>
> https://www.dropbox.com/s/au2t9g5l7btmhqu/Block3D.png?dl=0
>
> As you can see, some faces are shared between two cubes.
> The whole block is defined by one "mesh2" object, in which I have defined
> several triangles to make a cube. The whole block is made of these cubes.
> The problem is, that I have a transparent block and I would like these inner
> faces do not appear. I have also tried to apply the "merge" function to my whole
> block but it didn't work.
>
> I'm looking forward to read you.
>
>
>

The image is a bit small to see clearly with my old eyes. :-) Please 
make a 640x640 pixel image (for instance) and post it at p.b.i.

First, can you tell us how you obtained the mesh2 object? Did you write 
the triangles yourself or did you make an object first using an external 
modeller? This info might be important to find a solution.

Note that mesh2 has been specifically designed for conversion from other 
formats, not for direct building.

Second, have you tried to load your mesh2 file into Poseray? That might 
help to see how the triangles behave and if all common vertexes for 
instance are merged.

Thomas


Post a reply to this message

From: Saman
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 26 Nov 2014 08:25:01
Message: <web.5475d402569da8754a99f14a0@news.povray.org>
Here is a very simple example with just two cubes which share a common face:

Link to the image:
https://www.dropbox.com/s/rfkcvxlerko3qmw/Mesh2%28merged%29.png?dl=0

I have used the "merge" function to merge the two cubes, but as you can see,
the shared inner face still appears.

I have defined two cubes as follow:

//POV-Ray

#include "colors.inc"
#include "textures.inc"


background { color rgb < 0.8945, 0.8945, 0.8945 > }

camera { location <20, 5, -20>   look_at  <5, 5,  5> }

light_source { <100, 0, 0> color White}


merge{

  mesh2{ //Box 1
 vertex_vectors {
  8,
  <0,0,0>, <5,0,0>, <0,5,0>, <5,5,0>,
  <0,0,5>, <5,0,5>, <0,5,5>, <5,5,5>,
 }
 face_indices{
  12,
  <0,1,2>, <1,2,3>,
  <4,5,6>, <5,6,7>,
  <0,2,4>, <6,2,4>,
  <1,3,5>, <7,3,5>,
  <0,1,4>, <5,1,4>,
  <2,6,3>, <7,6,3>,
 }
    texture { pigment {color Black transmit 0.9} finish {phong .8} }
  }

  mesh2{ //Box 2
 vertex_vectors {
  8,
  <5,0,0>, <10,0,0>, <5,5,0>, <10,5,0>,
  <5,0,5>, <10,0,5>, <5,5,5>, <10,5,5>,
 }
 face_indices{
  12,
  <0,1,2>, <1,2,3>,
  <4,5,6>, <5,6,7>,
  <0,2,4>, <6,2,4>,
  <1,3,5>, <7,3,5>,
  <0,1,4>, <5,1,4>,
  <2,6,3>, <7,6,3>,
 }
    texture { pigment {color Black transmit 0.9} finish {phong .8} }
  }

}


Post a reply to this message

From: Stephen
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 26 Nov 2014 08:57:10
Message: <5475dc36$1@news.povray.org>
On 26/11/2014 13:22, Saman wrote:
> I have used the "merge" function to merge the two cubes, but as you can see,
> the shared inner face still appears.

That is because the face *is* there. You can reduce the impact by making 
the material less reflective. (Also make sure that the max trace level 
is greater than the number of faces that the rays trace).

Think of building your big block with real small glass blocks. You will 
see the insides in Real Life. It is the same with Povray

The only way to get what you want is to do a difference of the big block 
and a scaled (0.999) copy of itself.

#declare CSG1 =
difference {
object{ Big_Block}

object {
Big_Block
scale     <0.999,0.999,0.999>
}

texture{ Glass0 }
}
-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 26 Nov 2014 09:03:23
Message: <5475ddab$1@news.povray.org>
On 26/11/2014 12:38, Saman wrote:
> Thanks for the answers, here is the link of my scene:
>
> https://www.dropbox.com/s/au2t9g5l7btmhqu/Block3D.png?dl=0
>

On second thoughts I think that this is a max_trace_level.
What have you set it to in Global Settings?


-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: 3D Glass-like block and problem with inner faces
Date: 26 Nov 2014 11:05:01
Message: <web.5475fa06569da8755e7df57c0@news.povray.org>
Window glass and max trace level tutorial:

http://www.f-lohmueller.de/pov_tut/interior/interior_03e.htm


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

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