It is currently Wed, 17-10-18, 3:11 GMT

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Mon, 01-04-13, 17:27 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
After all these years with CMOD modeling, I just dicovered a feature today, that I wasn't aware at all : we can define simple lines with a color gradiant on them. Even transparent planes can have nice shades of colors on them, without using a texture :

Image

This is very different than using sprites. I already see some nice applications of this feature.


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 01-04-13, 17:57 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4579
Location: Hamburg, Germany
Looks cute. Within the standard OGL-C++ coding framework, I know of course how to do this. No idea what ChrisL pulled out to the user level from OGL. I just know that he made Sprites available, and you have played a lot with them.

Fridger

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 01-04-13, 18:38 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
Playing a bit with the shades feature...

A nebula in a glass box :mrgreen:

Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 01-04-13, 19:02 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4579
Location: Hamburg, Germany
Just to compare with the corresponding "internal" OGL commands, what commands to you do to draw the box?

Fridger

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 01-04-13, 19:09 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
t00fri wrote:
Just to compare with the corresponding "internal" OGL commands, what commands to you do to draw the box?


Here's the complete CMOD file :
Code:
#celmodel__ascii

material # 0
  opacity 0.75
end_material

material # 1
  opacity 0.3
end_material

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 2
10 10 10 0.8 0.8 0.8 1
10 10 -10 0.3 0.3 0.3 1

linestrip 0 2
0 1
end_mesh

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 2
10 -10 10 0.3 0.3 0.3 1
10 -10 -10 0.8 0.8 0.8 1

linestrip 0 2
0 1
end_mesh

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 2
-10 -10 10 0.8 0.8 0.8 1
-10 -10 -10 0.3 0.3 0.3 1

linestrip 0 2
0 1
end_mesh

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 2
-10 10 10 0.3 0.3 0.3 1
-10 10 -10 0.8 0.8 0.8 1

linestrip 0 2
0 1
end_mesh

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 4
10 10 10 1 1 1 1
10 -10 10 0.3 0.3 0.3 1
-10 -10 10 0.8 0.8 0.8 1
-10 10 10 0.3 0.3 0.3 1

linestrip 0 5
0 1 2 3 0

end_mesh

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 4
10 10 -10 1 1 1 1
10 -10 -10 0.3 0.3 0.3 1
-10 -10 -10 0.8 0.8 0.8 1
-10 10 -10 0.3 0.3 0.3 1

linestrip 0 5
0 1 2 3 0

end_mesh

#### 6 cube faces :

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 4
10 10 10 0.5 0.5 0 0.25
-10 10 10 0 0.5 0.5 0.5
-10 -10 10 0.5 0 0.5 0.5
10 -10 10 0.5 0.5 0.5 0.25

trilist 1 6
0 1 2 0 2 3

end_mesh

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 4
10 10 -10 0.5 0.5 0 0.25
-10 10 -10 0 0.5 0.5 0.5
-10 -10 -10 0.5 0 0.5 0.5
10 -10 -10 0.5 0.5 0.5 0.25

trilist 1 6
3 2 0 2 1 0

end_mesh

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 4
10 10 10 0.5 0.5 0 0.25
-10 10 10 0 0.5 0.5 0.5
-10 10 -10 0.5 0 0.5 0.5
10 10 -10 0.5 0.5 0.5 0.25

trilist 1 6
3 2 0 2 1 0

end_mesh

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 4
10 -10 10 0.5 0.5 0 0.25
-10 -10 10 0 0.5 0.5 0.5
-10 -10 -10 0.5 0 0.5 0.5
10 -10 -10 0.5 0.5 0.5 0.25

trilist 1 6
0 1 2 0 2 3

end_mesh

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 4
10 10 10 0.5 0.5 0 0.25
10 -10 10 0 0.5 0.5 0.5
10 -10 -10 0.5 0 0.5 0.5
10 10 -10 0.5 0.5 0.5 0.25

trilist 1 6
0 1 2 0 2 3

end_mesh

mesh vertexdesc position f3 color0 f4 end_vertexdesc

vertices 4
-10 10 10 0.5 0.5 0 0.25
-10 -10 10 0 0.5 0.5 0.5
-10 -10 -10 0.5 0 0.5 0.5
-10 10 -10 0.5 0.5 0.5 0.25

trilist 1 6
3 2 0 2 1 0

end_mesh


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 01-04-13, 19:17 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
What I like very much about these OGL color gradiants, is there is NO artifacts or banding patterns. The shades are perfectly smooth.

_________________
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 01-04-13, 19:36 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4579
Location: Hamburg, Germany
Thanks...Indeed seems to offer plenty of potential!

F.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 01-04-13, 20:24 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
Still exploring the possibilities. I superposed a shaded disk over my ecliptic grid (the blobs are parts of my galactic maps of modecular clouds) :
Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 01-04-13, 20:50 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
Very interesting : perfect radial shades, without any circular banding artifacts !

Image
Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 04-04-13, 14:17 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
I'm back on the "drawing board" to modelize a magnetized star (dejections and solar flares...) :

Image

All field lines will have a color shade with nice transparency effect, from its north magnetic pole to its south magnetic pole. Each pole would be located at a sun's spot.


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 04-04-13, 19:17 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 418
Location: Tuscany, Tyrrhenian Sea
Magnetic fields are always my favourite amongst your creations. Could try also how they looks if the field lines were spriteized?

_________________
Never at rest.
Massimo


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 04-04-13, 20:13 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
fenerit wrote:
Could try also how they looks if the field lines were spriteized?


I've already done it a long time ago. I published this, on shatters.net :
Image
Image
Image

Most of the times, it's just ugly, though.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 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:  
Powered by phpBB® Forum Software © phpBB Group