Page 1 of 1

Point Sprites!

Posted: 12.10.2010, 09:05
by Verz Veraldi
I'm gonna learn to make nebulas and galaxies by point sprites now :D .. But first of all -according to my surfey- I see that placing the points can be done by 3d modeling program.. I have Autodesk 3ds Max and blender, which of it that works? I prefer using autodesk though.. :wink:

Re: Point Sprites!

Posted: 12.10.2010, 12:36
by selden
Unfortunately, Point Sprites can only work in Celestia's own .CMOD model format. If you use 3DS Max, you'll have to find a .max to .3ds converter, then use the 3ds to cmod converter, then edit the file manually using your favorite text editor. A Blender cmod output script is available, which eliminates one of the steps.

Re: Point Sprites!

Posted: 12.10.2010, 12:44
by Verz Veraldi
nah, 3ds max file can be exported to 3ds files... i've tried it... which means it both can! I better try it.. I'll ask some questions if I'm stuck on something... I've also got the 3ds to cmod converter.. things are alot easier.. :)

Re: Point Sprites!

Posted: 12.10.2010, 16:19
by t00fri
My 10000+ NGC/IC galaxies in the official Celestia distribution I have rendered with point sprites already long ago.
More recently, I used shaders to render (colored) elliptical galaxies for my ongoing Celestia.Sci project.. At closer distance the mottled substructure of ellipticals due to galactic cluster halos is modelled again with point sprites and blended with the shader rendering.

http://forum.celestialmatters.org/userpix/4_m06_1.jpg

Fridger

Re: Point Sprites!

Posted: 13.10.2010, 10:44
by Fenerit
Verz Veraldi wrote:nah, 3ds max file can be exported to 3ds files... i've tried it... which means it both can! I better try it.. I'll ask some questions if I'm stuck on something... I've also got the 3ds to cmod converter.. things are alot easier.. :)

Hi Verz, to put points through the method of exporting 3DS is tricky; you must use OBJ instead. 3DS always export faces too, which aren't required. OBJ allows single points group selection. Then such OBJ file must edited in order to remove the letter "v" of vertex and to add the CMOD directives (material, point size row and the spites' strip line).

Re: Point Sprites!

Posted: 13.10.2010, 12:15
by Verz Veraldi
then, is there any converter for .obj to .cmod? or... there is other way? perhaps you can show me some kind of tutorial if available? things are getting alot easier and straight with tutorials..... to be honest, i'm kinda blind when it's about modeling with 3d program.. :mrgreen:

Re: Point Sprites!

Posted: 13.10.2010, 15:17
by Fenerit
Verz Veraldi wrote:then, is there any converter for .obj to .cmod? or... there is other way? perhaps you can show me some kind of tutorial if available? things are getting alot easier and straight with tutorials..... to be honest, i'm kinda blind when it's about modeling with 3d program.. :mrgreen:

A "tutorial" with a Perl script which perform the OBJ2CMOD conversion should be here: http://forum.celestialmatters.org/viewt ... =7516#7516
but is for points conversion only, without to account for the sprites directives (which should be easy to add within). I wrote that just as practice in Perl; let's give me few time and I set up it for the sprites. Nonetheless, you must install Perl on your system first. Perl is a powerful multiplatform interpreted language packed and freely distributed here:

http://www.activestate.com/activeperl

or here:

http://strawberryperl.com/

If is the first time that you approach Perl, the choice amongst distributions is purely matter of taste. Do install (with the path option) and then forgot it, whether isn't you intention to work with it furthermore. Perl scripts are executed either within DOS cmd prompt or by the double clicking on their script's icons. Scripts and target's files (OBJs, in such case) must be in the same folder.

