Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, Quad), 903 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
fake an outline shader #441786
06/03/14 01:37
06/03/14 01:37
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
I have several simple models (3D primitives for the most part) that I need to have an "outline" on. Basically just lines that connect the outer most vertices together. I have A8 free so shaders are not an option, hence the problem. I am almost 100 percent sure I could just use the draw3dline (sorry, I don't remember the exact function) command to connect the vertices but that will require hard programming the individual vertex numbers in an array in order so I could read them ad connect them. Again it's possible, but it doesn't seem sensible. Any hints or ideas that might be a better approach?

Re: fake an outline shader [Re: xbox] #441790
06/03/14 04:06
06/03/14 04:06
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
You can do this in a modeling program: Duplicate your model, scale it a little (by normals, which is not possible in MED), invert the normals and apply a black skin. Now render both entities at the same time and position (you can scale the black model depending on object-camera distance to keep the outline at the same thickness).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: fake an outline shader [Re: Superku] #441819
06/03/14 19:21
06/03/14 19:21
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
I did this before, only I scaled it using MED which then ran into problems as you said. I just downloaded Blender to try this, imported the model, selected scale and changed to normals, set it to about 1.5 just to see the result, exported it and merged with original model in MED to see the size, and the imported model is half of it's original size. I'm not sure what I'm doing wrong.

Re: fake an outline shader [Re: xbox] #441820
06/03/14 20:23
06/03/14 20:23
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619 Offline
Junior Member
tolu619  Offline
Junior Member
T

Joined: Jun 2014
Posts: 97
Lagos, Nigeria
While we're at this, can anyone post a sample code for how to do that with shaders for those of us using the commercial version?

Re: fake an outline shader [Re: tolu619] #441824
06/03/14 21:20
06/03/14 21:20
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
^^ You can find what you are looking for in the wiki laugh


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: fake an outline shader [Re: DLively] #441827
06/04/14 03:35
06/04/14 03:35
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I don't know anything about Blender but try to duplicate the model, scale only the new one and keep the old one as a reference.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: fake an outline shader [Re: Superku] #441831
06/04/14 09:27
06/04/14 09:27
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
I should really work on a plugin (which can be used with LoadLibrary too) so you can use shaders on the free version :S

Re: fake an outline shader [Re: Ch40zzC0d3r] #441837
06/04/14 14:27
06/04/14 14:27
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
@Superku - That's exactly what I'm doing. It seems no matter how big I scale the new inverted one, when I export it from blender and import it back to MED and merge with the original to check sizes, the new one is always about half of the size, even if I scale it to 50 times larger in blender.

@Ch40zzC0d3r - Yeah, you really should. What are you waiting for?? grin hahaha just kidding with you. I'd have no clue where to even begin with that grin

Re: fake an outline shader [Re: xbox] #441838
06/04/14 14:29
06/04/14 14:29
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
What I tried so say was the following: Take a cylinder for example. Now create a copy of the object in Blender so you have two cylinders in one file. Try to only scale one of them and keep the other object/ mesh unchanged. That should help.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: fake an outline shader [Re: Superku] #441842
06/04/14 16:47
06/04/14 16:47
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
@superku, you have to flip normals on the outer one and scale it along the normal afaik


POTATO-MAN saves the day! - Random
Page 1 of 3 1 2 3

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1