It is currently Fri, 24-11-17, 5:48 GMT

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon, 03-09-07, 22:04 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 20:59 GMT
Posts: 1605
Location: Norway
How to graft a CMOD landscape model onto a Virtual Texture seamlessly
Due to Celestia´s infamous depht-sorting bug, entirely seamless is not quite possible
but you can do a very good approximation. Here´s how:


Let´s say we have a 64k PNG virtual texture of the Kalahari desert, and you want to place a
mountain on it.

Here is your mountain:

Image

You want to place this mountain here in Celestia:

Image

First, you locate the exact VT tile the mountain will rest on, and open it in your favourite
image editor. In our case, it looks like this:

Image

Now, in your 3D editor, you make a material for your mountain and assign the tile above
to it, then apply the material to your mountain:

Image

... If you were to save your model like this, the landscape would get an ugly quadratic
seam, and we don´t want that. So, here´s what to do:

1. Split your model into two meshes

(don´t move the top mesh at all; in the picture this is just to illustrate my point...

Image

2. Fill the hole under your top mesh!
Make sure the normals of the bottom point outwards. This we do
to minimize depht-sorting issues in Celestia.


Image

3. Make a copy of our tile in your image editor
Use a circular lasso with some high feather value (how high depends on the size of your
texture: in this case, with a 1024x1024 pixel tile, i use perhaps 200 pixels. Use the tool to
delete the borders of your tile, making an increasingly transparent image from the center
and out. Save your tile as a transparent PNG file.


It now looks like this:

Image

4. In your 3D program, DUPLICATE the mountain material
Assign the duplicate your NEW tile. To force Celestia to understand that it is transparent,
it is neccecary to make this new material 98% opaque.


Now apply your NEW material to the bottom half of your model:

Image

... Now you have a mountain whose base becomes gradially more transparent the
closer it gets to the Virtual Texture it rests upon. In our case, it looks like this:

Image

Some notes:

1. You WILL experience depht-sorting issues. See the Placeholder Trick tutorial for
notes on how to minimize them.

2. You will almost always have to experiment with the material properties in your
3D editor to get the coloring and reflections just right; Celestia treats a CMOD mapped
image differently than it treats a Virtual Texture, so colors will be off. You just need to
fine-tune it to your liking.

... Finally, here´s an overview of the scene in Celestia:

Image

rthorvald

_________________
Image


Last edited by rthorvald on Mon, 08-10-07, 11:18 GMT, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue, 04-09-07, 23:43 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 16:06 GMT
Posts: 346
Location: Rome, Italy
Wow !!!
Thanks a lot for your very clear explanation, very interesting.
I'll try to smooth some 3D meshes I have somewhere in my PC, never used because they look a bit ugly, due to the missing smoothness with the ground.
Appreciated! :wink:
Bye

Andrea :D

_________________
Andrea
WorldPoss Sn Team Member
Core 2 Quad Q6600 G0 3.6 GHz- 4 GB DDR2- DELL 2709W 1920x1200-WinXP 32 SP3- VISTA 64- ASUS P5K-E- 8800 GTX 768MB- SATA II 320-300 GB-IDE 1 TB- 169.21- Celestia1.4.1_patch3- 1.5.1-LUA Edu Tools


Top
 Profile  
 
 Post subject:
PostPosted: Wed, 05-09-07, 6:55 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 8:49 GMT
Posts: 121
Location: Oxford UK
Very nice Runar... just shows what you can do with a little clear thinking... and the right tools of course!


Top
 Profile  
 
 Post subject:
PostPosted: Wed, 02-01-08, 13:40 GMT 
Offline

Joined: Wed, 02-01-08, 13:33 GMT
Posts: 1
i want this topic i love it very mush
i want apollo 11 addon


Top
 Profile  
 
 Post subject:
PostPosted: Wed, 02-01-08, 14:24 GMT 
Offline
User avatar

Joined: Sat, 13-10-07, 18:18 GMT
Posts: 373
Would you all mind if I added a link to this topic on the ML somewhere?
Might vastly improve the quality of some of those "crappy" add-ons we're
so famous for.

Or, is this another taboo?

Thanks, Brain-Dead


Top
 Profile  
 
 Post subject:
PostPosted: Wed, 02-01-08, 14:36 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 20:59 GMT
Posts: 1605
Location: Norway
Linking is quite Ok with me, as long as you don´t link directly to a downloadable file.

- rthorvald


Top
 Profile  
 
 Post subject:
PostPosted: Wed, 02-01-08, 16:09 GMT 
Offline
User avatar

Joined: Sat, 13-10-07, 18:18 GMT
Posts: 373
Thanks Runar... Mayhap I can get it posted where it will do some good for add-on authors.
I'm really getting tired of seeing the junk I have to examine there.

Take care, Bob


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group