BTW, seem that you have 3d studio max; now I do not use it, but I know and I've used him when was under DOS. It is enough powerful to accomplish you needs. Now tools would spray points in the forms you like; that points must be saved in OBJ format. Please, if you can, let' post the beginning and the ending of an exported OBJ file (the text's strings within), in order to set properly up the conversion's script.

Re: Point Sprites!

Posted: 14.10.2010, 08:55
by Verz Veraldi
Is it a freeware? Anyway, I've remember seeing this two Cham's images:
http://fsgregs.startlogic.com/Public_Fi ... es/bh2.jpg
download/file.php?id=1344&mode=view

how to make that sprites so... sorted? I mean, it'll take years to put that many points without some special method.. :?

Re: Point Sprites!

Posted: 14.10.2010, 12:03
by selden
Cham created a Mathematica script which wrote out a text-format CMOD file.

Any programming language can be used to do something similar -- Java, C++, Fortran, Maple, etc. You could even use Celestia's built-in programming language, Lua, in a CELX script.

Re: Point Sprites!

Posted: 14.10.2010, 14:51
by t00fri
selden wrote:
Any programming language can be used to do something similar -- Java, C++, Fortran, Maple, etc. You could even use Celestia's built-in programming language, Lua, in a CELX script.

+++++
Perl!
+++++

Every OS has it. It's FREE. It doesn't need to be compiled and is human readable. It's VERY easy to learn and most powerful via a vast number of available modules that may be installed automatically:

e.g. cpan Math::Quaternion
does it all (including the test runs ;-) ).

In Celestia development Perl has been used extensively over the past years.

F.

Re: Point Sprites!

Posted: 14.10.2010, 16:37
by Fenerit
Verz Veraldi wrote:Is it a freeware? Anyway, I've remember seeing this two Cham's images:
http://fsgregs.startlogic.com/Public_Fi ... es/bh2.jpg
download/file.php?id=1344&mode=view

how to make that sprites so... sorted? I mean, it'll take years to put that many points without some special method.. :?

Try whether a point cloud's sphere can be warped, like the warp effect within the 2d paint programs; Lightwave do that, so I think even 3ds MAX is able.

Re: Point Sprites!

Posted: 15.10.2010, 07:07
by Verz Veraldi
8O
okay, how to do it? :?
At least a tutorial to make that from scratch to complete (a tutorial with image will be better)
remember, i'm totally blind when it's about c++ language.. :oops:

Re: Point Sprites!

Posted: 15.10.2010, 14:17
by Fenerit
Verz Veraldi wrote:8O
okay, how to do it? :?
At least a tutorial to make that from scratch to complete (a tutorial with image will be better)
remember, i'm totally blind when it's about c++ language.. :oops:

Sorry Verz, but I do not understand. I cannot help you with 3ds MAX since I no longer have used it from its 2.0 version for DOS (3D Studio). When you quote "C++" do you mean its scripting language? Otherwise why do you tell about C++? Do you mean Perl, perhaps? Its is similar, but it is another thing. The C++, Perl, Lua, Java, Ruby, PHP etc. are languages in which is possible to write the 3ds Max output (OBJ) to CMOD, and in this I can help you; but I need to know the header of the 3ds MAX OBJ converter which can add different text's strings accordingly with the different version of 3ds MAX. Just do spray some points, save it and paste the OBJ's text as code here, in this thread.
Instead, about where and how to modelling points with 3ds MAX, you must to know the program, even with the "try and error" method; being aware that a complete knowledge of 3ds MAX requires years of use. Cham's models are made with Mathematica, which gets such forms mathematically, by operating on equations. Also 3ds Max has a "mathematic" section for modelling, even though the usual deformation's tools can do well for you. Where on 3ds Max such tools are, I cannot tell you, not having the program. Anyhow, there are lots of sites dedicated to 3ds MAX tutorials:

http://www.3dlinks.com/links.cfm?catego ... N=49277999

http://www.tutorialized.com/tutorials/3DS-MAX/1

http://www.3dstudiomaxtutorials.com/

http://www.cgrats.com/

and theirs embedded links.