POV-Ray : Newsgroups : povray.pov4.discussion.general : Feature Re-requests - Normal Map and Displacement Map Support Server Time
22 Dec 2024 02:09:33 EST (-0500)
  Feature Re-requests - Normal Map and Displacement Map Support (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Kyle
Subject: Feature Re-requests - Normal Map and Displacement Map Support
Date: 1 Feb 2008 23:23:36
Message: <8rr7q3h9cj7v2p91bodbk0he8958jbma97@4ax.com>
Please refer to the following thread...

http://news.povray.org/povray.general/thread/%3Cv4pqj217fg814vqilvmdgf2v3ri3i8qj77%404ax.com%3E/


Post a reply to this message

From: Warp
Subject: Re: Feature Re-requests - Normal Map and Displacement Map Support
Date: 2 Feb 2008 04:13:48
Message: <47a4344b@news.povray.org>
Kyle <hob### [at] gatenet> wrote:
> Please refer to the following thread...

>
http://news.povray.org/povray.general/thread/%3Cv4pqj217fg814vqilvmdgf2v3ri3i8qj77%404ax.com%3E/

  I repeat my answer here:

  You are free to propose a solution to that. Preferably in C++.

  Displacement mapping is used in scanline renderers because it's
feasible there. They use triangle meshes (or easily tesselable surfaces
such as NURBS) which can be easily subdivided and displaced even on
the fly.

  You want it to be done with *any* object in POV-Ray. Well, feel
free to suggest how it could be done.

-- 
                                                          - Warp


Post a reply to this message

From: nemesis
Subject: Re: Feature Re-requests - Normal Map and Displacement Map Support
Date: 2 Feb 2008 06:55:00
Message: <web.47a4595486739be92120b4440@news.povray.org>
Kyle <hob### [at] gatenet> wrote:
> Please refer to the following thread...
>
>
http://news.povray.org/povray.general/thread/%3Cv4pqj217fg814vqilvmdgf2v3ri3i8qj77%404ax.com%3E/

I like this Patrick Elliott quote:
"Its not always possible to argue successfully for solution that make things
easier to do in 'specific' cases, when there is a perception of a more
physically 'correct' model already in the engine, and it just happens to
be complicated, frustrating and confusing to get the same result with it
(like subsurface scattering effects, for example)."

I wonder, when povray goes open-source it could probably benefit from using
libraries or code from projects such as Blender to handle displacements,
tesselation or decimate.  I'm not sure it'd be of any help for a raytracer, but
OTOH, Blender uses an internal renderer which seems to mix a scanline with a
raytracer...

BTW, speaking of requests, perhaps it should be useful to allow for the simple
geometric shapes to be treated as isosurfaces in syntax.  So, the parser would
interpret these two in different ways:

sphere { 0, 1 } <-- basic optimized quadratic shape
sphere { 0, 1 displacement { crackle .2 turbulence .06 } }  <-- isosurface
sphere shape displaced by pattern

or even:

union {
  sphere { x/2, 1 }
  box { -1,1 translate -x/2 }
  glue_level .2
  displacement { granite .04 }
} <-- the whole union is an isosurface of the shapes above glued together by 20%
and displaced by pattern

you know, kinda like supporting Chris Hormann' excellent IsoCSG macro lib
directly in syntax.  It's much easier for non-math folks to work on shapes and
transforms rather than functions and function composition.  I always though of
povray's isosurfaces as povray's NURBS... :)


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Feature Re-requests - Normal Map and Displacement Map Support
Date: 2 Feb 2008 08:40:18
Message: <47a472c2@news.povray.org>

> BTW, speaking of requests, perhaps it should be useful to allow for the simple
> geometric shapes to be treated as isosurfaces in syntax.

I'd like to have some way to get an isosurface function from primitives 
(including complex CSG). That way we could easily make a complex object 
using the normal syntax (instead of something like isoCSG), and then use 
it inside a isosurface function.

In the C++ code, each object would have 'trace ray', 'is point inside 
shape', etc. and a new 'get isosurface function'. Of course it would be 
impossible or very hard to implement for some objects (like text or 
julia_fractal).

#declare SomeShape = difference {
     sphere { <0,0,0>, 1 }
     cylinder { -x*2, x*2, 0.5 }
}
isosurface {
     function { object_function(SomeShape, x-0.5, z, y)*(1-clock) + 
object_function(SomeShape, x+0.5, y, z)*clock }
     ...
}

