POV-Ray : Newsgroups : povray.advanced-users : Rendering cylindrical textures? Server Time
8 Jul 2024 19:54:30 EDT (-0400)
  Rendering cylindrical textures? (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Tim Nikias
Subject: Rendering cylindrical textures?
Date: 10 Nov 2006 13:21:18
Message: <4554c31e@news.povray.org>
I've got a fairly elaborate problem in my project that I'm working on 
with a couple of co-students at the university. We're digitally 
reconstructing a castle and have a few towers with cone-tipped roofs or 
even onion-shaped (looking much like those arabic and/or indian 
tower-roofs)...

Anyways, I've got a rectangular, tileable slate roof texture, and my 
idea was to create a bunch of single shingles, map them onto prisms or 
triangles/quads, and write a script which'll follow the shape of the 
roofs, place an appropriate amount of shingles based on the 
circumferance, move on to the next row... Until the roof is finished. 
I'd then render a top-view of the result and project that back onto the 
original cone.

This will work fine for those towers that actually have a cone as a 
roof, those that have onions will have a projection problem on places 
where the roof is nearly vertical. I began wondering if it might be 
possible to render a cylindrical view of the towers, but not from the 
inside out, instead, from the outside (a certain distance) towards the 
center. I thus would get a cylindrical texture I can map back onto the 
onion shape with little less stretching issues...

Anyone have a clue about how I might achieve that with POV-Ray (just 
rendering that cylindrical view, everything else I can pretty much 
script myself)? I'm dimly remembering that there was once a patched 
POV-Ray which would allow functions as input for the camera, I'm 
wondering if I'd need that (and if anyone has a suitable function 
already at hand, I'm not that good with those)...

Regards,
Tim

PS: Just re-reading this post for errors and misspelling, I was 
wondering if I could use the basic cylindrical rendering POV-Ray 
provides, but simply switch the roof-tiles to no_image, place a 
reflecting cylinder outside the roof, and thus, render the reflection 
*as if* I was looking from the outside... Hm, worth a shot, at least...

-- 
aka "Tim Nikias"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Alain
Subject: Re: Rendering cylindrical textures?
Date: 10 Nov 2006 16:20:07
Message: <4554ed07@news.povray.org>
Tim Nikias nous apporta ses lumieres en ce 10/11/2006 13:21:
> I've got a fairly elaborate problem in my project that I'm working on 
> with a couple of co-students at the university. We're digitally 
> reconstructing a castle and have a few towers with cone-tipped roofs or 
> even onion-shaped (looking much like those arabic and/or indian 
> tower-roofs)...

> Anyways, I've got a rectangular, tileable slate roof texture, and my 
> idea was to create a bunch of single shingles, map them onto prisms or 
> triangles/quads, and write a script which'll follow the shape of the 
> roofs, place an appropriate amount of shingles based on the 
> circumferance, move on to the next row... Until the roof is finished. 
> I'd then render a top-view of the result and project that back onto the 
> original cone.
Why that extra step? Your script can place your individual shingles/tiles 
directly onto your roofs.

> This will work fine for those towers that actually have a cone as a 
> roof, those that have onions will have a projection problem on places 
> where the roof is nearly vertical. I began wondering if it might be 
> possible to render a cylindrical view of the towers, but not from the 
> inside out, instead, from the outside (a certain distance) towards the 
> center. I thus would get a cylindrical texture I can map back onto the 
> onion shape with little less stretching issues...

> Anyone have a clue about how I might achieve that with POV-Ray (just 
> rendering that cylindrical view, everything else I can pretty much 
> script myself)? I'm dimly remembering that there was once a patched 
> POV-Ray which would allow functions as input for the camera, I'm 
> wondering if I'd need that (and if anyone has a suitable function 
> already at hand, I'm not that good with those)...

> Regards,
> Tim

> PS: Just re-reading this post for errors and misspelling, I was 
> wondering if I could use the basic cylindrical rendering POV-Ray 
> provides, but simply switch the roof-tiles to no_image, place a 
> reflecting cylinder outside the roof, and thus, render the reflection 
> *as if* I was looking from the outside... Hm, worth a shot, at least...

Did you try cylindrical warp? spherical warp?
You also can use trace to place your tiles on the conical and onion shaped roofs 
  and do away with texture maping.

-- 
Alain
-------------------------------------------------
Don't take life too seriously, you won't get out alive.


Post a reply to this message

From: Tim Nikias
Subject: Re: Rendering cylindrical textures?
Date: 10 Nov 2006 18:06:56
Message: <45550610@news.povray.org>
Alain wrote:
> Did you try cylindrical warp? spherical warp?

That's more or less what I was getting at with the uv-mapping. Let's 
just say the texture has 20 tiles along the x-axis. There'd be 20 tiny 
tiles at the top of the cone, and 20 large tiles at the bottom. But 
tiles are usually about the same size, so I can't use a warp to stretch 
the texture to fit the cone.

> You also can use trace to place your tiles on the conical and onion 
> shaped roofs  and do away with texture maping.

That's what I was aiming at: scripting the placement of tiles, but 
*then* I need to rebake that into a texture to apply it to a polygon 
model...

I guess I forgot to mention in my original post that the castle is 
modelled in Maya and will be rendered with Mental Ray, and the PCs we 
have for the task are barely able to load the scene as it is, I can't 
throw another couple thousand poly's in there just for a few tiles. 
Thus, I want to create the roof with script in POV-Ray, and render the 
resulting placement of tiles to an image I can use as a texture to 
project onto the polygons in Maya. A little complicated and probably 
somehow possible within Maya, but I've been getting fed up with the 
"professional" standard-crashing piece of software that I'd rather turn 
to a rock-solid freeware raytracer to do the task painlessly. :-)

