Learning about Shadows one step at a time.

Discussion of rolling-stock creation & re-painting.

Learning about Shadows one step at a time.

Unread postby wmalder » Tue Mar 17, 2009 12:52 am

I'm not sure if this fits here because it references scenery objects but I imagine eventually it will become important as the techniques are eventually going to be used on rolling stock.

So here's the deal. I have a series of scenery objects that I have exported successfully to the sim but they didn't have shadows yet. Now that I have the basic idea I'm starting to add things to them as these are easier than an entire locomotive. It probably behoves me to say that I'm using 3D Canvas Pro and I've been working with Paul Gausden's new exporter.

I've been working on a telephone pole with three crossbars. I created an interior shape that I've called Shadow_TelephonePole. I've entered the StencilShadow.fx shader in the RailSim field and exported it through the Asset Editor.
The result is as below.

Image

Notice the secondary shadow that when you rotate around the pole, appears to be angling into/below the ground. Notice also the single shadow for a crossbar. I'm not sure what the problem is. Any ideas anyone?

Now here's a screengrab of the 3DC hierarchy. As you should see, I have the pole itself as the Main object with each crossbar as a sub group and the shadow form also in a subgroup. The shadow group initially consisted of the shadow_telephonepole and three shadow_crossbar objects. All were uniquely named and had the stencilshadow.fx applied to the extent of my understanding. In that form the crossbars did not show up at all so I combined all of the objects into one.

Image

One final problem is that once I export the object (BTW it seems that I have to select the entire hierarchy to get the whole object to show, is that right?)I can no longer hide any part of the object and I have to close and reopen 3DC. Any ideas on that one?

Eventually I expect to be able to do this routinely but right now it seems that every step I make is down a blind alley.
wmalder
 

Re: Learning about Shadows one step at a time.

Unread postby decapod » Tue Mar 17, 2009 4:12 am

Hi Bill

It is the Group names, not the object names in 3DC that are important - the object names are lost on export.
With my exporter, only the group names need to be unique.

You need only 2 groups, one for all non-shadow objects and one for all shadow objects.

To export the whole object you should only need to select an object in the base group. It is best to use the hierarchy view for this as it is easy to select an object in the shadow group.

I'll be posting a fix for the feet/metres bug in the exporter some time today - though if the shadow group is at 0,0,0 relative to the main group you should be OK still.
decapod
 

Re: Learning about Shadows one step at a time.

Unread postby wmalder » Tue Mar 17, 2009 1:25 pm

Just to let you all know, the latest exporter - Mar. 17 - works well. I'm getting good exports without odd bits and pieces. Also, I found the cause of the odd shadows, Be sure your shadow shape is closed. I had duplicated it from the main shape which I had deleted the bottom surface (not seen , right? but noticed by the sim). Closing that surface eliminated the extra shadows. Now I need to do some more studying. I found that there was only one crossbar showing because the telephone pole is too tall. If I sink it into the surface, all three show up. I was under the impression that an object had to be much higher than this approx. 40' pole for the shadows to stop appearing. Paul, is there a chance that in the translation to feet from metres that the height of the pole is being read in metric but rendered in feet?
wmalder
 

Re: Learning about Shadows one step at a time.

Unread postby Bananarama » Wed Mar 18, 2009 3:07 am

The shadows are a bit buggy. I created my own set of poles and noted the same issues:

http://forums.uktrainsim.com/viewtopic. ... w#p1115320
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet


Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 1 guest