Of course you could also use:

#declare Fn = object_function(SomeShape, x, y, z);
isosurface {
     function { Fn(x-0.5, z, y)*(1-clock) + Fn(x+0.5, y, z)*clock }
     ...
}

Which is shorter code.

Producing:
http://stuff.povaddict.com.ar/pov/iso.avi (XviD)


Post a reply to this message

From: nemesis
Subject: Re: Feature Re-requests - Normal Map and Displacement Map Support
Date: 2 Feb 2008 09:25:00
Message: <web.47a47caa86739be92120b4440@news.povray.org>
Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:
> I'd like to have some way to get an isosurface function from primitives
> (including complex CSG).

that would be nice too!

> #declare Fn = object_function(SomeShape, x, y, z);
> isosurface {
>      function { Fn(x-0.5, z, y)*(1-clock) + Fn(x+0.5, y, z)*clock }
>      ...
> }

the funny thing is:  the object pattern doesn't work as an isosurface function.
Bummer...


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Feature Re-requests - Normal Map and Displacement Map Support
Date: 2 Feb 2008 10:03:22
Message: <47a4863a@news.povray.org>

> Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:
>> #declare Fn = object_function(SomeShape, x, y, z);
>> isosurface {
>>      function { Fn(x-0.5, z, y)*(1-clock) + Fn(x+0.5, y, z)*clock }
>>      ...
>> }
> 
> the funny thing is:  the object pattern doesn't work as an isosurface function.
> Bummer...

The object pattern only calculates if some point is inside the object or 
not. You need more than that for isosurfaces to work; which is what I'm 
suggesting :)


Post a reply to this message

From: Warp
Subject: Re: Feature Re-requests - Normal Map and Displacement Map Support
Date: 2 Feb 2008 11:34:21
Message: <47a49b8d@news.povray.org>
Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:
> In the C++ code, each object would have 'trace ray', 'is point inside 
> shape', etc. and a new 'get isosurface function'. Of course it would be 
> impossible or very hard to implement for some objects (like text or 
> julia_fractal).

  The C++ core code should go towards a simpler, not a more complicated
design.

  What's wrong in having all those functions for every primitive as a
simple library of functions?

-- 
                                                          - Warp


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Feature Re-requests - Normal Map and Displacement Map Support
Date: 2 Feb 2008 13:42:36
Message: <47a4b99c$1@news.povray.org>
Warp escribió:
> Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:
>> In the C++ code, each object would have 'trace ray', 'is point inside 
>> shape', etc. and a new 'get isosurface function'. Of course it would be 
>> impossible or very hard to implement for some objects (like text or 
>> julia_fractal).
> 
>   The C++ core code should go towards a simpler, not a more complicated
> design.
> 
>   What's wrong in having all those functions for every primitive as a
> simple library of functions?
> 

I want the *same* syntax on the SDL to be used as a normal object or as 
an isosurface function. Have you seen the IsoCSG library? You need to 
rewrite all your objects to use it.

I want to grab a complex CSG object, and use it in an isosurface without 
having to rewrite it in another format. Can you do that with "a simple 
library of functions"?


Post a reply to this message

From: Warp
Subject: Re: Feature Re-requests - Normal Map and Displacement Map Support
Date: 2 Feb 2008 18:59:28
Message: <47a503e0@news.povray.org>
Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:
> I want to grab a complex CSG object, and use it in an isosurface without 
> having to rewrite it in another format. Can you do that with "a simple 
> library of functions"?

  With pov4's new scripting language, maybe.

-- 
                                                          - Warp


Post a reply to this message

From: Kyle
Subject: Re: Feature Re-requests - Normal Map and Displacement Map Support
Date: 4 Feb 2008 11:12:43
Message: <oqdeq3hpvr3hamagac2e2r2nvs5ftpadlf@4ax.com>
On 2 Feb 2008 04:13:48 -0500, Warp <war### [at] tagpovrayorg> wrote:


>  You are free to propose a solution to that. Preferably in C++.

I would be happy to do so, if I were more knowledgeable in such matters.  I imagine
someone that is more familiar with raytracing technologies than I may be able to
present a solution.  All I can do
at this time is request the feature.

Perhaps when the 3.7 source code is released, an eager programmer may wish to tackle
such an endeavor.


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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