2D Billboard Object - no shadows rendered

Started by moodflow, November 13, 2008, 07:54:02 AM

Previous topic - Next topic

moodflow

#15
Unfortunately, DandelO, this issue is still not resolved.  With the 2D card object, it does cast shadows, but the texture is too dark.  At this time, I am assuming its due to an object flaw.  Even with diffuse color set to 1, the object renders too dark (see below). 

The other 2D object I have shows the image perfectly, but does not cast shadows.

Below, I've attached a sample image of the "darkness" and the 2D card object, plus the test image I've been using.

The main reason I am pursuing using a 2D object, is for extremely massive populations.  I've been working on one image that consistently crashes, due to sheer volume of 3D populations.  In certain cases, the difference between 2D and 3D is negligible, so I've decided to go this route in certain cases.
http://www.moodflow.com
mood-inspiring images and music

rcallicotte

I've put this here before, but this is a good way to postwork distant scenery - http://www.gardenhose.com/
So this is Disney World.  Can we live here?

bigben

Quote from: moodflow on November 16, 2008, 11:17:53 AM
Unfortunately, DandelO, this issue is still not resolved.  With the 2D card object, it does cast shadows, but the texture is too dark.  At this time, I am assuming its due to an object flaw.  Even with diffuse color set to 1, the object renders too dark

Quote from: bigben on November 15, 2008, 06:35:13 AM
...
Try turning off smooth normals (not needed anyway)

dandelO

I often do use 2d trees, they use far less render power when it's for huge, distant populations. Works well.
The object I apply the texture to, however, is a flattened cube, not a one or two-sided plane object. Try using a flattened cube primitive and apply the same textures to it as you have your 2d plane. My snowflake .tgo is just a flat cube with colour and opacity aswell and I need to uncheck 'cast shadows' for it because they cast correctly, from every instance.

moodflow

Quote from: dandelO on November 16, 2008, 04:38:36 PM
I often do use 2d trees, they use far less render power when it's for huge, distant populations. Works well.
The object I apply the texture to, however, is a flattened cube, not a one or two-sided plane object. Try using a flattened cube primitive and apply the same textures to it as you have your 2d plane. My snowflake .tgo is just a flat cube with colour and opacity aswell and I need to uncheck 'cast shadows' for it because they cast correctly, from every instance.

This is a great idea!  I assume transparent .tiff files would show through properly?
http://www.moodflow.com
mood-inspiring images and music

moodflow

Quote from: calico on November 16, 2008, 11:33:46 AM
I've put this here before, but this is a good way to postwork distant scenery - http://www.gardenhose.com/


Calico, this is one of the main reasons I want to get this 2D object going.  Paint together some gardenhose elements, and create a 2D image out of them.  Great stuff!
http://www.moodflow.com
mood-inspiring images and music

moodflow

Hi BigBen,

I turned off smooth normals, and still no luck.   ???
http://www.moodflow.com
mood-inspiring images and music

dandelO

Any image type will work for opacity, as long as it's black/white. I use .jpg mostly for this as they are small in size and if it's this far away you don't need really high quality images. Black=transparent/colour=opaque.

Here's my snowflake object, it has cast shadows left on, you'll want to disable that if it's used in a floating population. It only uses one image in a default shader because it doesn't contain any other colour...

Use the default shader(as I've done here) or, for more control, use an IMS, leave 'transparency key'=black and adjust the 'key tolerance' levels, very slightly, until you have the correct opacity.
I'll be back with more on this shortly, namely trees with one colour image-map that uses the same image for opacity(if I can find my trees, I've a feeling I've left them on another disk...)

[attachimg=#]






dandelO

#23
Right, here's how I do it...

First I make a new plane object of the aspect ratio of the image map - 3/4. Import that into TG.
Next I make a new IMS in it's internal network and I leave projection as 'through camera', for now, this is for ease of editing as you'll see from these test images. Once you're finished editing colours/opacity, switch to 'object UV' option so the image fits your plane.

First image:

[attachimg=#]

The IMS default settings without transparency show a black background behind the tree, this is obviously my background from rendering the tree-map(it's a simple tree rendered in Carrara against a black BG and saved as .jpg, no opacity channels here).
______________________________________________________

Second image:

[attachimg=#]

I want to make the black bits see-through so I enable transparency but the default 'key tolerance' of '0.1' gives too much transparency because the tree is very dark itself.
______________________________________________________

Third image:

[attachimg=#]

By keeping the 'transparency key' black and tightening the tolerance levels you can make just the black areas vanish, leaving just colour.

Mohawk20

Nice... Now we only need a proof of concept on a pop with shadows.
Howgh!

dandelO


bigben

Quote from: moodflow on November 16, 2008, 05:00:09 PM
Hi BigBen,

I turned off smooth normals, and still no luck.   ???

Hmmm... weird... something else perhaps?  Try substituting your image into this?...

OK here are my files with a few tests using cbalaskas 2d card object.  LZW compressed tiff with transparent background. Disabled the second plane by making it opaque.

[attachimg=#1]
Image appplied via default shader, opacity = alpha channel of image.

[attachimg=#2]
Image applied via image map shader, opacity = alpha channel. Dare I state the obvious.... square shadows. The default shader is definitely the one to use here.

One advatnage of LZW TIFs is that you don't get JPEG artefacts which (theoretically) makes for higher quality transparency masks when creating transparency from a colour range... but it's also far easier just to have the transparency in the image as well.

I tried several different combinations of image settings with the built in plane object but no joy. Looks like a UV mapping issue with the plane objects.

bigben

#27
@moodflow: I had a play with your tgo and tif and it works fine. Is there another setting in TG2 that you've altered from the default?.

[attachimg=#2]
Don't forget this angle is looking into the sun

[attachimg=#3]

moodflow

#28
BigBen,

This looks like its working, but you did keep luminosity at 0, right?

For my case, I kept all settings default.  This is really wierd.
http://www.moodflow.com
mood-inspiring images and music

bigben

luminosity = 0. The attached TGD is what I used to render your texture.