Regards,
Tim


-- 
aka "Tim Nikias"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Alain
Subject: Re: Rendering cylindrical textures?
Date: 10 Nov 2006 18:47:30
Message: <45550f92$1@news.povray.org>
Tim Nikias nous apporta ses lumieres en ce 10/11/2006 18:06:
> Alain wrote:
>> Did you try cylindrical warp? spherical warp?

> That's more or less what I was getting at with the uv-mapping. Let's 
> just say the texture has 20 tiles along the x-axis. There'd be 20 tiny 
> tiles at the top of the cone, and 20 large tiles at the bottom. But 
> tiles are usually about the same size, so I can't use a warp to stretch 
> the texture to fit the cone.

>> You also can use trace to place your tiles on the conical and onion 
>> shaped roofs  and do away with texture maping.

> That's what I was aiming at: scripting the placement of tiles, but 
> *then* I need to rebake that into a texture to apply it to a polygon 
> model...

> I guess I forgot to mention in my original post that the castle is 
> modelled in Maya and will be rendered with Mental Ray, and the PCs we 
> have for the task are barely able to load the scene as it is, I can't 
> throw another couple thousand poly's in there just for a few tiles. 
> Thus, I want to create the roof with script in POV-Ray, and render the 
> resulting placement of tiles to an image I can use as a texture to 
> project onto the polygons in Maya. A little complicated and probably 
> somehow possible within Maya, but I've been getting fed up with the 
> "professional" standard-crashing piece of software that I'd rather turn 
> to a rock-solid freeware raytracer to do the task painlessly. :-)

> Regards,
> Tim


You can create shingles with as few as 4 polys: a square for the top and front 
and 2 triangles for the edges, or using a mesh of 6 triangles. It's possible as 
you never see the under side. In  POV-Ray, a mesh is only referenced, so it only 
takes a minimal amount of memory to have even 1000000 instances.

-- 
Alain
-------------------------------------------------
Church of SubGenius: BoB shits.


Post a reply to this message

From: Tim Nikias
Subject: Re: Rendering cylindrical textures?
Date: 11 Nov 2006 02:47:31
Message: <45558013@news.povray.org>
Alain wrote:
> You can create shingles with as few as 4 polys: a square for the top and 
> front and 2 triangles for the edges, or using a mesh of 6 triangles. 
> It's possible as you never see the under side. In  POV-Ray, a mesh is 
> only referenced, so it only takes a minimal amount of memory to have 
> even 1000000 instances.

Ahem, I know all that. I'm using Autodesk's Maya 8 for everything, I 
just want to create a texture for the roofs made up of a couple dozen 
polys, instead of thousands. And Maya is such a PITA that I don't want 
to clutter the scene with hundreds of instances of a small mesh. Thus, I 
want to render a texture.
Think of it as a 3D-Game-Engine-Object, you don't want to place 
thousands of small objects into a game just for a roof.

Regards,
Tim

-- 
aka "Tim Nikias"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Alain
Subject: Re: Rendering cylindrical textures?
Date: 11 Nov 2006 10:40:35
Message: <4555eef3$1@news.povray.org>
Tim Nikias nous apporta ses lumieres en ce 11/11/2006 02:47:
> Alain wrote:
>> You can create shingles with as few as 4 polys: a square for the top 
>> and front and 2 triangles for the edges, or using a mesh of 6 
>> triangles. It's possible as you never see the under side. In  POV-Ray, 
>> a mesh is only referenced, so it only takes a minimal amount of memory 
>> to have even 1000000 instances.

> Ahem, I know all that. I'm using Autodesk's Maya 8 for everything, I 
> just want to create a texture for the roofs made up of a couple dozen 
> polys, instead of thousands. And Maya is such a PITA that I don't want 
> to clutter the scene with hundreds of instances of a small mesh. Thus, I 
> want to render a texture.
> Think of it as a 3D-Game-Engine-Object, you don't want to place 
> thousands of small objects into a game just for a roof.

> Regards,
> Tim

If all you want is maya oriented tips, then you are in the wrong group.
One thing that you can do, is to model in maya, then export and render in 
POV-Ray. Take a look at poseray, it can convert many formats into POV format.

-- 
Alain
-------------------------------------------------
There will always be beer cans rolling on the floor of your car when the boss 
asks for a ride home from the office.


Post a reply to this message

From: Tim Nikias
Subject: Re: Rendering cylindrical textures?
Date: 11 Nov 2006 11:19:04
Message: <4555f7f8$1@news.povray.org>
Alain wrote:
> If all you want is maya oriented tips, then you are in the wrong group.

Hehe, see below. :-)

> One thing that you can do, is to model in maya, then export and render 
> in POV-Ray. Take a look at poseray, it can convert many formats into POV 
> format.

I figured it out, and I'll explain it. I guess you've been 
misunderstanding me all the time, or I was writing cryptic...

I export the roof-mesh to POV-Ray and then use a script to place 
shingles onto it, placing hundreds of them and thus get a nice, slated 
roof - all inside POV-Ray.

I put the camera inside the roof, viewing outwards, and set all tiles to 
no_image. There's a large cylinder around the roof, which does nothing 
else than reflecting.
Thus, when my cylindrical camera looks outward, I see the roof as if 
from the outside (no_image-Objects show up in reflections). The 
resulting render I can use for a cylindrical mapping inside Maya.

My problem was to set the camera to cylindrical and ensuring that I see 
all 360 degrees around me, otherwise the texture wouldn't line up at the 
seams.

Basically, I was after rendering a cylindrical texture to map onto the 
roof, how to model everything wasn't the issue. Guess I went about 
explaining it the wrong way round. :-) Hope I didn't annoy you too much.

Regards,
Tim



-- 
aka "Tim Nikias"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Rendering cylindrical textures?
Date: 11 Nov 2006 12:38:13
Message: <45560a85$1@news.povray.org>
Alain wrote:
> If all you want is maya oriented tips, then you are in the wrong group.
> One thing that you can do, is to model in maya, then export and render
> in POV-Ray. Take a look at poseray, it can convert many formats into POV
> format.

FYI, Tim has been around for many years, he is not a new users of POV-Ray ;-)

	Thorsten


Post a reply to this message

From: Mark Weyer
Subject: Re: Rendering cylindrical textures?
Date: 14 Nov 2006 07:05:00
Message: <web.4559b0b0a29b5ffcfddaa4670@news.povray.org>
>                                    I began wondering if it might be
> possible to render a cylindrical view of the towers, but not from the
> inside out, instead, from the outside (a certain distance) towards the
> center.

I see that you already solved your problem, so just for the record:

I once had the same need. My first solution was to patch povray. Then I
came up with the following more portable one: Use a cylindrical camera,
shift it along the axis of rotation away from the object and use two
conical (with height=radius) mirrors to bring the rays of vision back to
the object.


Post a reply to this message

From: Tim Nikias
Subject: Re: Rendering cylindrical textures?
Date: 14 Nov 2006 09:12:30
Message: <4559cece$1@news.povray.org>
Mark Weyer wrote:
>>                                    I began wondering if it might be
>> possible to render a cylindrical view of the towers, but not from the
>> inside out, instead, from the outside (a certain distance) towards the
>> center.
> 
> I see that you already solved your problem, so just for the record:
> 
> I once had the same need. My first solution was to patch povray. Then I
> came up with the following more portable one: Use a cylindrical camera,
> shift it along the axis of rotation away from the object and use two
> conical (with height=radius) mirrors to bring the rays of vision back to
> the object.

Hm, could you post the code for that? Just because I'm curious, my 
solution was different (and IMHO a little more intuitive):

All the objects in question are set to "no_image" and the camera looks 
at the inside of a 100% reflective cylinder, thus the rays get reflected 
back onto the outside surface (and with "no_image", objects show up in 
reflections) and I get the view I want.

Regards,
Tim

-- 
aka "Tim Nikias"
Homepage: <http://www.nolights.de>


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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